非线性映射
typedef itk::SigmoidImageFilter <ImageType, ImageType> SigmoidImageFilterType;
SigmoidImageFilterType::Pointer sigmoidFilter = SigmoidImageFilterType::New();
sigmoidFilter->SetInput(imagedata);
sigmoidFilter->SetOutputMinimum(-1024);
sigmoidFilter->SetOutputMaximum(800);
sigmoidFilter->SetAlpha(100.0);
sigmoidFilter->SetBeta(150.0);
线性映射
#include "itkClampImageFilter.h"
typedef itk::ClampImageFilter< FloatImageType, UnsignedCharImageType > ClampFilterType;
ClampFilterType::Pointer clampFilter = ClampFilterType::New();
clampFilter->SetInput(image);
clampFilter->Update();
--------------------------------------------------------------------------------
#include "itkCastImageFilter.h"
typedef itk::CastImageFilter< FloatImageType, UnsignedCharImageType > CastFilterType;
CastFilterType::Pointer castFilter = CastFilterType::New();
castFilter->SetInput(reader->GetOutput());
--------------------------------------------------------------------------------
#include "itkRescaleIntensityImageFilter.h"
typedef itk::RescaleIntensityImageFilter< ImageType, ImageType > RescaleFilterType;
RescaleFilterType::Pointer rescaleFilter = RescaleFilterType::New();
rescaleFilter->SetInput(reader->GetOutput());
rescaleFilter->SetOutputMinimum(0);
rescaleFilter->SetOutputMaximum(255);
--------------------------------------------------------------------------------
itkShiftScaleImageFilter.h
typedef itk::ShiftScaleImageFilter< ImageType, ImageType > ScaleFilterType;
ScaleFilterType::Pointer shiftFliter= ScaleFilterType::New();
shiftFliter->SetInput(reader->GetOutput());
shiftFliter->SetScale(1.2);
shiftFliter->SetShift(25);
--------------------------------------------------------------------------------
#include "itkNormalizeImageFilter.h"
typedef itk::NormalizeImageFilter< FloatImageType, FloatImageType >
NormalizeFilterType;
NormalizeFilterType::Pointer normalizeFilter = NormalizeFilterType::New();
normalizeFilter->SetInput(reader->GetOutput());