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;
InputImageType, OutputImageType >;
InputImageType, OutputImageType >;
InputImageType, OutputImageType >;
InputImageType, OutputImageType >;
ReaderType::Pointer reader = ReaderType::New();
CastFilterType::Pointer castFilter = CastFilterType::New();
RescaleFilterType::Pointer rescaleFilter = RescaleFilterType::New();
ShiftScaleFilterType::Pointer shiftFilter = ShiftScaleFilterType::New();
NormalizeFilterType::Pointer normalizeFilter = NormalizeFilterType::New();
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;
}