ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkTobogganImageFilter.h
Go to the documentation of this file.
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 __itkTobogganImageFilter_h
00019 #define __itkTobogganImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 #include "itkConstNeighborhoodIterator.h"
00023 
00024 namespace itk
00025 {
00038 template< class TInputImage >
00039 class ITK_EXPORT TobogganImageFilter:
00040   public ImageToImageFilter<
00041     TInputImage,
00042     Image< IdentifierType, ::itk::GetImageDimension< TInputImage >::ImageDimension > >
00043 {
00044 public:
00046   typedef TobogganImageFilter Self;
00047 
00049   typedef TInputImage InputImageType;
00050 
00052   itkStaticConstMacro(NDimensions, unsigned int, TInputImage::ImageDimension);
00053 
00055   typedef Image< IdentifierType, itkGetStaticConstMacro(NDimensions) > OutputImageType;
00056 
00058   typedef typename OutputImageType::PixelType OutputImagePixelType;
00059 
00061   typedef typename InputImageType::PixelType InputImagePixelType;
00062 
00064   enum { ImageDimension = InputImageType::ImageDimension };
00065 
00067   typedef typename InputImageType::RegionType   RegionType;
00068   typedef typename InputImageType::SizeType     SizeType;
00069   typedef typename InputImageType::IndexType    IndexType;
00070   typedef typename InputImageType::Pointer      InputImagePointer;
00071   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00072   typedef typename OutputImageType::Pointer     OutputImagePointer;
00073 
00075   typedef ImageToImageFilter< InputImageType, OutputImageType > Superclass;
00076 
00078   typedef typename InputImageType::PixelType ScalarType;
00079 
00081   typedef SmartPointer< Self > Pointer;
00082 
00084   itkTypeMacro(TobogganImageFilter, ImageToImageFilter);
00085 
00087   itkNewMacro(Self);
00088 
00090   void GenerateData();
00091 
00092   void GenerateInputRequestedRegion();
00093 
00094   void EnlargeOutputRequestedRegion(DataObject *);
00095 
00097   typedef ConstNeighborhoodIterator< TInputImage >
00098   NeighborhoodIteratorType;
00099 
00100 #ifdef ITK_USE_CONCEPT_CHECKING
00101 
00102   itkConceptMacro( LessThanComparableCheck,
00103                    ( Concept::LessThanComparable< InputImagePixelType > ) );
00104   itkConceptMacro( OStreamWritableCheck,
00105                    ( Concept::OStreamWritable< InputImagePixelType > ) );
00106 
00108 #endif
00109 protected:
00110   TobogganImageFilter();
00111   ~TobogganImageFilter() {}
00112   void PrintSelf(std::ostream & os, Indent indent) const;
00114 
00115 private:
00116   TobogganImageFilter(const Self &); //purposely not implemented
00117   void operator=(const Self &);      //purposely not implemented
00118 };                                   // end of class
00119 } // end namespace itk
00120 
00121 #ifndef ITK_MANUAL_INSTANTIATION
00122 #include "itkTobogganImageFilter.hxx"
00123 #endif
00124 
00125 #endif
00126