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

itkChangeLabelLabelMapFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkChangeLabelLabelMapFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-10-12 18:55:34 $
00007   Version:   $Revision: 1.6 $
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 __itkChangeLabelLabelMapFilter_h
00018 #define __itkChangeLabelLabelMapFilter_h
00019 
00020 #include "itkInPlaceLabelMapFilter.h"
00021 #include <map>
00022 
00023 namespace itk {
00040 template<class TImage >
00041 class ITK_EXPORT ChangeLabelLabelMapFilter : 
00042     public InPlaceLabelMapFilter<TImage>
00043 {
00044 public:
00046   typedef ChangeLabelLabelMapFilter     Self;
00047   typedef InPlaceLabelMapFilter<TImage> Superclass;
00048   typedef SmartPointer<Self>            Pointer;
00049   typedef SmartPointer<const Self>      ConstPointer;
00050 
00052   typedef TImage                              ImageType;
00053   typedef typename ImageType::Pointer         ImagePointer;
00054   typedef typename ImageType::ConstPointer    ImageConstPointer;
00055   typedef typename ImageType::PixelType       PixelType;
00056   typedef typename ImageType::IndexType       IndexType;
00057   typedef typename ImageType::LabelObjectType LabelObjectType;
00058 
00060   itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
00061 
00063   itkNewMacro(Self);
00064 
00066   itkTypeMacro(ChangeLabelLabelMapFilter, InPlaceLabelMapFilter);
00067 
00068   typedef typename std::map< PixelType, PixelType > ChangeMapType;
00069   typedef typename ChangeMapType::const_iterator    ChangeMapIterator;
00070 
00071 
00072 #ifdef ITK_USE_CONCEPT_CHECKING
00073 
00074 /*  itkConceptMacro(InputEqualityComparableCheck,
00075     (Concept::EqualityComparable<InputImagePixelType>));
00076   itkConceptMacro(IntConvertibleToInputCheck,
00077     (Concept::Convertible<int, InputImagePixelType>));
00078   itkConceptMacro(InputOStreamWritableCheck,
00079     (Concept::OStreamWritable<InputImagePixelType>));*/
00080 
00082 #endif
00083 
00086   void SetChangeMap( const ChangeMapType & changeMap );
00087 
00088   const ChangeMapType & GetChangeMap() const;
00089   
00090   void SetChange( const PixelType & oldLabel, const PixelType & newLabel );
00091   
00092   void ClearChangeMap();
00093 
00094 
00095 protected:
00096   ChangeLabelLabelMapFilter();
00097   ~ChangeLabelLabelMapFilter() {};
00098 
00099   void GenerateData();
00100 
00101   void PrintSelf(std::ostream& os, Indent indent) const;
00102 
00103   ChangeMapType          m_MapOfLabelToBeReplaced;
00104 
00105 private:
00106   ChangeLabelLabelMapFilter(const Self&); //purposely not implemented
00107   void operator=(const Self&); //purposely not implemented
00108 
00109 }; // end of class
00110 
00111 } // end namespace itk
00112   
00113 #ifndef ITK_MANUAL_INSTANTIATION
00114 #include "itkChangeLabelLabelMapFilter.txx"
00115 #endif
00116 
00117 #endif
00118 

Generated at Mon Jul 12 2010 18:02:15 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000