#ifdef ENABLE_QUICKVIEW
#endif
static void
CreateImage(ImageType * const image);
int
main(int argc, char * argv[])
{
if (argc < 2)
{
CreateImage(image);
}
else
{
image = itk::ReadImage<ImageType>(argv[1]);
}
rescaleFilter->SetInput(image);
rescaleFilter->SetOutputMinimum(0);
rescaleFilter->SetOutputMaximum(255);
rescaleFilter->Update();
#ifdef ENABLE_QUICKVIEW
viewer.
AddImage(rescaleFilter->GetOutput());
#endif
return EXIT_SUCCESS;
}
void
CreateImage(ImageType * const image)
{
unsigned int NumRows = 200;
unsigned int NumCols = 300;
size[0] = NumRows;
size[1] = NumCols;
image->SetRegions(region);
image->Allocate();
for (unsigned int r = 40; r < 100; ++r)
{
for (unsigned int c = 40; c < 100; ++c)
{
pixelIndex[0] = r;
pixelIndex[1] = c;
image->SetPixel(pixelIndex, 15);
}
}
}