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 00019 #ifndef __itkLiThresholdImageFilter_h 00020 #define __itkLiThresholdImageFilter_h 00021 00022 #include "itkHistogramThresholdImageFilter.h" 00023 #include "itkLiThresholdCalculator.h" 00024 00025 namespace itk { 00026 00050 template<class TInputImage, class TOutputImage, class TMaskImage=TOutputImage> 00051 class ITK_EXPORT LiThresholdImageFilter : 00052 public HistogramThresholdImageFilter<TInputImage, TOutputImage, TMaskImage> 00053 { 00054 public: 00056 typedef LiThresholdImageFilter Self; 00057 typedef HistogramThresholdImageFilter<TInputImage,TOutputImage, 00058 TMaskImage> Superclass; 00059 typedef SmartPointer<Self> Pointer; 00060 typedef SmartPointer<const Self> ConstPointer; 00061 00063 itkNewMacro(Self); 00064 00066 itkTypeMacro(LiThresholdImageFilter, HistogramThresholdImageFilter); 00067 00068 typedef TInputImage InputImageType; 00069 typedef TOutputImage OutputImageType; 00070 typedef TMaskImage MaskImageType; 00071 00073 typedef typename InputImageType::PixelType InputPixelType; 00074 typedef typename OutputImageType::PixelType OutputPixelType; 00075 typedef typename MaskImageType::PixelType MaskPixelType; 00076 00078 typedef typename InputImageType::Pointer InputImagePointer; 00079 typedef typename OutputImageType::Pointer OutputImagePointer; 00080 00081 typedef typename InputImageType::SizeType InputSizeType; 00082 typedef typename InputImageType::IndexType InputIndexType; 00083 typedef typename InputImageType::RegionType InputImageRegionType; 00084 typedef typename OutputImageType::SizeType OutputSizeType; 00085 typedef typename OutputImageType::IndexType OutputIndexType; 00086 typedef typename OutputImageType::RegionType OutputImageRegionType; 00087 typedef typename MaskImageType::SizeType MaskSizeType; 00088 typedef typename MaskImageType::IndexType MaskIndexType; 00089 typedef typename MaskImageType::RegionType MaskImageRegionType; 00090 00091 typedef typename Superclass::HistogramType HistogramType; 00092 typedef LiThresholdCalculator< HistogramType, InputPixelType > CalculatorType; 00093 00095 itkStaticConstMacro(InputImageDimension, unsigned int, 00096 InputImageType::ImageDimension ); 00097 itkStaticConstMacro(OutputImageDimension, unsigned int, 00098 OutputImageType::ImageDimension ); 00100 00101 protected: 00102 LiThresholdImageFilter() 00103 { 00104 this->SetCalculator( CalculatorType::New() ); 00105 } 00106 ~LiThresholdImageFilter(){}; 00107 00108 private: 00109 LiThresholdImageFilter(const Self&); //purposely not implemented 00110 void operator=(const Self&); //purposely not implemented 00111 }; // end of class 00112 00113 } // end namespace itk 00114 00115 #endif 00116