class ndarray | SharedArray, filenames: List[str] | None = None, indices: List[int] | Indices | None = None, metadata: Dict[str, Any] | None = None, sinograms: bool = False, name: str | None = None)[source]

Bases: object

clear_proj180deg() None[source]
copy(flip_axes: bool = False) ImageStack[source]
copy_roi(roi: SensibleROI) ImageStack[source]
count() int[source]
counts() Counts | None[source]
static create_empty_image_stack(shape: tuple[int, ...], dtype: dtype, metadata: dict[str, Any]) ImageStack[source]
property data: ndarray
property dtype: np.typing.DTypeLike
property filenames: List[str] | None
property h_middle: float

Returns the horizontal middle (middle column) of the projections

has_proj180deg() bool[source]
property height: int
property id: UUID
property is_processed: bool

True if any of the data has been processed, False otherwise.

property is_sinograms: bool
load_metadata(f: TextIO) None[source]

Load metadata json without overwriting existing values

property log_file: InstrumentLog | None
make_name_unique(existing_names: List[str]) None[source]
name: str
property num_images: int
property num_projections: int
property num_sinograms: int
property pixel_size: float
property proj180deg: ImageStack | None
projection(projection_idx: int) ndarray[source]
projection_angles(max_angle: float = 360.0) 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


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: ndarray
real_projection_angles() ProjectionAngles | None[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: str, *args, **kwargs) None[source]
save_metadata(f: TextIO, rescale_params: Dict[str, str | float] | None = None) None[source]
set_projection_angles(angles: ProjectionAngles) None[source]
property shared_array: SharedArray
sino(slice_idx: int) ndarray[source]
sino_as_image_stack(index: int) ImageStack[source]

A single sinogram slice as an ImageStack in projection ordering

property sinograms: ndarray
slice_as_array(index: int) ndarray[source]
slice_as_image_stack(index: int) ImageStack[source]

A slice, either projection or sinogram depending on current ordering

property uses_shared_memory: bool
property width: int