mantidimaging.core.data.imagestack module

class mantidimaging.core.data.imagestack.ImageStack(data: Union[numpy.ndarray, mantidimaging.core.parallel.utility.SharedArray], filenames: Optional[List[str]] = None, indices: Optional[Union[List[int], mantidimaging.core.utility.data_containers.Indices]] = None, metadata: Optional[Dict[str, Any]] = None, sinograms: bool = False, name: Optional[str] = None)[source]

Bases: object

clear_proj180deg()[source]
copy(flip_axes=False) mantidimaging.core.data.imagestack.ImageStack[source]
copy_roi(roi: mantidimaging.core.utility.sensible_roi.SensibleROI)[source]
count() int[source]
counts() Optional[mantidimaging.core.utility.data_containers.Counts][source]
static create_empty_image_stack(shape, dtype, metadata) mantidimaging.core.data.imagestack.ImageStack[source]
property data: numpy.ndarray
property dtype
property filenames: Optional[List[str]]
property h_middle: float

Returns the horizontal middle (middle column) of the projections

has_proj180deg()[source]
property height
property id: uuid.UUID
property is_sinograms: bool
load_metadata(f: TextIO)[source]
property log_file
make_name_unique(existing_names: List[str])[source]
name: str
property num_images: int
property num_projections: int
property num_sinograms: int
property pixel_size
property proj180deg: Optional[mantidimaging.core.data.imagestack.ImageStack]
projection(projection_idx) numpy.ndarray[source]
projection_angles(max_angle: float = 360.0) mantidimaging.core.utility.data_containers.ProjectionAngles[source]

Return projection angles, in priority order: - From a log - From the manually loaded file with a list of angles - Automatically generated with equidistant step

Parameters

max_angle – The maximum angle up to which the angles will be generated. Only used when the angles are generated, if they are provided via a log or a file the argument will be ignored.

property projections
real_projection_angles() Optional[mantidimaging.core.utility.data_containers.ProjectionAngles][source]

Return only the projection angles that are from a log file or have been manually loaded. :return: Real projection angles if they were found, None otherwise.

record_operation(func_name: str, display_name, *args, **kwargs)[source]
save_metadata(f: TextIO, rescale_params: Optional[Dict[str, Union[str, float]]] = None)[source]
set_projection_angles(angles: mantidimaging.core.utility.data_containers.ProjectionAngles)[source]
property shared_array: mantidimaging.core.parallel.utility.SharedArray
sino(slice_idx) numpy.ndarray[source]
sino_as_image_stack(index) mantidimaging.core.data.imagestack.ImageStack[source]

A single sinogram slice as an ImageStack in projection ordering

property sinograms
slice_as_array(index) numpy.ndarray[source]
slice_as_image_stack(index) mantidimaging.core.data.imagestack.ImageStack[source]

A slice, either projection or sinogram depending on current ordering

property uses_shared_memory: bool
property width