KWStyle - itkImageReverseConstIterator.txx
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkImageReverseConstIterator.txx.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:40 $
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 _itkImageReverseConstIterator_txx
18 DEF #define _itkImageReverseConstIterator_txx
19
20 #include "itkImageReverseConstIterator.h"
21
22 namespace itk
23 {
24
25 //----------------------------------------------------------------------------
26 // Begin() is the last pixel in the region.
27 template<class TImage>
28 ImageReverseConstIterator<TImage>
29 ImageReverseConstIterator<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 before the first pixel in the current region.
43 // The index of this pixel is
44 //          [m_StartIndex[0] - 1,
45 //           m_StartIndex[1], ...,
46 //           m_StartIndex[VImageDimension-2],
47 //           m_StartIndex[VImageDimension-1]]
48 //
49 template<class TImage>
50 ImageReverseConstIterator<TImage>
51 ImageReverseConstIterator<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:15PM
© Kitware Inc.