Commit abf96caa authored by remicres's avatar remicres

FIX: correct pixel memory footprint

parent a982ace7
......@@ -236,17 +236,17 @@ unsigned int Controller<TSegmenter>::GetNodeMemory()
// Get the memory occupied by the graph, normalize it by n*n
unsigned int memory = segmenter.GetGraphMemory() / (n*n);
itkDebugMacro(<<"Size of a node is " << memory);
itkWarningMacro(<<"Size of a node is " << memory);
// Get the memory occupied by one pixel of the image
unsigned int pixelMemory = sizeof(typename ImageType::PixelType)
+ sizeof(typename ImageType::InternalPixelType) * m_InputImage->GetNumberOfComponentsPerPixel();
unsigned int pixelMemory = sizeof(m_InputImage->GetBufferPointer())
* m_InputImage->GetNumberOfComponentsPerPixel();
itkDebugMacro(<<"Size of an image pixel is " << pixelMemory);
itkWarningMacro(<<"Size of an image pixel is " << pixelMemory);
memory += pixelMemory;
itkDebugMacro(<<"Size of a node+pixel is " << memory);
itkWarningMacro(<<"Size of a node+pixel is " << memory);
return memory;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment