static void CreateImage(ImageType::Pointer image);
int main(int, char *[])
{
ImageType::Pointer image = ImageType::New();
CreateImage(image);
NormalizeToConstantImageFilterType::Pointer normalizeToConstantImageFilter = NormalizeToConstantImageFilterType::New();
normalizeToConstantImageFilter->SetInput(image);
normalizeToConstantImageFilter->SetConstant(1);
normalizeToConstantImageFilter->Update();
normalizeToConstantImageFilter->GetOutput()->GetLargestPossibleRegion());
while(!imageIterator.IsAtEnd())
{
std::cout << imageIterator.
Get() << std::endl;
++imageIterator;
}
return EXIT_SUCCESS;
}
static void CreateImage(ImageType::Pointer image)
{
image->SetRegions(region);
image->Allocate();
image->FillBuffer(1);
}