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
9f8abd77
Commit
9f8abd77
authored
Aug 11, 2016
by
remicres
Browse files
ADD: implementation of the baatzSegmenter node memory computation
parent
3a0877d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/lsrmBaatzSegmenter.h
View file @
9f8abd77
...
...
@@ -94,6 +94,7 @@ namespace lsrm
float
ComputeMergingCost
(
NodePointerType
n1
,
NodePointerType
n2
);
void
UpdateSpecificAttributes
(
NodePointerType
n1
,
NodePointerType
n2
);
void
InitFromImage
();
unsigned
int
GetNodeMemory
(
unsigned
int
nEdges
);
};
}
// end of namespace lsrm
...
...
include/lsrmBaatzSegmenter.txx
View file @
9f8abd77
...
...
@@ -129,6 +129,21 @@ namespace lsrm
this->m_Complete = !prev_merged;
}
}
template<class TImage>
unsigned int
BaatzSegmenter<TImage>::GetNodeMemory(unsigned int nEdges)
{
unsigned int nBands = this->m_InputImage->GetNumberOfComponentsPerPixel();
long long unsigned int memory = 0;
memory += sizeof(NodePointerType); // size of the node pointer
memory += sizeof(NodeType); // size of the node
memory += 4 * nBands * sizeof(float); // size of the 4 attributes, multiplied by the nb. of bands
memory += nEdges * sizeof(EdgeType); // size of the edges
return memory;
}
} // end of namespace lsrm
#endif
...
...
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