15 #ifndef itkMIDASHelper_h
16 #define itkMIDASHelper_h
20 #include <itkImageRegionIteratorWithIndex.h>
22 #include <itkImageRegionConstIterator.h>
24 #include <itkSpatialOrientationAdapter.h>
25 #include <itkSpatialOrientation.h>
26 #include <itkMatrix.h>
51 template <
class TImage>
61 template<
typename TPixel,
unsigned int VImageDimension>
65 const itk::Image<TPixel, VImageDimension>* itkImage,
73 template<
unsigned int VImageDimension>
77 const itk::Matrix<double, VImageDimension, VImageDimension>& directionMatrix,
111 template<
typename TPixel,
unsigned int VImageDimension>
115 const itk::Image<TPixel, VImageDimension>* itkImage,
123 template<
typename TPixel,
unsigned int VImageDimension>
127 const itk::Image<TPixel, VImageDimension>* itkImage,
137 template<
typename TPixel,
unsigned int VImageDimension>
141 const itk::Image<TPixel, VImageDimension>* itkImage,
149 template<
typename TPixel,
unsigned int VImageDimension>
157 #ifndef ITK_MANUAL_INSTANTIATION
158 #include "itkMIDASHelper.txx"
NIFTKITK_WINEXPORT ITK_EXPORT void GetUpDirectionFromITKImage(const itk::Image< TPixel, VImageDimension > *itkImage, const itk::Orientation orientation, int &upDirection)
Returns +1 or -1 (or 0 if unknown) to indicate which way from the centre of the volume is considered ...
GLdouble GLdouble z
Definition: glew.h:1543
NIFTKITK_WINEXPORT ITK_EXPORT void GetOrientationLabelFromITKImage(const itk::Image< TPixel, VImageDimension > *itkImage, std::string &label)
Get Image Orientation Label (Axial/Coronal/Sagittal) based on Direction Cosines of the input image...
NIFTKITK_WINEXPORT ITK_EXPORT void GetOrientationStringFromITKImage(const itk::Image< TPixel, VImageDimension > *itkImage, std::string &orientationString)
Gets the orientation string for a 3D image.
GLenum GLint GLuint mask
Definition: glew.h:1829
Orientation
Definition: itkMIDASHelper.h:35
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1236
Definition: niftkITKAffineResampleImage.cxx:74
std::string GetMajorAxisFromPatientRelativeDirectionCosine(double x, double y, double z)
Returns the orientation string based on the the major axis.
Definition: itkMIDASHelper.cxx:77
NIFTKITK_WINEXPORT ITK_EXPORT void LimitMaskByRegion(TImage *mask, typename TImage::RegionType ®ion, typename TImage::PixelType outValue)
Used to mask an image within a region.
NIFTKITK_WINEXPORT ITK_EXPORT void GetAxisFromITKImage(const itk::Image< TPixel, VImageDimension > *itkImage, const itk::Orientation orientation, int &outputAxis)
Returns the axis [0=x, 1=y, 2=z, -1=UNKNOWN] corresponding to the specified orientation for the given...
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
Definition: itkMIDASHelper.h:37
int GetAxisFromOrientationString(const std::string &orientationString, const itk::Orientation &orientation)
Works out the axis of interest from the orientationString (normally derived from direction cosines)...
Definition: itkMIDASHelper.cxx:21
Definition: itkMIDASHelper.h:36
GLint GLint GLint GLint GLint x
Definition: glew.h:1236
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:10629
NIFTKITK_WINEXPORT ITK_EXPORT void GetOrientationString(const itk::Matrix< double, VImageDimension, VImageDimension > &directionMatrix, std::string &orientationString)
Gets the orientation string from direction cosines, but only works for 3D.
NIFTKITK_WINEXPORT ITK_EXPORT void GetVolumeFromITKImage(const itk::Image< TPixel, VImageDimension > *itkImage, double &imageVolume)
Returns the volume (number of voxels * voxel volume), of the number of voxels above zero...
int GetUpDirection(const std::string &orientationString, const int &axisOfInterest)
Returns either +1, or -1 to indicate in which direction you should change the slice number to go "up"...
Definition: itkMIDASHelper.cxx:53
GLsizei const GLcharARB ** string
Definition: glew.h:5194
Definition: itkMIDASHelper.h:39
Definition: itkMIDASHelper.h:38