38 template <
typename TPixel,
unsigned int VImageDimension>
41 typedef typename itk::Image<TPixel, VImageDimension> FixedImageType;
42 typedef typename itk::Image<TPixel, VImageDimension> MovingImageType;
44 typedef float InternalPixelType;
45 typedef typename itk::Image<InternalPixelType, VImageDimension> InternalImageType;
46 typedef typename itk::CastImageFilter<FixedImageType, InternalImageType> FixedImageCasterType;
47 typedef typename itk::CastImageFilter<MovingImageType, InternalImageType> MovingImageCasterType;
48 typedef typename itk::HistogramMatchingImageFilter<InternalImageType, InternalImageType> MatchingFilterType;
53 if (fixedImage.IsNotNull() && movingImage.IsNotNull())
56 fixedImageCaster->SetInput(fixedImage);
58 movingImageCaster->SetInput(movingImage);
60 matcher->SetInput(movingImageCaster->GetOutput());
61 matcher->SetReferenceImage(fixedImageCaster->GetOutput());
void GenerateData2(const itk::Image< TPixel, VImageDimension > *itkImage1)
Template class to perform the histogram matching with any kind of image. Called by GenerateData()...
bool m_ThresholdAtMeanIntensity
void SetNumberOfMatchPoints(int matchPoints)
Sets the number of match points for the histogram generation.
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
itk::SmartPointer< const Self > ConstPointer
int m_NumberOfMatchPoints
void SetThresholdAtMeanIntensity(bool on)
Sets whether a threshold at mean intensity should be used for the histogram generation.
Image::Pointer m_ReferenceImage
HistogramMatching()
Default constructor.
void CastToMitkImage(const itk::SmartPointer< ItkOutputImageType > &itkimage, itk::SmartPointer< mitk::Image > &mitkoutputimage)
Cast an itk::Image (with a specific type) to an mitk::Image.
int m_NumberOfHistogramLevels
void MITKCORE_EXPORT CastToItkImage(const mitk::Image *mitkImage, itk::SmartPointer< ItkOutputImageType > &itkOutputImage)
Cast an mitk::Image to an itk::Image with a specific type.
OutputType * GetOutput()
Get the output data of this image source object.
virtual ~HistogramMatching()
Default destructor.
void SetNumberOfHistogramLevels(int histogrammLevels)
Sets the number of histogram levels for the histogram generation.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.