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
Aron Helser
SMTK
Commits
febeb780
Commit
febeb780
authored
Mar 29, 2020
by
Aron Helser
Browse files
vtk Representation: reset slice viz and position when volume is added later.
parent
93b80096
Pipeline
#166729
failed with stages
in 19 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
smtk/extension/paraview/server/vtkSMTKResourceRepresentation.cxx
View file @
febeb780
...
...
@@ -290,12 +290,26 @@ int vtkSMTKResourceRepresentation::RequestData(
this
->
SliceXY
->
SetSliceMode
(
vtkImageSliceRepresentation
::
XY_PLANE
);
this
->
SliceYZ
->
SetSliceMode
(
vtkImageSliceRepresentation
::
YZ_PLANE
);
this
->
SliceXZ
->
SetSliceMode
(
vtkImageSliceRepresentation
::
XZ_PLANE
);
// when slice reps were hidden, their default slice is zero - reset
if
(
this
->
SliceXY
->
GetSlice
()
==
0
&&
this
->
SliceYZ
->
GetSlice
()
==
0
&&
this
->
SliceXZ
->
GetSlice
()
==
0
)
{
int
dimensions
[
3
];
sliceVolume
->
GetDimensions
(
dimensions
);
this
->
SliceXY
->
SetSlice
((
dimensions
[
2
]
-
1
)
/
2
);
this
->
SliceYZ
->
SetSlice
((
dimensions
[
0
]
-
1
)
/
2
);
this
->
SliceXZ
->
SetSlice
((
dimensions
[
1
]
-
1
)
/
2
);
}
this
->
SliceXY
->
SetInputArrayToProcess
(
0
,
0
,
0
,
vtkDataObject
::
FIELD_ASSOCIATION_POINTS
,
scalarName
.
c_str
());
this
->
SliceYZ
->
SetInputArrayToProcess
(
0
,
0
,
0
,
vtkDataObject
::
FIELD_ASSOCIATION_POINTS
,
scalarName
.
c_str
());
this
->
SliceXZ
->
SetInputArrayToProcess
(
0
,
0
,
0
,
vtkDataObject
::
FIELD_ASSOCIATION_POINTS
,
scalarName
.
c_str
());
this
->
SliceXY
->
SetVisibility
(
true
);
this
->
SliceYZ
->
SetVisibility
(
true
);
this
->
SliceXZ
->
SetVisibility
(
true
);
}
}
else
...
...
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