nabu.stitching.stitcher.dumper.postprocessing module

class nabu.stitching.stitcher.dumper.postprocessing.OutputVolumeContext(volume: VolumeBase, volume_shape: tuple, dtype: dtype, dumper)[source]

Bases: AbstractContextManager

Utils class to Manage the data volume creation and save it (data only !). target: used for volume stitching In the case of HDF5 we want to save this directly in the file to avoid keeping the full volume in memory. Insure also contain processing will be common between the different processing

If stitching_sources_arr_shapes is provided this mean that we want to create stitching region and then create a VDS to avoid data duplication

class nabu.stitching.stitcher.dumper.postprocessing.OutputVolumeNoDDContext(volume: VolumeBase, volume_shape: tuple, dtype: dtype, dumper, stitching_sources_arr_shapes: tuple | None)[source]

Bases: OutputVolumeContext

Dedicated output volume context for saving a volume without Data Duplication (DD)

class nabu.stitching.stitcher.dumper.postprocessing.PostProcessingStitchingDumper(configuration)[source]

Bases: DumperBase

dumper to be used when save data durint post-processing stitching (on recosntructed volume). Output is expected to be an NXtomo

OutputDatasetContext

alias of OutputVolumeContext

save_configuration()[source]
property output_identifier: VolumeIdentifier
create_output_dataset()[source]

function called at the beginning of the stitching to prepare output dataset

class nabu.stitching.stitcher.dumper.postprocessing.PostProcessingStitchingDumperNoDD(configuration)[source]

Bases: PostProcessingStitchingDumper

same as PostProcessingStitchingDumper but prevent to do data duplication. In this case we need to work on HDF5 file only

OutputDatasetContext

alias of OutputVolumeNoDDContext

create_output_dataset()[source]

function called at the beginning of the stitching to prepare output dataset

static create_subset_selection(dataset: Dataset, slices: tuple) VirtualSource[source]
property output_dataset: VirtualLayout | Dataset | VolumeBase | None
property stitching_regions_hdf5_dataset: tuple | None

hdf5 dataset storing the stitched regions

property raw_regions_hdf5_dataset: tuple | None

hdf5 raw dataset

save_stitched_frame(stitched_frame: ndarray, composition_cls: dict, i_frame: int, axis: int)[source]

Save the full stitched frame to disk