ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBinaryGrindPeakImageFilter.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 __itkBinaryGrindPeakImageFilter_h
00019 #define __itkBinaryGrindPeakImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk {
00024 
00044 template<class TInputImage>
00045 class ITK_EXPORT BinaryGrindPeakImageFilter :
00046     public ImageToImageFilter<TInputImage, TInputImage>
00047 {
00048 public:
00050   typedef BinaryGrindPeakImageFilter                   Self;
00051   typedef ImageToImageFilter<TInputImage, TInputImage> Superclass;
00052   typedef SmartPointer<Self>                           Pointer;
00053   typedef SmartPointer<const Self>                     ConstPointer;
00054 
00056   typedef TInputImage                              InputImageType;
00057   typedef TInputImage                              OutputImageType;
00058   typedef typename InputImageType::Pointer         InputImagePointer;
00059   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00060   typedef typename InputImageType::RegionType      InputImageRegionType;
00061   typedef typename InputImageType::PixelType       InputImagePixelType;
00062   typedef typename OutputImageType::Pointer        OutputImagePointer;
00063   typedef typename OutputImageType::ConstPointer   OutputImageConstPointer;
00064   typedef typename OutputImageType::RegionType     OutputImageRegionType;
00065   typedef typename OutputImageType::PixelType      OutputImagePixelType;
00066 
00068   itkStaticConstMacro(InputImageDimension, unsigned int,
00069                       TInputImage::ImageDimension);
00070   itkStaticConstMacro(OutputImageDimension, unsigned int,
00071                       OutputImageType::ImageDimension);
00073 
00075   itkNewMacro(Self);
00076 
00078   itkTypeMacro(BinaryGrindPeakImageFilter,
00079                ImageToImageFilter);
00080 
00087   itkSetMacro(FullyConnected, bool);
00088   itkGetConstReferenceMacro(FullyConnected, bool);
00089   itkBooleanMacro(FullyConnected);
00091 
00092 #ifdef ITK_USE_CONCEPT_CHECKING
00093 
00094   itkConceptMacro(InputOStreamWritableCheck,
00095                   (Concept::OStreamWritable<InputImagePixelType>));
00096 
00098 #endif
00099 
00102   itkSetMacro(ForegroundValue, InputImagePixelType);
00103 
00106   itkGetMacro(ForegroundValue, InputImagePixelType);
00107 
00109   itkSetMacro(BackgroundValue, InputImagePixelType);
00110 
00112   itkGetMacro(BackgroundValue, InputImagePixelType);
00113 
00114 
00115 protected:
00116   BinaryGrindPeakImageFilter();
00117   ~BinaryGrindPeakImageFilter() {};
00118   void PrintSelf(std::ostream& os, Indent indent) const;
00119 
00123   void GenerateInputRequestedRegion();
00124 
00126   void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00127 
00130   void GenerateData();
00131 
00132 
00133 private:
00134   BinaryGrindPeakImageFilter(const Self&); //purposely not implemented
00135   void operator=(const Self&); //purposely not implemented
00136 
00137   InputImagePixelType m_ForegroundValue;
00138 
00139   InputImagePixelType m_BackgroundValue;
00140 
00141   bool                m_FullyConnected;
00142 
00143 }; // end of class
00144 
00145 } // end namespace itk
00146 
00147 #ifndef ITK_MANUAL_INSTANTIATION
00148 #include "itkBinaryGrindPeakImageFilter.hxx"
00149 #endif
00150 
00151 #endif
00152