|
Slicer 4.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkLMMSEVectorImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2006/03/29 14:53:40 $ 00007 Version: $Revision: 1.5 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkLMMSEVectorImageFilter_h 00018 #define __itkLMMSEVectorImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkImage.h" 00022 #include "itkVectorImage.h" 00023 #include "itkVectorImageCastFilter.h" 00024 #include "itkLMMSEVectorImageFilterStep.h" 00025 #include "itkExtractVolumeFilter.h" 00026 #include "itkComputeStatisticsWherePositiveFilter.h" 00027 #include "itkComputeRestrictedHistogram.h" 00028 #include "itkMaskedMeanImageFilter.h" 00029 namespace itk 00030 { 00041 template <class TInputImage, class TOutputImage> 00042 class ITK_EXPORT LMMSEVectorImageFilter : public ImageToImageFilter<TInputImage, TOutputImage> 00043 { 00044 public: 00046 typedef TInputImage InputImageType; 00047 typedef TOutputImage OutputImageType; 00048 00050 typedef LMMSEVectorImageFilter Self; 00051 typedef ImageToImageFilter<InputImageType, OutputImageType> Superclass; 00052 typedef SmartPointer<Self> Pointer; 00053 typedef SmartPointer<const Self> ConstPointer; 00054 00055 typedef typename OutputImageType::Pointer OutputImagePointer; 00056 typedef typename InputImageType::Pointer InputImagePointer; 00057 typedef typename InputImageType::ConstPointer InputImageConstPointer; 00058 00060 typedef itk::VectorImage<float, TInputImage::ImageDimension> InternalImageType; 00061 typedef typename InternalImageType::Pointer InternalImagePointer; 00062 typedef typename InternalImageType::ConstPointer InternalImageConstPointer; 00063 00065 itkNewMacro( Self ); 00066 00068 itkTypeMacro( LMMSEVectorImageFilter, ImageToImageFilter ); 00069 00071 typedef typename InputImageType::PixelType InputPixelType; 00072 typedef typename OutputImageType::PixelType OutputPixelType; 00073 00074 typedef typename InputImageType::RegionType InputImageRegionType; 00075 typedef typename OutputImageType::RegionType OutputImageRegionType; 00076 typedef typename InputImageType::SizeType InputSizeType; 00077 00078 typedef LMMSEVectorImageFilterStep<InternalImageType, InternalImageType> LMMSEStepType; 00079 typedef typename LMMSEStepType::Pointer LMMSEStepPointer; 00080 00082 typedef itk::VectorImageCastFilter<InputImageType, InternalImageType> InputCastType; 00083 typedef typename InputCastType::Pointer InputCastPointer; 00084 typedef itk::VectorImageCastFilter<InternalImageType, OutputImageType> OutputCastType; 00085 typedef typename OutputCastType::Pointer OutputCastPointer; 00086 typedef float ScalarPixelType; 00087 typedef itk::Image<ScalarPixelType, TInputImage::ImageDimension> ScalarImageType; 00088 typedef itk::ExtractVolumeFilter<InternalImageType, ScalarImageType> ExtractType; 00089 typedef typename ExtractType::Pointer ExtractPointer; 00090 typedef itk::MaskedMeanImageFilter<ScalarImageType, ScalarImageType> LocalMeanType; 00091 typedef typename LocalMeanType::Pointer LocalMeanPointer; 00092 typedef itk::ComputeStatisticsWherePositiveFilter<ScalarImageType, ScalarImageType> StatsType; 00093 typedef typename StatsType::Pointer StatsPointer; 00094 typedef itk::ComputeRestrictedHistogram<ScalarImageType, ScalarImageType> HistogramType; 00095 typedef typename HistogramType::Pointer HistogramPointer; 00096 00098 itkSetMacro( RadiusFiltering, InputSizeType ); 00099 itkSetMacro( RadiusEstimation, InputSizeType ); 00100 itkGetConstReferenceMacro(RadiusFiltering, InputSizeType); 00101 itkGetConstReferenceMacro(RadiusEstimation, InputSizeType); 00102 00104 itkSetMacro( Iterations, unsigned int ); 00105 itkGetMacro( Iterations, unsigned int ); 00106 00108 itkSetMacro( FirstBaseline, unsigned int ); 00109 itkGetMacro( FirstBaseline, unsigned int ); 00110 00112 itkSetMacro( MaximumNumberOfBins, unsigned long ); 00113 itkGetMacro( MaximumNumberOfBins, unsigned long ); 00114 00116 itkSetMacro( UseAbsoluteValue, bool ); 00117 itkBooleanMacro( UseAbsoluteValue ); 00118 itkGetMacro( KeepValue, bool ); 00119 itkSetMacro( KeepValue, bool ); 00120 itkBooleanMacro( KeepValue ); 00121 00123 itkSetMacro( MinimumNoiseSTD, double ); 00124 itkGetMacro( MinimumNoiseSTD, double ); 00125 itkSetMacro( MaximumNoiseSTD, double ); 00126 itkGetMacro( MaximumNoiseSTD, double ); 00127 00129 itkSetMacro(MinimumNumberOfUsedVoxelsEstimation, int ); 00130 itkSetMacro(MinimumNumberOfUsedVoxelsFiltering, int ); 00131 itkGetMacro(MinimumNumberOfUsedVoxelsEstimation, int ); 00132 itkGetMacro(MinimumNumberOfUsedVoxelsFiltering, int ); 00133 00135 itkSetMacro(HistogramResolutionFactor, double ); 00136 itkGetMacro(HistogramResolutionFactor, double ); 00137 00138 itkSetMacro( Channels, unsigned int ); 00139 itkGetConstReferenceMacro( Channels, unsigned int ); 00140 00142 virtual void GenerateInputRequestedRegion() 00143 throw (InvalidRequestedRegionError); 00144 00145 protected: 00146 LMMSEVectorImageFilter(); 00147 virtual ~LMMSEVectorImageFilter() 00148 { 00149 } 00150 void GenerateData(); 00151 00152 void PrintSelf( std::ostream& os, Indent indent) const; 00153 00154 private: 00155 LMMSEVectorImageFilter(const Self &); // purposely not implemented 00156 void operator=(const Self &); // purposely not implemented 00157 00158 InputSizeType m_RadiusEstimation; 00159 InputSizeType m_RadiusFiltering; 00160 unsigned int m_Iterations; 00161 bool m_UseAbsoluteValue; 00162 bool m_KeepValue; 00163 00164 int m_MinimumNumberOfUsedVoxelsEstimation; 00165 int m_MinimumNumberOfUsedVoxelsFiltering; 00166 00167 double m_MinimumNoiseSTD; 00168 double m_MaximumNoiseSTD; 00169 00170 unsigned int m_FirstBaseline; 00171 double m_HistogramResolutionFactor; 00172 00173 unsigned int m_Channels; 00174 unsigned long m_MaximumNumberOfBins; 00175 }; 00176 00177 } // end namespace itk 00178 00179 #ifndef ITK_MANUAL_INSTANTIATION 00180 #include "itkLMMSEVectorImageFilter.txx" 00181 #endif 00182 00183 #endif
1.7.4