Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
5bad9d3d
Commit
5bad9d3d
authored
Nov 24, 2005
by
David Gobbi
Browse files
BUG: Fix for bug 2524. Now GetBounds works when spacing is negative.
parent
5ebbb7b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Filtering/vtkImageData.cxx
View file @
5bad9d3d
...
...
@@ -32,7 +32,7 @@
#include
"vtkVoxel.h"
#include
"vtkInformationVector.h"
vtkCxxRevisionMacro
(
vtkImageData
,
"1.1
7
"
);
vtkCxxRevisionMacro
(
vtkImageData
,
"1.1
8
"
);
vtkStandardNewMacro
(
vtkImageData
);
//----------------------------------------------------------------------------
...
...
@@ -933,13 +933,18 @@ void vtkImageData::ComputeBounds()
vtkMath
::
UninitializeBounds
(
this
->
Bounds
);
return
;
}
this
->
Bounds
[
0
]
=
origin
[
0
]
+
(
extent
[
0
]
*
spacing
[
0
]);
this
->
Bounds
[
2
]
=
origin
[
1
]
+
(
extent
[
2
]
*
spacing
[
1
]);
this
->
Bounds
[
4
]
=
origin
[
2
]
+
(
extent
[
4
]
*
spacing
[
2
]);
this
->
Bounds
[
1
]
=
origin
[
0
]
+
(
extent
[
1
]
*
spacing
[
0
]);
this
->
Bounds
[
3
]
=
origin
[
1
]
+
(
extent
[
3
]
*
spacing
[
1
]);
this
->
Bounds
[
5
]
=
origin
[
2
]
+
(
extent
[
5
]
*
spacing
[
2
]);
int
swapXBounds
=
(
spacing
[
0
]
<
0
);
// 1 if true, 0 if false
int
swapYBounds
=
(
spacing
[
1
]
<
0
);
// 1 if true, 0 if false
int
swapZBounds
=
(
spacing
[
2
]
<
0
);
// 1 if true, 0 if false
this
->
Bounds
[
0
]
=
origin
[
0
]
+
(
extent
[
0
+
swapXBounds
]
*
spacing
[
0
]);
this
->
Bounds
[
2
]
=
origin
[
1
]
+
(
extent
[
2
+
swapYBounds
]
*
spacing
[
1
]);
this
->
Bounds
[
4
]
=
origin
[
2
]
+
(
extent
[
4
+
swapZBounds
]
*
spacing
[
2
]);
this
->
Bounds
[
1
]
=
origin
[
0
]
+
(
extent
[
1
-
swapXBounds
]
*
spacing
[
0
]);
this
->
Bounds
[
3
]
=
origin
[
1
]
+
(
extent
[
3
-
swapYBounds
]
*
spacing
[
1
]);
this
->
Bounds
[
5
]
=
origin
[
2
]
+
(
extent
[
5
-
swapZBounds
]
*
spacing
[
2
]);
}
//----------------------------------------------------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment