Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Cresson Remi
LSGRM
Commits
e0fe8022
Commit
e0fe8022
authored
Sep 02, 2016
by
remicres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: Use grm::GraphToOTBImage, and fix polygon re-ordering
parent
b4326671
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
include/lsgrmGraphOperations.txx
include/lsgrmGraphOperations.txx
+9
-0
include/lsgrmSegmenter.h
include/lsgrmSegmenter.h
+0
-1
No files found.
include/lsgrmGraphOperations.txx
View file @
e0fe8022
...
...
@@ -102,6 +102,13 @@ MergeAllGraphsAndAchieveSegmentation(
LabelImageIterator it(labelImage, labelImage->GetLargestPossibleRegion());
const typename TSegmenter::LabelImageType::InternalPixelType noDataLabel = 0;
typename TSegmenter::LabelImageType::InternalPixelType label = 1;
// Get the maximum label value
for(it.GoToBegin();!it.IsAtEnd(); ++it)
if (it.Get() > label)
label = it.Get();
// Compute LUT
vnl_vector<typename TSegmenter::LabelImageType::InternalPixelType> lut(label,noDataLabel);
for(it.GoToBegin();!it.IsAtEnd(); ++it)
{
...
...
@@ -112,6 +119,8 @@ MergeAllGraphsAndAchieveSegmentation(
label++;
}
}
// Apply LUT
for(it.GoToBegin();!it.IsAtEnd(); ++it)
it.Set(lut[it.Get()]);
...
...
include/lsgrmSegmenter.h
View file @
e0fe8022
...
...
@@ -21,7 +21,6 @@
#include "macro-generator.h"
#include "grmSegmenter.h"
#include "lsgrmGraphToOtbImage.h"
namespace
lsgrm
{
template
<
class
TSegmenterType
>
...
...
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