ReconResult#
- class pulserver.recon.ReconResult[source]#
Bases:
objectImage array for the runtime to package as an MRD image, or as DICOM.
The runtime builds the image header, so a plugin builds none. The field of view and matrix are those of the unit’s own encoding space; position, orientation, table position and physiology time stamps are those of
reference; the acquisition time stamp is the earliest of the unit’s imaging acquisitions. Plugins may returnismrmrd.Imageobjects instead.The MRD image holds the values of
dataunchanged, infloat32for real floating-point data andcomplex64for complex data; wider types are downcast and integer types are kept. Integers are made only where DICOM is written, from the floating-point values, by one rescale mapping perseries_index.- Parameters:
data (Any) – NumPy array or Torch tensor, on any device. A
(z, y, x)array becomes one image per partition, each stating the smallest and largest value of the array, of its magnitude when complex, in its meta attributesArrayMinimumandArrayMaximum.reference (Any) – Acquisition the image takes its geometry from, such as an element of
ReconBuffer.headers.Noneis the unit’s reference acquisition,ReconBuffer.reference. An integer indexes the imaging acquisitions of the unit, negative values counting from the end, and is deprecated.series_index (int) – MRD
image_series_index, which also selects the DICOM series.image_index (int | None) – MRD
image_index;Nonenumbers images consecutively.image_type (str) –
"magnitude","phase","real","imaginary"or"complex".attributes (collections.abc.Mapping[str, Any]) – MRD meta attributes, merged over the runtime’s defaults. In a DICOM image
RescaleSlopeandRescaleInterceptstate the mappingvalue = stored * slope + interceptof its stored integers.dicom (bool) – Convert the image to DICOM before sending it.
Examples
>>> import numpy as np >>> import pulserver.recon as recon >>> result = recon.ReconResult(np.zeros((4, 4)), series_index=2) >>> result.data.shape, result.series_index, result.image_type ((4, 4), 2, 'magnitude')
Attributes