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
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
b41279b9
Commit
b41279b9
authored
Jan 07, 2010
by
OTB Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DOC:completed ShapeAttributeComputation
parent
7c063ee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
Examples/OBIA/ShapeAttributeComputation.cxx
Examples/OBIA/ShapeAttributeComputation.cxx
+4
-6
No files found.
Examples/OBIA/ShapeAttributeComputation.cxx
View file @
b41279b9
...
...
@@ -46,9 +46,8 @@ int main(int argc, char * argv[])
if
(
argc
!=
3
)
{
std
::
cerr
<<
"usage: "
<<
argv
[
0
]
<<
" input foreground"
<<
std
::
endl
;
// std::cerr << " : " << std::endl;
exit
(
1
);
std
::
cerr
<<
"usage: "
<<
argv
[
0
]
<<
" input outputcentroidlist"
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
// read the input image
...
...
@@ -85,7 +84,7 @@ int main(int argc, char * argv[])
// the label objects. If the labels are not consecutive, the GetNthLabelObject() method must be
// use instead of GetLabelObject(), or an iterator on the label
// object container of the label map.
std
::
ofstream
outfile
(
argv
[
2
]);
std
::
ofstream
outfile
(
argv
[
2
]
);
LabelMapType
::
Pointer
labelMap
=
shape
->
GetOutput
();
...
...
@@ -95,10 +94,9 @@ int main(int argc, char * argv[])
// in the label map.
const
LabelObjectType
*
labelObject
=
labelMap
->
GetLabelObject
(
label
);
outfile
<<
label
<<
"
\t
"
<<
labelObject
->
GetPhysicalSize
()
<<
"
\t
"
<<
labelObject
->
GetCentroid
()
<<
std
::
endl
;
}
outfile
.
close
();
return
0
;
return
EXIT_SUCCESS
;
}
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