int
main(int argc, char * argv[])
{
if (argc < 2)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImageFile " << std::endl;
return EXIT_FAILURE;
}
using InputPixelType = unsigned char;
using OutputPixelType = float;
using CastFilterType =
using RescaleFilterType =
using ShiftScaleFilterType =
using NormalizeFilterType =
reader->SetFileName(argv[1]);
castFilter->SetInput(reader->GetOutput());
shiftFilter->SetInput(reader->GetOutput());
rescaleFilter->SetInput(reader->GetOutput());
normalizeFilter->SetInput(reader->GetOutput());
rescaleFilter->SetOutputMinimum(10);
rescaleFilter->SetOutputMaximum(250);
shiftFilter->SetScale(1.2);
shiftFilter->SetShift(25);
castFilter->Update();
shiftFilter->Update();
rescaleFilter->Update();
normalizeFilter->Update();
return EXIT_SUCCESS;
}
Casts input pixels to output pixel type.
Data source that reads image data from a single file.
Templated n-dimensional image class.
Normalize an image by setting its mean to zero and variance to one.
Applies a linear transformation to the intensity levels of the input Image.
Shift and scale the pixels in an image.