Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Palmer
VTK
Commits
219b75b9
Commit
219b75b9
authored
10 years ago
by
Robert Maynard
Browse files
Options
Downloads
Patches
Plain Diff
Correct ComputeScalarRange when dealing with multiple components.
Change-Id: I4e441300a189d9f0c7f41c26378b8c05429d54b1
parent
074e1fe1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Common/Core/vtkDataArray.cxx
+7
-2
7 additions, 2 deletions
Common/Core/vtkDataArray.cxx
with
7 additions
and
2 deletions
Common/Core/vtkDataArray.cxx
+
7
−
2
View file @
219b75b9
...
...
@@ -188,7 +188,8 @@ void vtkDataArrayComputeScalarRange(InputIterator begin, InputIterator end,
minmaxRange
[
0
]
=
*
begin
;
minmaxRange
[
1
]
=
*
begin
;
//special case of a single value scalar range
//special case of a single value scalar range to help the compiler onroll
//the for loop
if
(
numberOfComponents
==
1
&&
component
==
0
)
{
for
(;
begin
!=
end
;
++
begin
)
...
...
@@ -199,7 +200,11 @@ void vtkDataArrayComputeScalarRange(InputIterator begin, InputIterator end,
}
else
{
for
(;
begin
!=
end
;
begin
+=
numberOfComponents
)
//Since we are dealing with arbitrary iterators instead of pointers
//we can't compute the exact end iterator value since the iterators them
//selves could check if they go out of bounds. So we have to use the less
//then operator to evaluate that our iterator is still valid.
for
(;
begin
<
end
;
begin
+=
numberOfComponents
)
{
minmaxRange
[
0
]
=
std
::
min
(
begin
[
component
],
minmaxRange
[
0
]);
minmaxRange
[
1
]
=
std
::
max
(
begin
[
component
],
minmaxRange
[
1
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment