ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBoxImageFilter.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 __itkBoxImageFilter_h
00019 #define __itkBoxImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 #include "itkCastImageFilter.h"
00023 
00024 namespace itk
00025 {
00039 template< class TInputImage, class TOutputImage >
00040 class ITK_EXPORT BoxImageFilter:
00041   public ImageToImageFilter< TInputImage, TOutputImage >
00042 {
00043 public:
00045   typedef BoxImageFilter                                  Self;
00046   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00047   typedef SmartPointer< Self >                            Pointer;
00048   typedef SmartPointer< const Self >                      ConstPointer;
00049 
00051   itkNewMacro(Self);
00052 
00054   itkTypeMacro(BoxImageFilter,
00055                ImageToImageFilter);
00056 
00058   typedef TInputImage                      InputImageType;
00059   typedef typename TInputImage::RegionType RegionType;
00060   typedef typename TInputImage::SizeType   SizeType;
00061   typedef typename TInputImage::IndexType  IndexType;
00062   typedef typename TInputImage::OffsetType OffsetType;
00063 
00064   typedef typename TInputImage::PixelType InputPixelType;
00065 
00066   typedef TOutputImage                     OutputImageType;
00067   typedef typename TOutputImage::PixelType OutputPixelType;
00068 
00070   itkStaticConstMacro(ImageDimension, unsigned int,
00071                       TInputImage::ImageDimension);
00072 
00074   typedef typename TInputImage::SizeType      RadiusType;
00075   typedef typename TInputImage::SizeValueType RadiusValueType;
00076 
00077   virtual void SetRadius(const RadiusType & radius);
00078 
00079   virtual void SetRadius(const RadiusValueType & radius);
00080 
00081   itkGetConstReferenceMacro(Radius, RadiusType);
00082 
00083   void GenerateInputRequestedRegion();
00084 
00085 protected:
00086   BoxImageFilter();
00087   ~BoxImageFilter() {}
00088 
00089   void PrintSelf(std::ostream & os, Indent indent) const;
00090 
00091 private:
00092   BoxImageFilter(const Self &); //purposely not implemented
00093   void operator=(const Self &); //purposely not implemented
00094 
00095   RadiusType m_Radius;
00096 };
00097 }
00098 
00099 #ifndef ITK_MANUAL_INSTANTIATION
00100 #include "itkBoxImageFilter.hxx"
00101 #endif
00102 
00103 #endif
00104