NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Namespaces | Functions
niftkImageUtils.h File Reference

Some useful MIDAS related image utilities, such as working out the As Acquired orientation, volumes etc. More...

Include dependency graph for niftkImageUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 niftk
 

Functions

template<typename TPixel , unsigned int VImageDimension>
void niftk::ITKGetAsAcquiredOrientation (const itk::Image< TPixel, VImageDimension > *itkImage, ImageOrientation &outputOrientation)
 ITK method that given an image, returns the ImageOrientation for the XY plane. More...
 
ImageOrientation niftk::GetAsAcquiredOrientation (ImageOrientation defaultOrientation, const mitk::Image *image)
 Returns the ImageOrientation corresponding to the XY plane, or else returns the supplied default. More...
 
bool niftk::IsImage (const mitk::DataNode *node)
 Simply returns true if a node contains an image, and false otherwise. More...
 
template<typename TPixel , unsigned int VImageDimension>
void niftk::ITKImagesHaveEqualIntensities (const itk::Image< TPixel, VImageDimension > *itkImage, const mitk::Image *image2, bool &output)
 
bool niftk::ImagesHaveEqualIntensities (const mitk::Image *image1, const mitk::Image *image2)
 Utility method that compares if images have the same intensity values. More...
 
template<typename TPixel , unsigned int VImageDimension>
void niftk::ITKImagesHaveSameSpatialExtent (const itk::Image< TPixel, VImageDimension > *itkImage, const mitk::Image *image2, bool &output)
 
bool niftk::ImagesHaveSameSpatialExtent (const mitk::Image *image1, const mitk::Image *image2)
 Utility method that compares if images have the same spatial extent. More...
 
template<typename TPixel , unsigned int VImageDimension>
void niftk::ITKFillImage (itk::Image< TPixel, VImageDimension > *itkImage, float &value)
 
void niftk::FillImage (mitk::Image *image, float value)
 Simply iterates through a whole image, filling it with the specified value which is cast to the appropriate pixel type. More...
 
template<typename TPixel , unsigned int VImageDimension>
void niftk::ITKCountBetweenThreshold (const itk::Image< TPixel, VImageDimension > *itkImage, const float &lower, const float &upper, unsigned long int &outputCount)
 
NIFTKCORE_EXPORT unsigned long int niftk::CountBetweenThreshold (const mitk::Image *image, float lower, float upper)
 Simply iterates through a whole image, counting how many intensity values are >= lower and <= upper. More...
 
unsigned long int niftk::GetNumberOfVoxels (const mitk::Image *image)
 Returns the number of voxels in an image. More...
 
mitk::Point3D niftk::GetMiddlePointInVoxels (const mitk::Image *image)
 Returns the middle voxel of an image. More...
 
double niftk::GetVolume (const mitk::Image *image)
 Returns the volume of non-zero voxels in an image. More...
 
void niftk::UpdateVolumeProperty (const mitk::Image *image, mitk::DataNode *node)
 Calculates the volume of non-zero voxels in image, and creates a property "midas.volume" on the data node. More...
 
template<typename TPixel1 , unsigned int VImageDimension1, typename TPixel2 , unsigned int VImageDimension2>
void niftk::ITKCopyIntensityData (const itk::Image< TPixel1, VImageDimension1 > *itkImage1, itk::Image< TPixel2, VImageDimension2 > *itkImage2)
 ITK function to copy image data, performing C-style casting between data types. More...
 
void niftk::CopyIntensityData (const mitk::Image *input, mitk::Image *output)
 Assumes same size image, and same data type, and copies data from the input image to the output image. More...
 
template<typename TPixel , unsigned int VImageDimension>
void niftk::ITKDumpImage (const itk::Image< TPixel, VImageDimension > *itkImage, const std::string &filename)
 Writes the image to file. More...
 
void niftk::DumpImage (const mitk::Image *input, const std::string &fileName)
 Writes the image to file. More...
 
mitk::Vector3D niftk::GetXYAspectRatio (const mitk::Image::Pointer image)
 Utility method to calculate the aspect ratio. More...
 

Detailed Description

Some useful MIDAS related image utilities, such as working out the As Acquired orientation, volumes etc.