Commit 4904ba52 authored by remicres's avatar remicres

DOC: Add some TODO (improve memory print estimation)

parent b10ece1b
......@@ -209,7 +209,9 @@ void Controller<TSegmenter>::RunSegmentation()
/*
* Compute the memory occupied by one node
* TODO: compute the exact value
* TODO: compute the exact value, e.g. experimental measures shows that
* for one Baatz node (+pixel) memory is about 700-730 bytes...
* And our estimation is of 456!
*/
template<class TSegmenter>
unsigned int Controller<TSegmenter>::GetNodeMemory()
......@@ -234,7 +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();
itkWarningMacro(<<"Size of an image pixel is " << pixelMemory);
memory += pixelMemory;
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