int
main(int, char *[])
{
using PixelType = ImageMaskSpatialObject::PixelType;
using ImageType = ImageMaskSpatialObject::ImageType;
region.SetIndex(index);
image->SetRegions(region);
image->Allocate(true);
insideRegion.SetSize(insideSize);
Iterator it(image, insideRegion);
it.GoToBegin();
while (!it.IsAtEnd())
{
++it;
}
maskSO->SetImage(image);
maskSO->Update();
auto inside = itk::MakeFilled<ImageMaskSpatialObject::PointType>(20);
std::cout << "Is my point " << inside << " inside my mask? "
<< maskSO->IsInsideInWorldSpace(inside) << std::endl;
auto outside = itk::MakeFilled<ImageMaskSpatialObject::PointType>(45);
std::cout << "Is my point " << outside << " outside my mask? "
<< !maskSO->IsInsideInWorldSpace(outside) << std::endl;
return EXIT_SUCCESS;
}