static void
int
main()
{
CreateImage(image);
subtractConstantFromImageFilter->SetInput(image);
subtractConstantFromImageFilter->SetConstant2(2);
subtractConstantFromImageFilter->Update();
itk::WriteImage(subtractConstantFromImageFilter->GetOutput(),
"output.png");
return EXIT_SUCCESS;
}
void
{
region.SetIndex(start);
image->SetRegions(region);
image->Allocate();
while (!imageIterator.IsAtEnd())
{
if (imageIterator.GetIndex()[0] < 70)
{
imageIterator.Set(255);
}
else
{
imageIterator.Set(0);
}
++imageIterator;
}
}