20 #include <itkNeighborhoodIterator.h>
21 #include <itkImageRegionIterator.h>
24 template <
typename TPixel,
unsigned int VImageDimension>
30 template <
typename TPixel,
unsigned int VImageDimension>
37 template <
typename TPixel,
unsigned int VImageDimension>
40 itk::ImageRegionIterator<ImageType> it_region(m_Image, m_Region);
43 for (it_region.GoToBegin(); !it_region.IsAtEnd(); ++it_region)
45 if (it_region.Value() == value)
53 template <
typename TPixel,
unsigned int VImageDimension>
56 itk::Size<3> regionSize = m_Region.GetSize();
57 double volume = regionSize[0] * regionSize[1] * regionSize[2];
59 double measurement = this->VoxelWithValue(value) / (volume - this->VoxelWithValue(0));
void SetImage(itk::Image< TPixel, VImageDimension > *)
double PercentageVoxelWithValueZeroExcluded(int value)
Gives back the percentage of the number of voxels with the chosen value in comparison to the number o...
void SetRegion(typename ImageType::RegionType)
int VoxelWithValue(int value)
Counts all voxels with the chosen value in the set region.