ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkMaskedRankImageFilter_h 00019 #define __itkMaskedRankImageFilter_h 00020 00021 #include "itkMaskedMovingHistogramImageFilter.h" 00022 #include <list> 00023 #include <map> 00024 #include <set> 00025 #include "itkRankHistogram.h" 00026 #include "itkFlatStructuringElement.h" 00027 00028 namespace itk 00029 { 00064 template< class TInputImage, class TMaskImage, class TOutputImage, class TKernel = 00065 FlatStructuringElement< ::itk::GetImageDimension< TInputImage >::ImageDimension > > 00066 class ITK_EXPORT MaskedRankImageFilter: 00067 public MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, 00068 Function::RankHistogram< typename TInputImage::PixelType > > 00069 { 00070 public: 00072 typedef MaskedRankImageFilter Self; 00073 typedef MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, 00074 Function::RankHistogram< typename TInputImage::PixelType > > Superclass; 00075 00076 typedef SmartPointer< Self > Pointer; 00077 typedef SmartPointer< const Self > ConstPointer; 00078 00080 itkNewMacro(Self); 00081 00083 itkTypeMacro(MaskedRankImageFilter, 00084 MovingHistogramImageFilter); 00085 00087 typedef TInputImage InputImageType; 00088 typedef TOutputImage OutputImageType; 00089 typedef typename TInputImage::RegionType RegionType; 00090 typedef typename TInputImage::SizeType SizeType; 00091 typedef typename TInputImage::IndexType IndexType; 00092 typedef typename TInputImage::PixelType PixelType; 00093 typedef typename TInputImage::OffsetType OffsetType; 00094 typedef typename Superclass::OutputImageRegionType OutputImageRegionType; 00095 typedef typename TOutputImage::PixelType OutputPixelType; 00096 typedef typename TInputImage::PixelType InputPixelType; 00097 00098 typedef typename Superclass::HistogramType HistogramType; 00099 00101 itkStaticConstMacro(ImageDimension, unsigned int, 00102 TInputImage::ImageDimension); 00103 00105 typedef TKernel KernelType; 00106 00108 typedef typename KernelType::ConstIterator KernelIteratorType; 00109 00111 typedef typename KernelType::SizeType RadiusType; 00112 00113 itkSetMacro(Rank, float) 00114 itkGetConstMacro(Rank, float) 00115 00116 bool GetUseVectorBasedAlgorithm() 00117 { 00118 return HistogramType::UseVectorBasedAlgorithm(); 00119 } 00120 00121 protected: 00122 MaskedRankImageFilter(); 00123 ~MaskedRankImageFilter() {} 00124 00125 void PrintSelf(std::ostream & os, Indent indent) const; 00126 00127 void ConfigureHistogram( HistogramType & histogram ); 00128 00129 private: 00130 MaskedRankImageFilter(const Self &); //purposely not implemented 00131 void operator=(const Self &); //purposely not implemented 00132 00133 float m_Rank; 00134 }; // end of class 00135 } // end namespace itk 00136 00137 #ifndef ITK_MANUAL_INSTANTIATION 00138 #include "itkMaskedRankImageFilter.hxx" 00139 #endif 00140 00141 #endif 00142