ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkCyclicShiftImageFilter.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 __itkCyclicShiftImageFilter_h
00019 #define __itkCyclicShiftImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk
00024 {
00045 template< class TInputImage, class TOutputImage = TInputImage >
00046 class ITK_EXPORT CyclicShiftImageFilter:
00047   public ImageToImageFilter< TInputImage, TOutputImage >
00048 {
00049 public:
00051   typedef CyclicShiftImageFilter                          Self;
00052   typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00053   typedef SmartPointer< Self >                            Pointer;
00054   typedef SmartPointer< const Self >                      ConstPointer;
00055 
00057   typedef TInputImage                               InputImageType;
00058   typedef TOutputImage                              OutputImageType;
00059   typedef typename InputImageType::Pointer          InputImagePointer;
00060   typedef typename InputImageType::ConstPointer     InputImageConstPointer;
00061   typedef typename InputImageType::RegionType       InputImageRegionType;
00062   typedef typename InputImageType::PixelType        InputImagePixelType;
00063   typedef typename OutputImageType::Pointer         OutputImagePointer;
00064   typedef typename OutputImageType::ConstPointer    OutputImageConstPointer;
00065   typedef typename OutputImageType::RegionType      OutputImageRegionType;
00066   typedef typename OutputImageType::PixelType       OutputImagePixelType;
00067   typedef typename OutputImageType::IndexType       IndexType;
00068   typedef typename OutputImageType::SizeType        SizeType;
00069   typedef typename OutputImageType::OffsetType      OffsetType;
00070   typedef typename OutputImageType::OffsetValueType OffsetValueType;
00071 
00073   itkStaticConstMacro(ImageDimension, unsigned int,
00074                       TInputImage::ImageDimension);
00075 
00077   itkNewMacro(Self);
00078 
00080   itkTypeMacro(CyclicShiftImageFilter, ImageToImageFilter);
00081 
00083   itkSetMacro(Shift, OffsetType);
00084   itkGetConstMacro(Shift, OffsetType);
00086 
00087 protected:
00088   CyclicShiftImageFilter();
00089   ~CyclicShiftImageFilter() {}
00090   void PrintSelf(std::ostream & os, Indent indent) const;
00091 
00094   void GenerateInputRequestedRegion();
00095 
00097   void  ThreadedGenerateData(const OutputImageRegionType &
00098                              outputRegionForThread,
00099                              ThreadIdType threadId);
00100 
00103   OffsetType m_Shift;
00104 
00105 private:
00106   CyclicShiftImageFilter(const Self &); // purposely not implemented
00107   void operator=(const Self &);         // purposely not implemented
00108 
00109 }; // end of class
00110 } // end namespace itk
00111 
00112 #ifndef ITK_MANUAL_INSTANTIATION
00113 #include "itkCyclicShiftImageFilter.hxx"
00114 #endif
00115 
00116 
00117 #endif
00118