int main( int argc, char * argv [] )
{
if ( argc < 2 )
{
std::cerr << "Missing Parameters " << std::endl;
std::cerr << "Usage: " << argv[0];
std::cerr << " inputBinaryImageFile ";
return EXIT_FAILURE;
}
using ImageType = ImageMaskSpatialObject::ImageType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName( argv[1] );
try
{
reader->Update();
}
{
std::cerr << excp << std::endl;
return EXIT_FAILURE;
}
ImageMaskSpatialObject::Pointer maskSO = ImageMaskSpatialObject::New();
maskSO->SetImage ( reader->GetOutput() );
maskSO->Update();
std::cout << "Bounding Box Region: "
<< maskSO->GetMyBoundingBoxInWorldSpace()->GetBounds() << std::endl;
return EXIT_SUCCESS;
}