MCPcopy Create free account
hub / github.com/MITK/MITK / ComputeVolume

Method ComputeVolume

Modules/Core/src/Algorithms/mitkVolumeCalculator.cpp:58–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void mitk::VolumeCalculator::ComputeVolume()
59{
60 const_cast<Image *>(m_Image.GetPointer())->SetRequestedRegionToLargestPossibleRegion();
61 if (m_Image->GetDimension() == 4)
62 {
63 m_TimeSelector->SetInput(m_Image);
64 m_Volumes.resize(m_Image->GetDimension(3));
65 for (unsigned int timeStep = 0; timeStep < m_Image->GetDimension(3); ++timeStep)
66 {
67 m_TimeSelector->SetTimeNr(timeStep);
68 m_TimeSelector->Update();
69 AccessFixedDimensionByItk(m_TimeSelector->GetOutput(), InternalCompute, 3);
70 m_Volumes[timeStep] = m_Volume;
71 }
72 }
73 else if (m_Image->GetDimension() == 3)
74 {
75 const_cast<Image *>(m_Image.GetPointer())->Update();
76 AccessFixedDimensionByItk(m_Image, InternalCompute, 3);
77 }
78 else if (m_Image->GetDimension() == 2)
79 {
80 const_cast<Image *>(m_Image.GetPointer())->Update();
81 AccessFixedDimensionByItk(m_Image, InternalCompute, 2);
82 }
83}
84
85void mitk::VolumeCalculator::ComputeVolumeFromImageStatistics()
86{

Callers 3

OnCalculateVolumeMethod · 0.80
mitkVolumeCalculatorTestFunction · 0.80

Calls 6

GetPointerMethod · 0.80
GetDimensionMethod · 0.45
SetInputMethod · 0.45
UpdateMethod · 0.45
GetOutputMethod · 0.45

Tested by 1

mitkVolumeCalculatorTestFunction · 0.64