KWStyle - itkImageConstIterator.txx
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkImageConstIterator.txx.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:36 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 DEF #ifndef _itkImageConstIterator_txx
18 DEF #define _itkImageConstIterator_txx
19
20 #include "itkImageConstIterator.h"
21
22 namespace itk
23 {
24
25 //----------------------------------------------------------------------------
26 // Begin() is the first pixel in the region.
27 template<class TImage>
28 ImageConstIterator<TImage>
29 ImageConstIterator<TImage>
30 ::Begin() const
31 {
32   // Copy the current iterator
33   Self it( *this );
34
35   // Set the offset to the m_BeginOffset. 
36   it.m_Offset = m_BeginOffset;
37   
38   return it;
39 }
40
41 //----------------------------------------------------------------------------
42 // End() is one pixel past the last pixel in the current region.
43 // The index of this pixel is
44 //          [m_StartIndex[0] + m_Size[0],
45 //           m_StartIndex[1] + m_Size[1]-1, ...,
46 //           m_StartIndex[VImageDimension-2] + m_Size[VImageDimension-2]-1,
47 //           m_StartIndex[VImageDimension-1] + m_Size[VImageDimension-1]-1]
48 //
49 template<class TImage>
50 ImageConstIterator<TImage>
51 ImageConstIterator<TImage>
52 ::End() const
53 {
54   // Copy the current iterator
55   Self it( *this );
56
57   // Set the offset to the m_EndOffset. 
58   it.m_Offset = m_EndOffset;
59   
60   return it;
61 }
62
63 // end namespace itk
64
65 #endif
66

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:13PM
© Kitware Inc.