Commit 628f5b5b authored by Manuel Grizonnet's avatar Manuel Grizonnet

Automated merge with http://hg.orfeo-toolbox.org/OTB

parents 4d4bc36c b41279b9
...@@ -46,9 +46,8 @@ int main(int argc, char * argv[]) ...@@ -46,9 +46,8 @@ int main(int argc, char * argv[])
if( argc != 3) if( argc != 3)
{ {
std::cerr << "usage: " << argv[0] << " input foreground" << std::endl; std::cerr << "usage: " << argv[0] << " input outputcentroidlist" << std::endl;
// std::cerr << " : " << std::endl; return EXIT_FAILURE;
exit(1);
} }
// read the input image // read the input image
...@@ -85,7 +84,7 @@ int main(int argc, char * argv[]) ...@@ -85,7 +84,7 @@ int main(int argc, char * argv[])
// the label objects. If the labels are not consecutive, the GetNthLabelObject() method must be // the label objects. If the labels are not consecutive, the GetNthLabelObject() method must be
// use instead of GetLabelObject(), or an iterator on the label // use instead of GetLabelObject(), or an iterator on the label
// object container of the label map. // object container of the label map.
std::ofstream outfile(argv[2]); std::ofstream outfile( argv[2] );
LabelMapType::Pointer labelMap = shape->GetOutput(); LabelMapType::Pointer labelMap = shape->GetOutput();
...@@ -95,10 +94,9 @@ int main(int argc, char * argv[]) ...@@ -95,10 +94,9 @@ int main(int argc, char * argv[])
// in the label map. // in the label map.
const LabelObjectType * labelObject = labelMap->GetLabelObject( label ); const LabelObjectType * labelObject = labelMap->GetLabelObject( label );
outfile << label << "\t" << labelObject->GetPhysicalSize() << "\t" << labelObject->GetCentroid() << std::endl; outfile << label << "\t" << labelObject->GetPhysicalSize() << "\t" << labelObject->GetCentroid() << std::endl;
} }
outfile.close(); outfile.close();
return 0; return EXIT_SUCCESS;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment