Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkDoubleThresholdImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkDoubleThresholdImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/23 15:08:59 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkDoubleThresholdImageFilter_h
00018 #define __itkDoubleThresholdImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkConceptChecking.h"
00022 
00023 namespace itk
00024 {
00025   
00053 template <class TInputImage, class TOutputImage>
00054 class ITK_EXPORT DoubleThresholdImageFilter :
00055     public ImageToImageFilter<TInputImage, TOutputImage>
00056 {
00057 public:
00059   typedef DoubleThresholdImageFilter  Self;
00060   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00061   typedef SmartPointer<Self>   Pointer;
00062   typedef SmartPointer<const Self>  ConstPointer;
00063 
00065   itkNewMacro(Self);
00066 
00068   itkTypeMacro(DoubleThresholdImageFilter, ImageToImageFilter);
00069 
00071   typedef typename Superclass::InputImagePointer InputImagePointer;
00072   typedef typename Superclass::InputImageType InputImageType;
00073 
00075   typedef typename TInputImage::PixelType  InputPixelType;
00076   typedef typename TOutputImage::PixelType OutputPixelType;
00077 
00079   itkConceptMacro(PixelTypeComparable, (Concept::Comparable<InputPixelType>));
00080 
00083   itkSetMacro(OutsideValue,OutputPixelType);
00084   
00086   itkGetMacro(OutsideValue,OutputPixelType);
00087 
00090   itkSetMacro(InsideValue,OutputPixelType);
00091   
00093   itkGetMacro(InsideValue,OutputPixelType);
00094 
00100   itkSetMacro( Threshold1, InputPixelType );
00101   itkSetMacro( Threshold2, InputPixelType );
00102   itkSetMacro( Threshold3, InputPixelType );
00103   itkSetMacro( Threshold4, InputPixelType );
00104                  
00106   itkGetMacro( Threshold1, InputPixelType );
00107   itkGetMacro( Threshold2, InputPixelType );
00108   itkGetMacro( Threshold3, InputPixelType );
00109   itkGetMacro( Threshold4, InputPixelType );
00110 
00115   unsigned long GetNumberOfIterationsUsed()
00116     { itkLegacyBody(itk::DoubleThresholdImageFilter::GetNumberOfIterationsUsed, 2.2);
00117       return m_NumberOfIterationsUsed; };
00118 
00125   itkSetMacro(FullyConnected, bool);
00126   itkGetConstReferenceMacro(FullyConnected, bool);
00127   itkBooleanMacro(FullyConnected);
00128   
00129 protected:
00130   DoubleThresholdImageFilter();
00131   virtual ~DoubleThresholdImageFilter() {}
00132   void PrintSelf(std::ostream& os, Indent indent) const;
00133 
00136   void GenerateInputRequestedRegion();
00137 
00140   void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00141 
00145   void GenerateData();
00146   
00147 private:
00148   DoubleThresholdImageFilter(const Self&); //purposely not implemented
00149   void operator=(const Self&); //purposely not implemented
00150 
00151   InputPixelType      m_Threshold1;
00152   InputPixelType      m_Threshold2;
00153   InputPixelType      m_Threshold3;
00154   InputPixelType      m_Threshold4;
00155 
00156   OutputPixelType     m_InsideValue;
00157   OutputPixelType     m_OutsideValue;
00158 
00159   unsigned long       m_NumberOfIterationsUsed;
00160 
00161   bool                m_FullyConnected;
00162 };
00163 
00164 } // end namespace itk
00165 
00166 #ifndef ITK_MANUAL_INSTANTIATION
00167 #include "itkDoubleThresholdImageFilter.txx"
00168 #endif
00169 
00170 #endif

Generated at Wed May 24 23:03:53 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000