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 __itkImageRandomNonRepeatingIteratorWithIndex_h 00019 #define __itkImageRandomNonRepeatingIteratorWithIndex_h 00020 00021 #include "itkImageRandomNonRepeatingConstIteratorWithIndex.h" 00022 #include "itkImageIteratorWithIndex.h" 00023 00024 namespace itk 00025 { 00073 template< typename TImage > 00074 class ITK_EXPORT ImageRandomNonRepeatingIteratorWithIndex:public ImageRandomNonRepeatingConstIteratorWithIndex< TImage > 00075 { 00076 public: 00078 typedef ImageRandomNonRepeatingIteratorWithIndex Self; 00079 typedef ImageRandomNonRepeatingConstIteratorWithIndex< TImage > Superclass; 00080 00082 typedef typename Superclass::IndexType IndexType; 00083 typedef typename Superclass::SizeType SizeType; 00084 typedef typename Superclass::OffsetType OffsetType; 00085 typedef typename Superclass::RegionType RegionType; 00086 typedef typename Superclass::ImageType ImageType; 00087 typedef typename Superclass::PixelContainer PixelContainer; 00088 typedef typename Superclass::PixelContainerPointer PixelContainerPointer; 00089 typedef typename Superclass::InternalPixelType InternalPixelType; 00090 typedef typename Superclass::PixelType PixelType; 00091 typedef typename Superclass::AccessorType AccessorType; 00092 00094 ImageRandomNonRepeatingIteratorWithIndex(); 00095 00098 ImageRandomNonRepeatingIteratorWithIndex(ImageType *ptr, const RegionType & region); 00099 00106 ImageRandomNonRepeatingIteratorWithIndex(const ImageIteratorWithIndex< TImage > & it); 00107 00109 void Set(const PixelType & value) const 00110 { this->m_PixelAccessorFunctor.Set(*( const_cast< InternalPixelType * >( this->m_Position ) ), value); } 00111 00115 PixelType & Value(void) 00116 { return *( const_cast< InternalPixelType * >( this->m_Position ) ); } 00117 protected: 00118 00121 ImageRandomNonRepeatingIteratorWithIndex(const ImageRandomNonRepeatingConstIteratorWithIndex< TImage > & it); 00122 Self & operator=(const ImageRandomNonRepeatingConstIteratorWithIndex< TImage > & it); 00123 }; 00124 } // end namespace itk 00126 00127 #ifndef ITK_MANUAL_INSTANTIATION 00128 #include "itkImageRandomNonRepeatingIteratorWithIndex.hxx" 00129 #endif 00130 00131 #endif 00132