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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Alex W.
VTK
Commits
7d9a5bc0
Commit
7d9a5bc0
authored
12 years ago
by
David Gobbi
Browse files
Options
Downloads
Plain Diff
Merge branch 'image-style-winlev-fix-rel' into dgobbi-rollup-rel
Change-Id: I870ddbb823afdfbd37ae8ada7ff08d26587d7bef
parents
da9478dc
7f08be80
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Rendering/vtkInteractorStyleImage.cxx
+14
-4
14 additions, 4 deletions
Rendering/vtkInteractorStyleImage.cxx
Rendering/vtkInteractorStyleImage.h
+8
-0
8 additions, 0 deletions
Rendering/vtkInteractorStyleImage.h
with
22 additions
and
4 deletions
Rendering/vtkInteractorStyleImage.cxx
+
14
−
4
View file @
7d9a5bc0
...
...
@@ -89,6 +89,10 @@ void vtkInteractorStyleImage::StartWindowLevel()
return
;
}
this
->
StartState
(
VTKIS_WINDOW_LEVEL
);
// Get the last (the topmost) image
this
->
SetCurrentImageToNthImage
(
-
1
);
if
(
this
->
HandleObservers
&&
this
->
HasObserver
(
vtkCommand
::
StartWindowLevelEvent
))
{
...
...
@@ -96,9 +100,6 @@ void vtkInteractorStyleImage::StartWindowLevel()
}
else
{
// Get the last (the topmost) image
this
->
SetCurrentImageToNthImage
(
-
1
);
if
(
this
->
CurrentImageProperty
)
{
vtkImageProperty
*
property
=
this
->
CurrentImageProperty
;
...
...
@@ -642,16 +643,25 @@ void vtkInteractorStyleImage::SetCurrentImageToNthImage(int i)
int
j
=
0
;
for
(
props
->
InitTraversal
(
pit
);
(
prop
=
props
->
GetNextProp
(
pit
));
)
{
bool
foundImageProp
=
false
;
for
(
prop
->
InitPathTraversal
();
(
path
=
prop
->
GetNextPath
());
)
{
vtkProp
*
tryProp
=
path
->
GetLastNode
()
->
GetViewProp
();
if
(
(
imageProp
=
vtkImageSlice
::
SafeDownCast
(
tryProp
))
!=
0
)
{
if
(
j
==
i
)
{
break
;
}
if
(
j
==
i
)
{
foundImageProp
=
true
;
break
;
}
imageProp
=
0
;
j
++
;
}
}
if
(
foundImageProp
)
{
break
;
}
}
if
(
i
<
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Rendering/vtkInteractorStyleImage.h
+
8
−
0
View file @
7d9a5bc0
...
...
@@ -156,6 +156,14 @@ public:
void
SetImageOrientation
(
const
double
leftToRight
[
3
],
const
double
bottomToTop
[
3
]);
// Description:
// Get the current image property, which is set when StartWindowLevel
// is called immediately before StartWindowLevelEvent is generated.
// This is the image property of the topmost vtkImageSlice in the
// renderer or NULL if no image actors are present.
vtkImageProperty
*
GetCurrentImageProperty
()
{
return
this
->
CurrentImageProperty
;
}
protected
:
vtkInteractorStyleImage
();
~
vtkInteractorStyleImage
();
...
...
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