ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkImageSliceIteratorWithIndex.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 __itkImageSliceIteratorWithIndex_h
00019 #define __itkImageSliceIteratorWithIndex_h
00020 
00021 #include "itkImageSliceConstIteratorWithIndex.h"
00022 #include "itkImageIteratorWithIndex.h"
00023 
00024 namespace itk
00025 {
00068 template< typename TImage >
00069 class ITK_EXPORT ImageSliceIteratorWithIndex:public ImageSliceConstIteratorWithIndex< TImage >
00070 {
00071 public:
00073   typedef ImageSliceIteratorWithIndex                Self;
00074   typedef ImageSliceConstIteratorWithIndex< TImage > Superclass;
00075 
00077   typedef typename Superclass::IndexType             IndexType;
00078   typedef typename Superclass::SizeType              SizeType;
00079   typedef typename Superclass::OffsetType            OffsetType;
00080   typedef typename Superclass::RegionType            RegionType;
00081   typedef typename Superclass::ImageType             ImageType;
00082   typedef typename Superclass::PixelContainer        PixelContainer;
00083   typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
00084   typedef typename Superclass::InternalPixelType     InternalPixelType;
00085   typedef typename Superclass::PixelType             PixelType;
00086   typedef typename Superclass::AccessorType          AccessorType;
00087 
00089   ImageSliceIteratorWithIndex();
00090 
00093   ImageSliceIteratorWithIndex(ImageType *ptr, const RegionType & region);
00094 
00101   ImageSliceIteratorWithIndex(const ImageIteratorWithIndex< TImage > & it);
00102 
00104   void Set(const PixelType & value) const
00105   { this->m_PixelAccessorFunctor.Set(*( const_cast< InternalPixelType * >( this->m_Position ) ), value); }
00106 
00110   PixelType & Value(void)
00111   { return *( const_cast< InternalPixelType * >( this->m_Position ) ); }
00112 protected:
00113 
00116   ImageSliceIteratorWithIndex(const ImageSliceConstIteratorWithIndex< TImage > & it);
00117   Self & operator=(const ImageSliceConstIteratorWithIndex< TImage > & it);
00118 };
00119 } // end namespace itk
00121 
00122 #ifndef ITK_MANUAL_INSTANTIATION
00123 #include "itkImageSliceIteratorWithIndex.hxx"
00124 #endif
00125 
00126 #endif
00127