/*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkUnaryRetractImageFilter.h,v $ Language: C++ Date: $Date: 2007/02/05 11:15:00 $ Version: $Revision: 1.0 $ Copyright (c) Insight Software Consortium. All rights reserved. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef __itkUnaryRetractImageFilter_h #define __itkUnaryRetractImageFilter_h #include "itkImageToImageFilter.h" namespace itk { /** \class UnaryRetractImageFilter * \brief Implements generic retraction of a nD time series producing a n-1D output. * * Contributed by Stefan Roettger, Siemens Medical MR, Mar. 2007 * * This class interpretes the input image as a time series and * generates an output image of the next lower dimension. * The retraction operation is specified by a functor style template parameter. * It receives the time curves of each pixel and produces a single scalar value * effectively removing the time dimension of the input image. * For example, a 4D times series (generated by the itkNaryElevateImageFilter) * will be transformed into a 3D output image by applying the functor to each pixel. * * A typical times series produced in clinical practice is a MR breast angiography. * Gadolinium contrast agent is infused and T1-weighted 3D MR-images are taken every minute. * The procedure usually generates 5-10 time points which show the perfusion of the breast tissue. * The itkNaryElevateImageFilter can be used to a single 4D image from the original 3D breast images. * After this, the itkUnaryRetractFilter can be used to calculate certain characteristics of * the time curves which give insight into the malignancy of the breast tissue. * Characteristic functor operations are MIPt (Maximum Intensity [Projection] over time) and * WI (Wash-In or temporal derivative), for example. * A tumor usually shows higher WI values than normal tissue, so that this parameter * (amongst a variety of others) can be used to diagnose breast cancer. * * \ingroup IntensityImageFilters Multithreaded */ template class ITK_EXPORT UnaryRetractImageFilter: public ImageToImageFilter { public: /** Standard class typedefs. */ typedef UnaryRetractImageFilter Self; typedef ImageToImageFilter Superclass; typedef SmartPointer Pointer; typedef SmartPointer ConstPointer; /** Method for creation through the object factory. */ itkNewMacro(Self); /** Run-time type information (and related methods). */ itkTypeMacro(UnaryRetractImageFilter, ImageToImageFilter); /** Some typedefs. */ typedef TFunction FunctorType; typedef TInputImage InputImageType; typedef typename InputImageType::Pointer InputImagePointer; typedef typename InputImageType::RegionType InputImageRegionType; typedef typename InputImageType::PixelType InputImagePixelType; typedef typename InputImageType::SizeType InputImageSizeType; typedef typename InputImageType::IndexType InputImageIndexType; typedef typename InputImageType::PointType InputImageOriginType; typedef typename InputImageType::SpacingType InputImageSpacingType; typedef TOutputImage OutputImageType; typedef typename OutputImageType::Pointer OutputImagePointer; typedef typename OutputImageType::RegionType OutputImageRegionType; typedef typename OutputImageType::PixelType OutputImagePixelType; typedef typename OutputImageType::SizeType OutputImageSizeType; typedef typename OutputImageType::IndexType OutputImageIndexType; typedef typename OutputImageType::PointType OutputImageOriginType; typedef typename OutputImageType::SpacingType OutputImageSpacingType; typedef Array NaryArrayType; /** ImageDimension constants. */ itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension); itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); // get the actual functor FunctorType& GetFunctor() {return m_Functor;} // set the actual functor void SetFunctor(FunctorType& functor) { m_Functor = functor; this->Modified(); } protected: UnaryRetractImageFilter(); virtual ~UnaryRetractImageFilter() {}; void GenerateOutputInformation(); void GenerateData(); private: UnaryRetractImageFilter(const Self&); // intentionally not implemented void operator=(const Self&); // intentionally not implemented FunctorType m_Functor; }; } #ifndef ITK_MANUAL_INSTANTIATION #include "itkUnaryRetractImageFilter.txx" #endif #endif