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 __itkBinaryClosingByReconstructionImageFilter_h 00019 #define __itkBinaryClosingByReconstructionImageFilter_h 00020 00021 #include "itkKernelImageFilter.h" 00022 00023 namespace itk { 00024 00048 template<class TInputImage, class TKernel> 00049 class ITK_EXPORT BinaryClosingByReconstructionImageFilter : 00050 public KernelImageFilter<TInputImage, TInputImage, TKernel> 00051 { 00052 public: 00054 typedef BinaryClosingByReconstructionImageFilter Self; 00055 typedef KernelImageFilter<TInputImage, TInputImage, TKernel> 00056 Superclass; 00057 typedef SmartPointer<Self> Pointer; 00058 typedef SmartPointer<const Self> ConstPointer; 00059 00061 itkNewMacro(Self); 00062 00064 itkTypeMacro(BinaryClosingByReconstructionImageFilter, 00065 KernelImageFilter); 00066 00067 typedef TInputImage InputImageType; 00068 typedef TInputImage OutputImageType; 00069 typedef typename InputImageType::Pointer InputImagePointer; 00070 typedef typename OutputImageType::RegionType OutputImageRegionType; 00071 00073 typedef typename TInputImage::PixelType InputPixelType; 00074 typedef typename TInputImage::PixelType OutputPixelType; 00075 00077 typedef TKernel KernelType; 00078 00081 itkSetMacro(ForegroundValue, InputPixelType); 00082 00085 itkGetMacro(ForegroundValue, InputPixelType); 00086 00093 itkSetMacro(FullyConnected, bool); 00094 itkGetConstReferenceMacro(FullyConnected, bool); 00095 itkBooleanMacro(FullyConnected); 00097 00098 protected: 00099 BinaryClosingByReconstructionImageFilter(); 00100 ~BinaryClosingByReconstructionImageFilter() {}; 00101 void PrintSelf(std::ostream& os, Indent indent) const; 00102 00108 void GenerateInputRequestedRegion(); 00109 00112 void GenerateData (); 00113 00114 private: 00115 BinaryClosingByReconstructionImageFilter(const Self&); //purposely not implemented 00116 void operator=(const Self&); //purposely not implemented 00117 00118 InputPixelType m_ForegroundValue; 00119 00120 bool m_FullyConnected; 00121 00122 }; // end of class 00123 00124 } // end namespace itk 00125 00126 #ifndef ITK_MANUAL_INSTANTIATION 00127 #include "itkBinaryClosingByReconstructionImageFilter.hxx" 00128 #endif 00129 00130 #endif 00131