Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkImageIterator.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkImageIterator.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00046 #ifndef __vtkImageIterator_h
    00047 #define __vtkImageIterator_h
    00048
    00049 #include "vtkSystemIncludes.h"
    00050 class vtkImageData;
    00051
    00052 template<class DType>
    00053 class vtkImageIterator
    00054 {
    00055 public:
    00056   typedef DType *SpanIterator;
    00057
    00059   vtkImageIterator(vtkImageData *id, int *ext);
    00060
    00062   void NextSpan();
    00063
    00065
    00066   SpanIterator BeginSpan()
    00067     {
    00068       return this->Pointer;
    00069     }
    00071
    00073
    00074   SpanIterator EndSpan()
    00075     {
    00076       return this->SpanEndPointer;
    00077     }
    00079
    00081
    00082   int IsAtEnd()
    00083     {
    00084     return (this->Pointer >= this->EndPointer);
    00085     }
    00087
    00088 protected:
    00089   DType *Pointer;
    00090   DType *SpanEndPointer;
    00091   DType *SliceEndPointer;
    00092   DType *EndPointer;
    00093   int    Increments[3];
    00094   int    ContinuousIncrements[3];
    00095 };
    00096
    00097 #ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
    00098 #include "vtkImageIterator.txx"
    00099 #endif
    00100
    00101 #endif