Volume data manipulation functions.
virtual signed int IVolumeResampler::ResampleToIsotropicSlices |
( |
IVolumeData * |
vd | ) |
|
|
pure virtual |
This function will take a volume that may have missing slices or is unevenly spaced and resample the volume to have regularly. spaced slices.
If VOLUME_DATA_PARAMS::Spacing for z is 0, this function will attempt to choose the proper spacing by taking the median distance between slices in the volume. If VOLUME_DATA_PARAMS::Spacing for z is set, then that value is taken as the preferred slice spacing.
This function will NOT resample slices if they are placed the preferred slice spacing apart. It will only create new slices when necessary.
- Note
- Memory allocation/deallocation will be done by the default allocator UNLESS a custom allocator is attached to the volume. In that case the custom allocator will be used. This is crucial for memory mapped volume data since we may need to release some mapped files.
- Parameters
-
vd | The volume data. The Spacing, Dimension, and ImagePositionPatient fields must be valid on this volume or the function will fail. If the function succeeds, ImagePositionPatient will be removed and all other parameters will be updated to the new specifications |