ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkStochasticFractalDimensionImageFilter.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 __itkStochasticFractalDimensionImageFilter_h
00019 #define __itkStochasticFractalDimensionImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 #include "itkConstNeighborhoodIterator.h"
00024 
00025 namespace itk
00026 {
00052 template< class TInputImage, class TMaskImage = Image< unsigned char,
00053                                                        ::itk::GetImageDimension< TInputImage >::ImageDimension >,
00054           class TOutputImage = TInputImage >
00055 class ITK_EXPORT StochasticFractalDimensionImageFilter:
00056   public ImageToImageFilter< TInputImage, TOutputImage >
00057 {
00058 public:
00060   typedef StochasticFractalDimensionImageFilter           Self;
00061   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00062   typedef SmartPointer< Self >                            Pointer;
00063   typedef SmartPointer< const Self >                      ConstPointer;
00064 
00066   itkNewMacro(Self);
00067 
00069   itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
00070 
00072   typedef float        RealType;
00073   typedef TInputImage  InputImageType;
00074   typedef TMaskImage   MaskImageType;
00075   typedef TOutputImage OutputImageType;
00076 
00078   itkTypeMacro(StochasticFractalDimensionImageFilter, ImageToImageFilter);
00079 
00083   void SetMaskImage(const MaskImageType *mask);
00084 
00085   const MaskImageType * GetMaskImage() const;
00086 
00089   typedef ConstNeighborhoodIterator< InputImageType >        ConstNeighborhoodIteratorType;
00090   typedef typename ConstNeighborhoodIteratorType::RadiusType RadiusType;
00091 
00093   itkSetMacro(NeighborhoodRadius, RadiusType);
00094   itkGetConstMacro(NeighborhoodRadius, RadiusType);
00095 protected:
00096   StochasticFractalDimensionImageFilter();
00097   ~StochasticFractalDimensionImageFilter();
00099 
00100   void PrintSelf(std::ostream & os, Indent indent) const;
00101 
00102   void GenerateData();
00103 
00104 private:
00105   StochasticFractalDimensionImageFilter(const Self &); //purposely not
00106                                                        // implemented
00107   void operator=(const Self &);                        //purposely not
00108 
00109   // implemented
00110 
00111   RadiusType m_NeighborhoodRadius;
00112 
00113   typename MaskImageType::Pointer m_MaskImage;
00114 }; // end of class
00115 } // end namespace itk
00116 
00117 #ifndef ITK_MANUAL_INSTANTIATION
00118 #include "itkStochasticFractalDimensionImageFilter.hxx"
00119 #endif
00120 
00121 #endif
00122