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 __itkRegionalMinimaImageFilter_h 00019 #define __itkRegionalMinimaImageFilter_h 00020 00021 #include "itkImageToImageFilter.h" 00022 00023 namespace itk 00024 { 00053 template< class TInputImage, class TOutputImage > 00054 class ITK_EXPORT RegionalMinimaImageFilter: 00055 public ImageToImageFilter< TInputImage, TOutputImage > 00056 { 00057 public: 00059 typedef RegionalMinimaImageFilter Self; 00060 typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass; 00061 typedef SmartPointer< Self > Pointer; 00062 typedef SmartPointer< const Self > ConstPointer; 00063 00065 typedef TInputImage InputImageType; 00066 typedef TOutputImage OutputImageType; 00067 typedef typename InputImageType::Pointer InputImagePointer; 00068 typedef typename InputImageType::ConstPointer InputImageConstPointer; 00069 typedef typename InputImageType::RegionType InputImageRegionType; 00070 typedef typename InputImageType::PixelType InputImagePixelType; 00071 typedef typename OutputImageType::Pointer OutputImagePointer; 00072 typedef typename OutputImageType::ConstPointer OutputImageConstPointer; 00073 typedef typename OutputImageType::RegionType OutputImageRegionType; 00074 typedef typename OutputImageType::PixelType OutputImagePixelType; 00075 00077 itkStaticConstMacro(InputImageDimension, unsigned int, 00078 TInputImage::ImageDimension); 00079 itkStaticConstMacro(OutputImageDimension, unsigned int, 00080 TOutputImage::ImageDimension); 00082 00084 itkNewMacro(Self); 00085 00087 itkTypeMacro(RegionalMinimaImageFilter, 00088 ImageToImageFilter); 00089 00096 itkSetMacro(FullyConnected, bool); 00097 itkGetConstReferenceMacro(FullyConnected, bool); 00098 itkBooleanMacro(FullyConnected); 00100 00105 itkSetMacro(ForegroundValue, OutputImagePixelType); 00106 itkGetConstMacro(ForegroundValue, OutputImagePixelType); 00108 00113 itkSetMacro(BackgroundValue, OutputImagePixelType); 00114 itkGetConstMacro(BackgroundValue, OutputImagePixelType); 00116 00121 itkSetMacro(FlatIsMinima, bool); 00122 itkGetConstMacro(FlatIsMinima, bool); 00123 itkBooleanMacro(FlatIsMinima); 00125 00126 #ifdef ITK_USE_CONCEPT_CHECKING 00127 00128 itkConceptMacro( InputHasPixelTraitsCheck, 00129 ( Concept::HasPixelTraits< InputImagePixelType > ) ); 00130 itkConceptMacro( InputHasNumericTraitsCheck, 00131 ( Concept::HasNumericTraits< InputImagePixelType > ) ); 00132 00134 #endif 00135 protected: 00136 RegionalMinimaImageFilter(); 00137 ~RegionalMinimaImageFilter() {} 00138 void PrintSelf(std::ostream & os, Indent indent) const; 00140 00144 void GenerateInputRequestedRegion(); 00145 00147 void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ); 00148 00151 void GenerateData(); 00152 00153 private: 00154 RegionalMinimaImageFilter(const Self &); //purposely not implemented 00155 void operator=(const Self &); //purposely not implemented 00156 00157 bool m_FullyConnected; 00158 bool m_FlatIsMinima; 00159 OutputImagePixelType m_ForegroundValue; 00160 OutputImagePixelType m_BackgroundValue; 00161 }; // end of class 00162 } // end namespace itk 00163 00164 #ifndef ITK_MANUAL_INSTANTIATION 00165 #include "itkRegionalMinimaImageFilter.hxx" 00166 #endif 00167 00168 #endif 00169