VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Common
vtkArrayExtents.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkArrayExtents.h
5
6
-------------------------------------------------------------------------
7
Copyright 2008 Sandia Corporation.
8
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9
the U.S. Government retains certain rights in this software.
10
-------------------------------------------------------------------------
11
12
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13
All rights reserved.
14
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15
16
This software is distributed WITHOUT ANY WARRANTY; without even
17
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18
PURPOSE. See the above copyright notice for more information.
19
20
=========================================================================*/
21
65
#ifndef __vtkArrayExtents_h
66
#define __vtkArrayExtents_h
67
68
#include "
vtkSystemIncludes.h
"
69
#include "
vtkArrayRange.h
"
70
#include <vector>
// STL Header
71
72
class
VTK_COMMON_EXPORT
vtkArrayExtents
73
{
74
public
:
75
typedef
vtkArrayCoordinates::DimensionT
DimensionT
;
76
typedef
vtkArrayCoordinates::CoordinateT
CoordinateT
;
77
typedef
vtkTypeUInt64
SizeT
;
78
80
vtkArrayExtents
();
81
83
85
explicit
vtkArrayExtents
(
const
CoordinateT
i);
86
// Description:
87
// Create one-dimensional extents.
88
explicit
vtkArrayExtents
(
const
vtkArrayRange
& i);
90
92
95
vtkArrayExtents
(
const
CoordinateT
i,
const
CoordinateT
j);
96
// Description:
97
// Create two-dimensional extents.
98
vtkArrayExtents
(
const
vtkArrayRange
& i,
const
vtkArrayRange
& j);
100
102
105
vtkArrayExtents
(
const
CoordinateT
i,
const
CoordinateT
j,
const
CoordinateT
k);
106
// Description:
107
// Create three-dimensional extents.
108
vtkArrayExtents
(
const
vtkArrayRange
& i,
const
vtkArrayRange
& j,
const
vtkArrayRange
& k);
110
113
static
const
vtkArrayExtents
Uniform(
DimensionT
n,
CoordinateT
m);
114
117
void
Append(
const
vtkArrayRange
&
extent
);
118
120
DimensionT
GetDimensions()
const
;
121
125
SizeT
GetSize()
const
;
126
131
void
SetDimensions(
DimensionT
dimensions);
132
134
vtkArrayRange
& operator[](
DimensionT
i);
135
137
const
vtkArrayRange
& operator[](
DimensionT
i)
const
;
138
140
bool
operator==
(
const
vtkArrayExtents
& rhs)
const
;
141
143
bool
operator!=
(
const
vtkArrayExtents
& rhs)
const
;
144
151
bool
ZeroBased()
const
;
152
156
bool
SameShape(
const
vtkArrayExtents
& rhs)
const
;
157
164
void
GetLeftToRightCoordinatesN(
SizeT
n,
vtkArrayCoordinates
& coordinates)
const
;
165
172
void
GetRightToLeftCoordinatesN(
SizeT
n,
vtkArrayCoordinates
& coordinates)
const
;
173
178
bool
Contains(
const
vtkArrayExtents
& extents)
const
;
179
185
bool
Contains(
const
vtkArrayCoordinates
& coordinates)
const
;
186
187
VTK_COMMON_EXPORT
friend
ostream&
operator<<
(
188
ostream& stream,
const
vtkArrayExtents
& rhs);
189
190
private
:
191
//BTX
192
std::vector<vtkArrayRange> Storage;
193
//ETX
194
};
195
196
#endif
Generated on Wed Nov 21 2012 21:33:39 for VTK by
1.8.2