ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkFlipImageFilter_h 00019 #define __itkFlipImageFilter_h 00020 00021 #include "itkImageToImageFilter.h" 00022 #include "itkFixedArray.h" 00023 00024 namespace itk 00025 { 00052 template< class TImage > 00053 class ITK_EXPORT FlipImageFilter: 00054 public ImageToImageFilter< TImage, TImage > 00055 { 00056 public: 00058 typedef FlipImageFilter Self; 00059 typedef ImageToImageFilter< TImage, TImage > Superclass; 00060 typedef SmartPointer< Self > Pointer; 00061 typedef SmartPointer< const Self > ConstPointer; 00062 00064 itkNewMacro(Self); 00065 00067 itkTypeMacro(FlipImageFilter, ImageToImageFilter); 00068 00070 itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension); 00071 00073 typedef typename Superclass::InputImagePointer InputImagePointer; 00074 typedef typename Superclass::InputImageConstPointer InputImageConstPointer; 00075 typedef typename Superclass::OutputImagePointer OutputImagePointer; 00076 typedef typename Superclass::OutputImageRegionType OutputImageRegionType; 00077 00079 typedef typename TImage::IndexType IndexType; 00080 typedef typename IndexType::IndexValueType IndexValueType; 00081 00083 typedef FixedArray< bool, itkGetStaticConstMacro(ImageDimension) > FlipAxesArrayType; 00084 00087 itkSetMacro(FlipAxes, FlipAxesArrayType); 00088 itkGetConstMacro(FlipAxes, FlipAxesArrayType); 00090 00095 itkBooleanMacro(FlipAboutOrigin); 00096 itkGetConstMacro(FlipAboutOrigin, bool); 00097 itkSetMacro(FlipAboutOrigin, bool); 00099 00106 virtual void GenerateOutputInformation(); 00107 00113 virtual void GenerateInputRequestedRegion(); 00114 00115 protected: 00116 FlipImageFilter(); 00117 ~FlipImageFilter() {} 00118 void PrintSelf(std::ostream & os, Indent indent) const; 00119 00130 void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, 00131 ThreadIdType threadId); 00132 00133 private: 00134 FlipImageFilter(const Self &); //purposely not implemented 00135 void operator=(const Self &); //purposely not implemented 00136 00137 FlipAxesArrayType m_FlipAxes; 00138 bool m_FlipAboutOrigin; 00139 }; 00140 } // end namespace itk 00141 00142 #ifndef ITK_MANUAL_INSTANTIATION 00143 #include "itkFlipImageFilter.hxx" 00144 #endif 00145 00146 #endif 00147