Skip to content

Utilities

util.*

Functions:

  • exportZStack –

    Export the completed z-stack as NIfTI files plus JSON metadata.

  • logMessage –

    Emit a consistently-prefixed MATLAB log line.

exportZStack

Export the completed z-stack as NIfTI files plus JSON metadata.

Input arguments:

  • stackVolume

    (single) –

    PDI stack volume with dimensions [nz, nx, nSlices], where nz and nx reflect the (possibly cropped) output size.

  • bmodeVolume

    (single) –

    B-mode stack volume with the same dimensions as stackVolume.

  • zStackState

    (struct) –

    Runtime z-stack state containing slice positions and acquisition settings.

Output arguments:

  • outputPaths

    ( struct ) –

    Paths to the exported PDI NIfTI, B-mode NIfTI, and JSON sidecar.

logMessage

Emit a consistently-prefixed MATLAB log line.

Input arguments:

  • message

    (char | string) –

    Message format string written after the standard [matlab] prefix. A trailing newline is added automatically when missing.

  • varargin

    (any) –

    Optional values forwarded to fprintf.