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 __itkBinaryMorphologicalClosingImageFilter_h 00019 #define __itkBinaryMorphologicalClosingImageFilter_h 00020 00021 #include "itkKernelImageFilter.h" 00022 00023 namespace itk 00024 { 00054 template< class TInputImage, class TOutputImage, class TKernel > 00055 class ITK_EXPORT BinaryMorphologicalClosingImageFilter: 00056 public KernelImageFilter< TInputImage, TOutputImage, TKernel > 00057 { 00058 public: 00060 typedef BinaryMorphologicalClosingImageFilter Self; 00061 typedef KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass; 00062 typedef SmartPointer< Self > Pointer; 00063 typedef SmartPointer< const Self > ConstPointer; 00064 00066 itkNewMacro(Self); 00067 00069 itkTypeMacro(BinaryMorphologicalClosingImageFilter, 00070 KernelImageFilter); 00071 00072 typedef TInputImage InputImageType; 00073 typedef TOutputImage OutputImageType; 00074 typedef typename InputImageType::Pointer InputImagePointer; 00075 typedef typename OutputImageType::RegionType OutputImageRegionType; 00076 00078 typedef typename TInputImage::PixelType InputPixelType; 00079 typedef typename TInputImage::PixelType OutputPixelType; 00080 00082 typedef TKernel KernelType; 00083 00086 itkSetMacro(ForegroundValue, InputPixelType); 00087 00090 itkGetConstMacro(ForegroundValue, InputPixelType); 00091 00094 itkSetMacro(SafeBorder, bool); 00095 itkGetConstReferenceMacro(SafeBorder, bool); 00096 itkBooleanMacro(SafeBorder); 00097 protected: 00098 BinaryMorphologicalClosingImageFilter(); 00099 ~BinaryMorphologicalClosingImageFilter() {} 00100 void PrintSelf(std::ostream & os, Indent indent) const; 00102 00105 void GenerateData(); 00106 00107 private: 00108 BinaryMorphologicalClosingImageFilter(const Self &); //purposely not 00109 // implemented 00110 void operator=(const Self &); //purposely not 00111 // implemented 00112 00113 InputPixelType m_ForegroundValue; 00114 00115 bool m_SafeBorder; 00116 }; // end of class 00117 } // end namespace itk 00118 00119 #ifndef ITK_MANUAL_INSTANTIATION 00120 #include "itkBinaryMorphologicalClosingImageFilter.hxx" 00121 #endif 00122 00123 #endif 00124