Uniform volume. More...
#include <cmtkUniformVolume.h>
Classes | |
class | ResampleTaskInfo |
Thread parameter block for volume resampling. More... | |
Public Types | |
typedef UniformVolume | Self |
This class. | |
typedef Volume | Superclass |
Superclass. | |
typedef SmartPointer< Self > | SmartPtr |
Smart pointer to UniformVolume. | |
typedef SmartConstPointer< Self > | SmartConstPtr |
Smart pointer to const UniformVolume. | |
typedef Superclass::CoordinateRegionType | CoordinateRegionType |
Region type. | |
typedef Superclass::CoordinateVectorType | CoordinateVectorType |
Index type. | |
Public Member Functions | |
const CoordinateVectorType & | Deltas () const |
Get pixel size vector. | |
CoordinateVectorType & | Deltas () |
Get pixel size vector. | |
virtual | ~UniformVolume () |
Destructor. | |
UniformVolume (const UniformVolume &other, const Types::Coordinate resolution=0, const bool allowUpsampling=false) | |
Resample other volume to given resolution. | |
UniformVolume (const DataGrid::IndexType &dims, const Self::CoordinateVectorType &size, TypedArray::SmartPtr &data=TypedArray::SmartPtr::Null) | |
Create uniform volume "from scratch". | |
UniformVolume (const DataGrid::IndexType &dims, const Types::Coordinate deltaX, const Types::Coordinate deltaY, const Types::Coordinate deltaZ, TypedArray::SmartPtr &data=TypedArray::SmartPtr::Null) | |
Create uniform volume "from scratch". | |
bool | GridMatches (const Self &other) const |
Test whether this grid matches another one, i.e., has the same pixel sizes. | |
virtual void | ChangeCoordinateSpace (const std::string &newSpace) |
Change volume coordinate space. | |
std::string | GetOrientationFromDirections () const |
Get anatomical orientation from space directions. | |
virtual void | CreateDefaultIndexToPhysicalMatrix () |
Create a default index-to-physical transformation matrix. | |
virtual AffineXform::MatrixType | GetImageToPhysicalMatrix () const |
Get matrix that maps form image coordinates to physical space. | |
Self::SmartPtr | Clone (const bool copyData) |
Create a physical copy of this object. | |
Self::SmartPtr | Clone () const |
Self::SmartPtr | CloneGrid () const |
Create igsUniformObject with identical geometry but no data. | |
virtual Types::Coordinate | GetDelta (const int axis) const |
Get delta (pixel size) in one dimension. | |
virtual Types::Coordinate | GetMinDelta () const |
Get minimum grid spacing for all dimensions. | |
virtual Types::Coordinate | GetMaxDelta () const |
Get maximum grid spacing for all dimensions. | |
virtual TypedArray::SmartPtr | Resample (const UniformVolume &) const |
Resample other volume. | |
const UniformVolume::SmartPtr | GetReoriented (const char *newOrientation=AnatomicalOrientation::ORIENTATION_STANDARD) const |
Get volume reoriented to a different anatomical axis alignment. | |
virtual UniformVolume * | GetDownsampledAndAveraged (const int downsample, const bool approxIsotropic=false) const |
Downsampling constructor function. | |
virtual UniformVolume * | GetDownsampledAndAveraged (const int(&downsample)[3]) const |
Downsampling constructor function. | |
UniformVolume * | GetInterleavedSubVolume (const int axis, const int factor, const int idx) const |
Get interleaved sub-volume along given axis and with given interleave offset. | |
UniformVolume * | GetInterleavedPaddedSubVolume (const int axis, const int factor, const int idx) const |
Get interleaved sub-volume along given axis and with given interleave offset, padded with empty image planes. | |
virtual void | Mirror (const int axis=AXIS_X) |
Mirror volume and associated data. | |
virtual ScalarImage * | GetOrthoSlice (const int axis, const unsigned int plane) const |
Return orthogonal slice. | |
Self::SmartPtr | ExtractSlice (const int axis, const int plane) const |
Extract orthogonal slice as a new volume. | |
virtual ScalarImage * | GetOrthoSliceInterp (const int axis, const Types::Coordinate location) const |
Return interpolated orthogonal slice. | |
virtual ScalarImage * | GetNearestOrthoSlice (const int axis, const Types::Coordinate location) const |
Return orthogonal slice by location. | |
virtual const Self::CoordinateVectorType | GetGradientAt (const int i, const int j, const int k) |
Get date gradient vector at pixel using central differences. | |
virtual void | GetHessianAt (Matrix3x3< Types::DataItem > &H, const int i, const int j, const int k) |
Get data Hessian matrix at pixel using central differences. | |
template<class TData > | |
bool | ProbeData (TData &result, const TData *dataPtr, const Self::CoordinateVectorType &location) const |
Get data value at specified coordinate. | |
bool | ProbeNoXform (ProbeInfo &, const Self::CoordinateVectorType &) const |
Return linearly interpolated voxel without applying a transformation. | |
bool | FindVoxel (const Self::CoordinateVectorType &location, int *const idx, Types::Coordinate *const from, Types::Coordinate *const to) const |
Find a voxel in the volume. | |
bool | FindVoxel (const Self::CoordinateVectorType &location, int *const idx) const |
Find a voxel in the volume. | |
void | GetVoxelIndexNoBounds (const Self::CoordinateVectorType &location, int *const idx) const |
Find a grid index inside or outside the volume. | |
bool | FindVoxelByIndex (const Self::CoordinateVectorType &fracIndex, int *const idx, Types::Coordinate *const frac) const |
Find a voxel in the volume by fractional index. | |
const UniformVolume::RegionType | GetGridRange (const Self::CoordinateVectorType &fromVOI, const Self::CoordinateVectorType &toVOI) const |
Get 3D grid region from continuous lower and upper corner. | |
virtual Types::Coordinate | GetPlaneCoord (const int axis, const int plane) const |
Get plane coordinate. | |
virtual int | GetCoordIndex (const int axis, const Types::Coordinate location) const |
Get grid index of slice with highest coordinate smaller than given. | |
virtual int | GetClosestCoordIndex (const int axis, const Types::Coordinate location) const |
Get grid index corresponding (as close as possible) to coordinate. | |
virtual bool | GetClosestGridPointIndex (const Self::CoordinateVectorType v, int *const xyz) const |
Get grid index corresponding (as close as possible) to coordinate. | |
virtual int | GetTruncCoordIndex (const int axis, const Types::Coordinate location) const |
Get grid index corresponding to coordinate by truncation, not rounding. | |
virtual bool | GetTruncGridPointIndex (const Self::CoordinateVectorType v, int *const xyz) const |
Get grid index corresponding to coordinate by truncation, not rounding. | |
virtual const Self::CoordinateVectorType | GetGridLocation (const int x, const int y, const int z) const |
Get a grid location in image coordinates. | |
virtual const Self::CoordinateVectorType | IndexToPhysical (const Self::CoordinateVectorType &idxV) const |
Get a grid location in physical coordinates. | |
virtual const Self::CoordinateVectorType | GetGridLocation (const size_t idx) const |
Get a grid coordinate by continuous pixel index. | |
void | SetHighResCropRegion (const Self::CoordinateRegionType &crop) |
Set cropping region in real-world coordinates. | |
const Self::CoordinateRegionType | GetHighResCropRegion () const |
Get cropped volume in real-world coordinates. | |
virtual void | SetCropRegion (const Self::RegionType ®ion) |
Catch calls to inherited SetCropRegion() and reset high-res crop region. | |
Self::CoordinateVectorType | GetCenterCropRegion () const |
Calculate volume center. | |
Self::SmartPtr | GetCroppedVolume () const |
Return cropped uniform volume. | |
template<class TAccumulator > | |
ScalarImage * | ComputeProjection (const int axis) const |
Return projection (e.g., MIP, sum) along one axis. | |
virtual Self::CoordinateVectorType | GetCenterOfMass () const |
Get center of mass of pixel data. | |
virtual Self::CoordinateVectorType | GetCenterOfMass (Self::CoordinateVectorType &firstOrderMoment) const |
Get center of mass of pixel data. | |
void | GetPrincipalAxes (Matrix3x3< Types::Coordinate > &directions, Self::CoordinateVectorType ¢erOfMass) const |
Get principal axes. | |
Public Attributes | |
CoordinateVectorType | m_Delta |
Grid spacing for three dimensions. | |
AffineXform::MatrixType | m_IndexToPhysicalMatrix |
Coordinate transformation from index to physical position. | |
Protected Member Functions | |
virtual Self * | CloneVirtual (const bool copyData) |
Create a physical copy of this object. | |
virtual Self * | CloneVirtual () const |
virtual Self * | CloneGridVirtual () const |
Virtual grid cloning constructor. | |
Private Member Functions | |
virtual Self * | ExtractSliceVirtual (const int axis, const int plane) const |
Extract orthogonal slice as a new volume. | |
Static Private Member Functions | |
static void | ResampleThreadPoolExecuteGrey (void *const arg, const size_t taskIdx, const size_t taskCnt, const size_t threadIdx, const size_t threadCnt) |
Multi-threaded resampling for grey data. | |
static void | ResampleThreadPoolExecuteLabels (void *const arg, const size_t taskIdx, const size_t taskCnt, const size_t threadIdx, const size_t threadCnt) |
Multi-threaded resampling for label data (using partial volume averaging). | |
Private Attributes | |
Self::CoordinateRegionType::SmartPtr | m_HighResCropRegion |
Optional high-resolution crop region. | |
Friends | |
class | WarpXform |
Friend declaration of WarpXform class. | |
class | VolumeAxesHash |
Make axes hash a friend. | |
class | VolumeGridToGridLookup |
Grid grid-to-grid lookup friend. | |
class | ResampleThreadInfo |
Give thread parameter class access to local types. |
Uniform volume.
This class handles 3D isotropic data of any scalar type.
Definition at line 58 of file cmtkUniformVolume.h.
typedef Superclass:: CoordinateRegionType cmtk::UniformVolume::CoordinateRegionType |
Region type.
Reimplemented from cmtk::Volume.
Reimplemented in cmtk::ImageTemplate< TPixelType >.
Definition at line 76 of file cmtkUniformVolume.h.
Index type.
Reimplemented from cmtk::Volume.
Reimplemented in cmtk::ImageTemplate< TPixelType >.
Definition at line 79 of file cmtkUniformVolume.h.
This class.
Reimplemented from cmtk::Volume.
Reimplemented in cmtk::ImageTemplate< TPixelType >.
Definition at line 64 of file cmtkUniformVolume.h.
Smart pointer to const UniformVolume.
Reimplemented from cmtk::DataGrid.
Reimplemented in cmtk::ImageTemplate< TPixelType >.
Definition at line 73 of file cmtkUniformVolume.h.
Smart pointer to UniformVolume.
Reimplemented from cmtk::Volume.
Reimplemented in cmtk::ImageTemplate< TPixelType >.
Definition at line 70 of file cmtkUniformVolume.h.
Superclass.
Reimplemented from cmtk::Volume.
Reimplemented in cmtk::ImageTemplate< TPixelType >.
Definition at line 67 of file cmtkUniformVolume.h.
virtual cmtk::UniformVolume::~UniformVolume | ( | ) | [inline, virtual] |
Destructor.
Definition at line 97 of file cmtkUniformVolume.h.
cmtk::UniformVolume::UniformVolume | ( | const UniformVolume & | other, |
const Types::Coordinate | resolution = 0 , |
||
const bool | allowUpsampling = false |
||
) |
Resample other volume to given resolution.
other | Original volume that will be resampled. |
resolution | Resolution of the newly created volume in world units. |
allowUpsampling | If true, then local upsampling is allowed in regions where the original image resolution (non-uniform) was coarser than the given resolution of the resampled volume. |
Definition at line 75 of file cmtkUniformVolume.cxx.
References GetHighResCropRegion(), m_Delta, cmtk::DataGrid::m_Dims, m_IndexToPhysicalMatrix, cmtk::MetaInformationObject::m_MetaInformation, cmtk::Volume::m_Offset, and cmtk::Volume::Size.
cmtk::UniformVolume::UniformVolume | ( | const DataGrid::IndexType & | dims, |
const Self::CoordinateVectorType & | size, | ||
TypedArray::SmartPtr & | data = TypedArray::SmartPtr::Null |
||
) |
Create uniform volume "from scratch".
dims | Number of grid elements for the three spatial dimensions. |
size | Size of the volume in real-world coordinates. |
data | An existing TypedArray containing the scalar voxel data. |
Definition at line 43 of file cmtkUniformVolume.cxx.
cmtk::UniformVolume::UniformVolume | ( | const DataGrid::IndexType & | dims, |
const Types::Coordinate | deltaX, | ||
const Types::Coordinate | deltaY, | ||
const Types::Coordinate | deltaZ, | ||
TypedArray::SmartPtr & | data = TypedArray::SmartPtr::Null |
||
) |
Create uniform volume "from scratch".
dims | Number of grid elements for the three spatial dimensions. |
deltaX | Pixel size in x direction. |
deltaY | Pixel size in y direction. |
deltaZ | Pixel size in z direction. |
data | An existing TypedArray containing the scalar voxel data. |
Definition at line 58 of file cmtkUniformVolume.cxx.
void cmtk::UniformVolume::ChangeCoordinateSpace | ( | const std::string & | newSpace ) | [virtual] |
Change volume coordinate space.
Re-arrange volume's direction vectors to refer to a different coordinate space.
Definition at line 70 of file cmtkUniformVolume_Space.cxx.
References cmtk::META_SPACE.
Self::SmartPtr cmtk::UniformVolume::Clone | ( | const bool | copyData ) | [inline] |
Create a physical copy of this object.
copyData | If true, the associated data array is also copied. |
Definition at line 163 of file cmtkUniformVolume.h.
Referenced by cmtk::ImageSymmetryPlaneFunctionalBase::ApplyThresholds(), cmtk::VoxelRegistration::ImagePreprocessor::GetProcessedImage(), cmtk::ImagePairRegistration::ImagePreprocessor::GetProcessedImage(), cmtk::VolumeFromFile::WriteAnalyzeHdr(), and cmtk::VolumeFromFile::WriteNifti().
Self::SmartPtr cmtk::UniformVolume::Clone | ( | ) | const [inline] |
Definition at line 168 of file cmtkUniformVolume.h.
Self::SmartPtr cmtk::UniformVolume::CloneGrid | ( | ) | const [inline] |
Create igsUniformObject with identical geometry but no data.
Definition at line 174 of file cmtkUniformVolume.h.
Referenced by cmtk::InverseInterpolationVolumeReconstruction< TInterpolator >::Interpolation(), cmtk::TransformChangeFromSpaceAffine::TransformChangeFromSpaceAffine(), cmtk::TransformChangeToSpaceAffine::TransformChangeToSpaceAffine(), and cmtk::VolumeInjectionReconstruction::VolumeInjectionReconstruction().
UniformVolume * cmtk::UniformVolume::CloneGridVirtual | ( | ) | const [protected, virtual] |
Virtual grid cloning constructor.
Definition at line 149 of file cmtkUniformVolume.cxx.
References m_IndexToPhysicalMatrix, cmtk::MetaInformationObject::m_MetaInformation, and cmtk::Volume::SetOffset().
UniformVolume * cmtk::UniformVolume::CloneVirtual | ( | const bool | copyData ) | [protected, virtual] |
Create a physical copy of this object.
copyData | If true, the associated data array is also copied. |
Definition at line 115 of file cmtkUniformVolume.cxx.
UniformVolume * cmtk::UniformVolume::CloneVirtual | ( | ) | const [protected, virtual] |
Definition at line 131 of file cmtkUniformVolume.cxx.
void cmtk::UniformVolume::CreateDefaultIndexToPhysicalMatrix | ( | ) | [virtual] |
Create a default index-to-physical transformation matrix.
The new matrix is the identity matrix with diagonal elements scaled according to pixel size.
Definition at line 43 of file cmtkUniformVolume_Space.cxx.
CoordinateVectorType& cmtk::UniformVolume::Deltas | ( | ) | [inline] |
Get pixel size vector.
Definition at line 91 of file cmtkUniformVolume.h.
const CoordinateVectorType& cmtk::UniformVolume::Deltas | ( | ) | const [inline] |
Get pixel size vector.
Definition at line 85 of file cmtkUniformVolume.h.
Referenced by cmtk::FilterVolume::GaussianFilter(), cmtk::operator<<(), cmtk::FilterVolume::RohlfingFilter(), cmtk::UniformVolumeInterpolatorBase::SetVolume(), and cmtk::FilterVolume::StudholmeFilter().
Self::SmartPtr cmtk::UniformVolume::ExtractSlice | ( | const int | axis, |
const int | plane | ||
) | const [inline] |
Extract orthogonal slice as a new volume.
Reimplemented from cmtk::DataGrid.
Definition at line 255 of file cmtkUniformVolume.h.
UniformVolume * cmtk::UniformVolume::ExtractSliceVirtual | ( | const int | axis, |
const int | plane | ||
) | const [private, virtual] |
Extract orthogonal slice as a new volume.
Reimplemented from cmtk::DataGrid.
Definition at line 345 of file cmtkUniformVolume.cxx.
Self::CoordinateVectorType cmtk::UniformVolume::GetCenterCropRegion | ( | ) | const [inline] |
Calculate volume center.
Definition at line 467 of file cmtkUniformVolume.h.
Referenced by cmtk::MakeInitialAffineTransformation::AlignDirectionVectors(), cmtk::MakeInitialAffineTransformation::AlignFieldsOfView(), and cmtk::QtTriplanarWindow::slotCenter().
virtual Self::CoordinateVectorType cmtk::UniformVolume::GetCenterOfMass | ( | ) | const [inline, virtual] |
Get center of mass of pixel data.
Definition at line 487 of file cmtkUniformVolume.h.
Referenced by cmtk::MakeInitialAffineTransformation::AlignCentersOfMass().
virtual Self::CoordinateVectorType cmtk::UniformVolume::GetCenterOfMass | ( | Self::CoordinateVectorType & | firstOrderMoment ) | const [inline, virtual] |
Get center of mass of pixel data.
Definition at line 496 of file cmtkUniformVolume.h.
virtual int cmtk::UniformVolume::GetClosestCoordIndex | ( | const int | axis, |
const Types::Coordinate | location | ||
) | const [inline, virtual] |
Get grid index corresponding (as close as possible) to coordinate.
axis | The coordinate axis that the location parameters refers to. |
location | The location along the selected coordinate axis in the range from 0 to Size[axis]. |
Definition at line 365 of file cmtkUniformVolume.h.
Referenced by cmtk::QtTriplanarWindow::slotMouse3D(), cmtk::QtTriplanarWindow::slotMouseAx(), cmtk::QtTriplanarWindow::slotMouseCo(), and cmtk::QtTriplanarWindow::slotMouseSa().
virtual bool cmtk::UniformVolume::GetClosestGridPointIndex | ( | const Self::CoordinateVectorType | v, |
int *const | xyz | ||
) | const [inline, virtual] |
Get grid index corresponding (as close as possible) to coordinate.
Definition at line 374 of file cmtkUniformVolume.h.
virtual int cmtk::UniformVolume::GetCoordIndex | ( | const int | axis, |
const Types::Coordinate | location | ||
) | const [inline, virtual] |
Get grid index of slice with highest coordinate smaller than given.
axis | The coordinate axis that the location parameters refers to. |
location | The location along the selected coordinate axis in the range from 0 to Size[axis]. |
Definition at line 356 of file cmtkUniformVolume.h.
virtual Types::Coordinate cmtk::UniformVolume::GetDelta | ( | const int | axis ) | const [inline, virtual] |
Get delta (pixel size) in one dimension.
Definition at line 180 of file cmtkUniformVolume.h.
UniformVolume * cmtk::UniformVolume::GetDownsampledAndAveraged | ( | const int | downsample, |
const bool | approxIsotropic = false |
||
) | const [virtual] |
Downsampling constructor function.
downsample | Downsampling factor. |
approxIsotropic | If this is set (default: off), then the downsample factors per dimension are adjusted so that the resulting output volume is as close to isotropic as possible without interpolation. |
Definition at line 159 of file cmtkUniformVolume.cxx.
UniformVolume * cmtk::UniformVolume::GetDownsampledAndAveraged | ( | const int(&) | downsample[3] ) | const [virtual] |
Downsampling constructor function.
downsample | Array of per-dimension downsampling factors. |
Reimplemented from cmtk::DataGrid.
Definition at line 177 of file cmtkUniformVolume.cxx.
References m_IndexToPhysicalMatrix, cmtk::MetaInformationObject::m_MetaInformation, SetHighResCropRegion(), and cmtk::Volume::SetOffset().
const cmtk::UniformVolume::CoordinateVectorType cmtk::UniformVolume::GetGradientAt | ( | const int | i, |
const int | j, | ||
const int | k | ||
) | [virtual] |
Get date gradient vector at pixel using central differences.
This function cannot be called for pixels on the volume boundaries, i.e., we require that 0 < i,j,k < [Dims[0]-1,Dims[1]-1,Dims[2]-1].
Definition at line 35 of file cmtkUniformVolume_Differential.cxx.
virtual const Self::CoordinateVectorType cmtk::UniformVolume::GetGridLocation | ( | const int | x, |
const int | y, | ||
const int | z | ||
) | const [inline, virtual] |
Get a grid location in image coordinates.
x,y,z | The indices of the intended grid element with respect to the three coordinate axes. Valid range is from 0 to Dims[...]-1. |
Definition at line 415 of file cmtkUniformVolume.h.
Referenced by cmtk::InverseInterpolationVolumeReconstruction< TInterpolator >::ComputeErrorGradientImage(), cmtk::WarpXform::GetInverseConsistencyError(), cmtk::SplineWarpXform::GetInverseConsistencyError(), cmtk::InverseInterpolationVolumeReconstruction< TInterpolator >::GetPassImageDependentPixelRegion(), cmtk::InverseInterpolationVolumeReconstruction< TInterpolator >::Interpolation(), cmtk::ReformatVolume::ReformatMasked(), cmtk::ReformatVolume::ReformatUnmasked(), and cmtk::VolumeInjectionReconstruction::VolumeInjectionIsotropic().
virtual const Self::CoordinateVectorType cmtk::UniformVolume::GetGridLocation | ( | const size_t | idx ) | const [inline, virtual] |
Get a grid coordinate by continuous pixel index.
This function directly calculates the grid location from the volume's grid deltas.
idx | The index of the intended grid element. Valid range is from 0 to (Dims[0]*Dims[1]*Dims[2])-1. |
Definition at line 439 of file cmtkUniformVolume.h.
const UniformVolume::RegionType cmtk::UniformVolume::GetGridRange | ( | const Self::CoordinateVectorType & | fromVOI, |
const Self::CoordinateVectorType & | toVOI | ||
) | const |
Get 3D grid region from continuous lower and upper corner.
Definition at line 282 of file cmtkUniformVolume.cxx.
void cmtk::UniformVolume::GetHessianAt | ( | Matrix3x3< Types::DataItem > & | H, |
const int | i, | ||
const int | j, | ||
const int | k | ||
) | [virtual] |
Get data Hessian matrix at pixel using central differences.
This function cannot be called for pixels within a two-pixel distance from the volume boundary, i.e., we require that 1 < i,j,k < [Dims[0]-2,Dims[1]-2,Dims[2]-2].
Definition at line 46 of file cmtkUniformVolume_Differential.cxx.
AffineXform::MatrixType cmtk::UniformVolume::GetImageToPhysicalMatrix | ( | ) | const [virtual] |
Get matrix that maps form image coordinates to physical space.
The returned matrix is computed by removing pixel size from the one stored in m_IndexToPhysicalMatrix.
Definition at line 109 of file cmtkUniformVolume_Space.cxx.
Referenced by cmtk::MakeInitialAffineTransformation::AlignDirectionVectors(), cmtk::SplineWarpXformITKIO::Write(), and cmtk::VolumeFromFile::WriteMetaImage().
UniformVolume * cmtk::UniformVolume::GetInterleavedPaddedSubVolume | ( | const int | axis, |
const int | factor, | ||
const int | idx | ||
) | const |
Get interleaved sub-volume along given axis and with given interleave offset, padded with empty image planes.
axis | Coordinate axis along which the image is interleaved. |
factor | Interleave factor, i.e., the number of interleaved sub-volumes. |
idx | Index of interleaved sub-volume to extract. |
Definition at line 259 of file cmtkUniformVolume.cxx.
References cmtk::DataGrid::CreateDataArray(), m_IndexToPhysicalMatrix, cmtk::MetaInformationObject::m_MetaInformation, cmtk::Volume::SetOffset(), and cmtk::DataGrid::SetOrthoSlice().
UniformVolume * cmtk::UniformVolume::GetInterleavedSubVolume | ( | const int | axis, |
const int | factor, | ||
const int | idx | ||
) | const |
Get interleaved sub-volume along given axis and with given interleave offset.
axis | Coordinate axis along which the image is interleaved. |
factor | Interleave factor, i.e., the number of interleaved sub-volumes. |
idx | Index of interleaved sub-volume to extract. |
Definition at line 213 of file cmtkUniformVolume.cxx.
References m_IndexToPhysicalMatrix, cmtk::MetaInformationObject::m_MetaInformation, cmtk::Volume::SetOffset(), and cmtk::DataGrid::SetOrthoSlice().
Referenced by cmtk::VolumeInjectionReconstruction::VolumeInjectionReconstruction().
virtual Types::Coordinate cmtk::UniformVolume::GetMaxDelta | ( | ) | const [inline, virtual] |
Get maximum grid spacing for all dimensions.
For each dimension, the maximum delta is retrieved by a call to the derived class's corresponding method.
Definition at line 198 of file cmtkUniformVolume.h.
virtual Types::Coordinate cmtk::UniformVolume::GetMinDelta | ( | ) | const [inline, virtual] |
Get minimum grid spacing for all dimensions.
For each dimension, the minimum delta is retrieved by a call to the derived class's corresponding method.
Definition at line 189 of file cmtkUniformVolume.h.
Referenced by cmtk::PlaneSource::GetMaxResolution(), cmtk::QtTriplanarWindow::slotSwitchImageAx(), cmtk::QtTriplanarWindow::slotSwitchImageCo(), and cmtk::QtTriplanarWindow::slotSwitchImageSa().
ScalarImage * cmtk::UniformVolume::GetNearestOrthoSlice | ( | const int | axis, |
const Types::Coordinate | location | ||
) | const [virtual] |
Return orthogonal slice by location.
This function looks up a given orthogonal slice location and returns the nearest slice from this volume.
Definition at line 358 of file cmtkUniformVolume.cxx.
std::string cmtk::UniformVolume::GetOrientationFromDirections | ( | ) | const |
Get anatomical orientation from space directions.
Definition at line 100 of file cmtkUniformVolume_Space.cxx.
References cmtk::META_SPACE.
ScalarImage * cmtk::UniformVolume::GetOrthoSlice | ( | const int | axis, |
const unsigned int | plane | ||
) | const [virtual] |
Return orthogonal slice.
This function calls its equivalent in DataGrid and adds calibration info (i.e., correct pixel sizes) to the resulting image.
Reimplemented from cmtk::DataGrid.
Definition at line 306 of file cmtkUniformVolume.cxx.
References cmtk::AXIS_X, cmtk::AXIS_Y, cmtk::AXIS_Z, and cmtk::ScalarImage::SetImageOrigin().
Referenced by cmtk::QtTriplanarWindow::slotSwitchImageAx(), cmtk::QtTriplanarWindow::slotSwitchImageCo(), and cmtk::QtTriplanarWindow::slotSwitchImageSa().
ScalarImage * cmtk::UniformVolume::GetOrthoSliceInterp | ( | const int | axis, |
const Types::Coordinate | location | ||
) | const [virtual] |
Return interpolated orthogonal slice.
This function calls its non-interpolating counterpart twice and performs a 1-D interpolation on the results to form the interpolated slice.
Definition at line 365 of file cmtkUniformVolume.cxx.
References cmtk::ScalarImage::GetImageOrigin(), and cmtk::ScalarImage::SetImageOrigin().
virtual Types::Coordinate cmtk::UniformVolume::GetPlaneCoord | ( | const int | axis, |
const int | plane | ||
) | const [inline, virtual] |
Get plane coordinate.
Definition at line 347 of file cmtkUniformVolume.h.
Referenced by cmtk::QtTriplanarWindow::slotSwitchImageAx(), cmtk::QtTriplanarWindow::slotSwitchImageCo(), cmtk::QtTriplanarWindow::slotSwitchImageSa(), and cmtk::VolumeInjectionReconstruction::VolumeInjectionAnisotropic().
void cmtk::UniformVolume::GetPrincipalAxes | ( | Matrix3x3< Types::Coordinate > & | directions, |
Self::CoordinateVectorType & | centerOfMass | ||
) | const |
Get principal axes.
Definition at line 410 of file cmtkUniformVolume.cxx.
References cmtk::AXIS_X, cmtk::AXIS_Y, cmtk::AXIS_Z, cmtk::Matrix3x3< T >::Determinant(), and cmtk::EigenSystemSymmetricMatrix3x3< TFloat >::GetNthEigenvector().
Referenced by cmtk::MakeInitialAffineTransformation::AlignPrincipalAxes().
const UniformVolume::SmartPtr cmtk::UniformVolume::GetReoriented | ( | const char * | newOrientation = AnatomicalOrientation::ORIENTATION_STANDARD ) |
const |
Get volume reoriented to a different anatomical axis alignment.
Reimplemented from cmtk::DataGrid.
Definition at line 52 of file cmtkUniformVolume_Space.cxx.
References cmtk::AnatomicalOrientation::PermutationMatrix::GetPermutedArray(), cmtk::AnatomicalOrientation::PermutationMatrix::GetPermutedMatrix(), and cmtk::META_IMAGE_ORIENTATION.
Referenced by cmtk::VolumeIO::Write(), and cmtk::VolumeFromFile::WriteAnalyzeHdr().
virtual int cmtk::UniformVolume::GetTruncCoordIndex | ( | const int | axis, |
const Types::Coordinate | location | ||
) | const [inline, virtual] |
Get grid index corresponding to coordinate by truncation, not rounding.
axis | The coordinate dimension that the location parameters refers to. |
location | The location in the range from 0 to Size[axis]. |
Definition at line 389 of file cmtkUniformVolume.h.
virtual bool cmtk::UniformVolume::GetTruncGridPointIndex | ( | const Self::CoordinateVectorType | v, |
int *const | xyz | ||
) | const [inline, virtual] |
Get grid index corresponding to coordinate by truncation, not rounding.
v | Location to find in the grid. |
xyz | Truncated grid point index (i.e., nearest grid point between location and grid coordinate origin. |
Definition at line 398 of file cmtkUniformVolume.h.
bool cmtk::UniformVolume::GridMatches | ( | const Self & | other ) | const [inline] |
Test whether this grid matches another one, i.e., has the same pixel sizes.
Reimplemented from cmtk::DataGrid.
Definition at line 125 of file cmtkUniformVolume.h.
virtual const Self::CoordinateVectorType cmtk::UniformVolume::IndexToPhysical | ( | const Self::CoordinateVectorType & | idxV ) | const [inline, virtual] |
Get a grid location in physical coordinates.
idxV | The index of the intended grid element with respect to the three coordinate axes. Valid range is from 0 to Dims[...]-1. Fractional coordinates are permitted. |
Definition at line 426 of file cmtkUniformVolume.h.
Referenced by cmtk::QtTriplanarWindow::UpdateGridInfo().
void cmtk::UniformVolume::Mirror | ( | const int | axis = AXIS_X ) |
[virtual] |
Mirror volume and associated data.
axis | Mirror with respect to this coordinate axis. |
Definition at line 296 of file cmtkUniformVolume.cxx.
virtual void cmtk::UniformVolume::SetCropRegion | ( | const Self::RegionType & | region ) | [inline, virtual] |
Catch calls to inherited SetCropRegion() and reset high-res crop region.
Reimplemented from cmtk::DataGrid.
Definition at line 458 of file cmtkUniformVolume.h.
References NULL.
friend class ResampleThreadInfo [friend] |
Give thread parameter class access to local types.
Definition at line 548 of file cmtkUniformVolume.h.
friend class VolumeAxesHash [friend] |
Make axes hash a friend.
Definition at line 543 of file cmtkUniformVolume.h.
friend class VolumeGridToGridLookup [friend] |
Grid grid-to-grid lookup friend.
Definition at line 546 of file cmtkUniformVolume.h.
friend class WarpXform [friend] |
Friend declaration of WarpXform class.
This allows direct access to Dims and Delta fields in RegisterVolumePoints member function of WarpXform.
Definition at line 540 of file cmtkUniformVolume.h.
Grid spacing for three dimensions.
Definition at line 82 of file cmtkUniformVolume.h.
Referenced by cmtk::AffineXformUniformVolume::AffineXformUniformVolume(), cmtk::DeblurringVolumeReconstruction< TPSF >::DeblurringVolumeReconstruction(), cmtk::DeviceUniformVolume::DeviceUniformVolume(), cmtk::SplineWarpXform::GetInverseConsistencyError(), cmtk::VolumeInjectionReconstruction::GuessInterleaveAxis(), cmtk::TransformedVolumeAxes::MakeHash(), cmtk::SplineWarpXformUniformVolume::RegisterVolume(), cmtk::SplineWarpXform::RegisterVolume(), UniformVolume(), cmtk::VolumeGridToGridLookup::VolumeGridToGridLookup(), and cmtk::VolumeFromFile::WriteMetaImage().
Optional high-resolution crop region.
If this is unset (i.e., a NULL pointer), then calls to GetHighResCropRegion() will simply convert the grid-based crop region.
Definition at line 534 of file cmtkUniformVolume.h.
Coordinate transformation from index to physical position.
This incorporates image axis directions and first pixel offset.
Definition at line 137 of file cmtkUniformVolume.h.
Referenced by CloneGridVirtual(), GetDownsampledAndAveraged(), GetInterleavedPaddedSubVolume(), GetInterleavedSubVolume(), cmtk::UniformDistanceMap< TDistanceDataType >::UniformDistanceMap(), UniformVolume(), and cmtk::VolumeFromFile::WriteNifti().