diff --git a/include/lsgrmController.txx b/include/lsgrmController.txx index 33fd537af4c6d93a02c9b9c09d335b4488e3232c..6683cf96f9de6abdbf8e15480d76f3c71e0076ff 100644 --- a/include/lsgrmController.txx +++ b/include/lsgrmController.txx @@ -209,7 +209,9 @@ void Controller::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 unsigned int Controller::GetNodeMemory() @@ -234,7 +236,17 @@ unsigned int Controller::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; }