Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Cresson Remi
LSGRM
Commits
4904ba52
Commit
4904ba52
authored
Sep 01, 2016
by
remicres
Browse files
DOC: Add some TODO (improve memory print estimation)
parent
b10ece1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/lsgrmController.txx
View file @
4904ba52
...
...
@@ -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;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment