00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageSliceIteratorWithIndex.h,v $ 00005 Language: C++ 00006 Date: $Date: 2009-05-19 13:47:44 $ 00007 Version: $Revision: 1.12 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkImageSliceIteratorWithIndex_h 00018 #define __itkImageSliceIteratorWithIndex_h 00019 00020 #include "itkImageSliceConstIteratorWithIndex.h" 00021 #include "itkImageIteratorWithIndex.h" 00022 00023 namespace itk 00024 { 00025 00067 template<typename TImage> 00068 class ITK_EXPORT ImageSliceIteratorWithIndex : public ImageSliceConstIteratorWithIndex<TImage> 00069 { 00070 public: 00072 typedef ImageSliceIteratorWithIndex Self; 00073 typedef ImageSliceConstIteratorWithIndex<TImage> Superclass; 00074 00076 typedef typename Superclass::IndexType IndexType; 00077 typedef typename Superclass::IndexValueType IndexValueType; 00078 typedef typename Superclass::SizeType SizeType; 00079 typedef typename Superclass::SizeValueType SizeValueType; 00080 typedef typename Superclass::OffsetType OffsetType; 00081 typedef typename Superclass::OffsetValueType OffsetValueType; 00082 typedef typename Superclass::RegionType RegionType; 00083 typedef typename Superclass::ImageType ImageType; 00084 typedef typename Superclass::PixelContainer PixelContainer; 00085 typedef typename Superclass::PixelContainerPointer PixelContainerPointer; 00086 typedef typename Superclass::InternalPixelType InternalPixelType; 00087 typedef typename Superclass::PixelType PixelType; 00088 typedef typename Superclass::AccessorType AccessorType; 00089 00090 00092 ImageSliceIteratorWithIndex(); 00093 00096 ImageSliceIteratorWithIndex(ImageType *ptr, const RegionType& region); 00097 00104 ImageSliceIteratorWithIndex( const ImageIteratorWithIndex<TImage> &it); 00105 00107 void Set( const PixelType & value) const 00108 { this->m_PixelAccessorFunctor.Set(*(const_cast<InternalPixelType *>(this->m_Position)),value); } 00109 00113 PixelType & Value(void) 00114 { return *(const_cast<InternalPixelType *>(this->m_Position)); } 00115 00116 protected: 00119 ImageSliceIteratorWithIndex( const ImageSliceConstIteratorWithIndex<TImage> &it); 00120 Self & operator=(const ImageSliceConstIteratorWithIndex<TImage> & it); 00122 00123 00124 }; 00125 00126 } // end namespace itk 00127 00128 #ifndef ITK_MANUAL_INSTANTIATION 00129 #include "itkImageSliceIteratorWithIndex.txx" 00130 #endif 00131 00132 #endif 00133