#if ITK_VERSION_MAJOR >= 4
#else
#endif
static void OutputImage(ImageType::Pointer image);
int main( int, char *[])
{
ImageType::Pointer image = ImageType::New();
image->SetRegions(region);
image->Allocate();
image->FillBuffer(2);
OutputImage(image);
#if ITK_VERSION_MAJOR >= 4
#else
#endif
MultiplyImageFilterType::Pointer multiplyImageFilter = MultiplyImageFilterType::New();
multiplyImageFilter->SetInput(image);
#if ITK_VERSION_MAJOR >= 4
multiplyImageFilter->SetConstant(3);
#else
multiplyImageFilter->Update();
#endif
OutputImage(multiplyImageFilter->GetOutput());
return EXIT_SUCCESS;
}
void OutputImage(ImageType::Pointer image)
{
while(!imageIterator.IsAtEnd())
{
unsigned char val = imageIterator.
Get();
std::cout << (int)val << std::endl;
++imageIterator;
}
}