00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageRandomIteratorWithIndex.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/08/14 02:52:17 $ 00007 Version: $Revision: 1.10 $ 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 __itkImageRandomIteratorWithIndex_h 00018 #define __itkImageRandomIteratorWithIndex_h 00019 00020 #include "itkImageRandomConstIteratorWithIndex.h" 00021 #include "itkImageIteratorWithIndex.h" 00022 00023 namespace itk 00024 { 00025 00063 template<typename TImage> 00064 class ITK_EXPORT ImageRandomIteratorWithIndex : public ImageRandomConstIteratorWithIndex<TImage> 00065 { 00066 public: 00068 typedef ImageRandomIteratorWithIndex Self; 00069 typedef ImageRandomConstIteratorWithIndex<TImage> Superclass; 00070 00072 typedef typename Superclass::IndexType IndexType; 00073 typedef typename Superclass::IndexValueType IndexValueType; 00074 typedef typename Superclass::SizeType SizeType; 00075 typedef typename Superclass::SizeValueType SizeValueType; 00076 typedef typename Superclass::OffsetType OffsetType; 00077 typedef typename Superclass::OffsetValueType OffsetValueType; 00078 typedef typename Superclass::RegionType RegionType; 00079 typedef typename Superclass::ImageType ImageType; 00080 typedef typename Superclass::PixelContainer PixelContainer; 00081 typedef typename Superclass::PixelContainerPointer PixelContainerPointer; 00082 typedef typename Superclass::InternalPixelType InternalPixelType; 00083 typedef typename Superclass::PixelType PixelType; 00084 typedef typename Superclass::AccessorType AccessorType; 00085 00086 00088 ImageRandomIteratorWithIndex(); 00089 00092 ImageRandomIteratorWithIndex(ImageType *ptr, const RegionType& region); 00093 00100 ImageRandomIteratorWithIndex( const ImageIteratorWithIndex<TImage> &it); 00101 00103 void Set( const PixelType & value) const 00104 { this->m_PixelAccessorFunctor.Set(*(const_cast<InternalPixelType *>(this->m_Position)),value); } 00105 00109 PixelType & Value(void) 00110 { return *(const_cast<InternalPixelType *>(this->m_Position)); } 00111 00112 protected: 00115 ImageRandomIteratorWithIndex( const ImageRandomConstIteratorWithIndex<TImage> &it); 00116 Self & operator=(const ImageRandomConstIteratorWithIndex<TImage> & it); 00117 00118 00119 }; 00120 00121 } // end namespace itk 00122 00123 #ifndef ITK_MANUAL_INSTANTIATION 00124 #include "itkImageRandomIteratorWithIndex.txx" 00125 #endif 00126 00127 #endif 00128 00129 00130