ITK
4.0.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 __itkTriangleThresholdImageFilter_h 00020 #define __itkTriangleThresholdImageFilter_h 00021 00022 #include "itkHistogramThresholdImageFilter.h" 00023 #include "itkTriangleThresholdCalculator.h" 00024 00025 namespace itk { 00026 00048 template<class TInputImage, class TOutputImage> 00049 class ITK_EXPORT TriangleThresholdImageFilter : 00050 public HistogramThresholdImageFilter<TInputImage, TOutputImage> 00051 { 00052 public: 00054 typedef TriangleThresholdImageFilter Self; 00055 typedef HistogramThresholdImageFilter<TInputImage,TOutputImage> Superclass; 00056 typedef SmartPointer<Self> Pointer; 00057 typedef SmartPointer<const Self> ConstPointer; 00058 00060 itkNewMacro(Self); 00061 00063 itkTypeMacro(TriangleThresholdImageFilter, HistogramThresholdImageFilter); 00064 00065 typedef TInputImage InputImageType; 00066 typedef TOutputImage OutputImageType; 00067 00069 typedef typename InputImageType::PixelType InputPixelType; 00070 typedef typename OutputImageType::PixelType OutputPixelType; 00071 00073 typedef typename InputImageType::Pointer InputImagePointer; 00074 typedef typename OutputImageType::Pointer OutputImagePointer; 00075 00076 typedef typename InputImageType::SizeType InputSizeType; 00077 typedef typename InputImageType::IndexType InputIndexType; 00078 typedef typename InputImageType::RegionType InputImageRegionType; 00079 typedef typename OutputImageType::SizeType OutputSizeType; 00080 typedef typename OutputImageType::IndexType OutputIndexType; 00081 typedef typename OutputImageType::RegionType OutputImageRegionType; 00082 00083 typedef typename Superclass::HistogramType HistogramType; 00084 typedef TriangleThresholdCalculator< HistogramType, InputPixelType > CalculatorType; 00085 00087 itkStaticConstMacro(InputImageDimension, unsigned int, 00088 InputImageType::ImageDimension ); 00089 itkStaticConstMacro(OutputImageDimension, unsigned int, 00090 OutputImageType::ImageDimension ); 00092 00093 protected: 00094 TriangleThresholdImageFilter() 00095 { 00096 this->SetCalculator( CalculatorType::New() ); 00097 } 00098 ~TriangleThresholdImageFilter(){}; 00099 00100 private: 00101 TriangleThresholdImageFilter(const Self&); //purposely not implemented 00102 void operator=(const Self&); //purposely not implemented 00103 }; // end of class 00104 00105 } // end namespace itk 00106 00107 #endif 00108