Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CamiTK
Docs
Commits
aab6a004
Commit
aab6a004
authored
Nov 23, 2018
by
Jean-Loup Haberbusch
Browse files
ADDED Displaying new 3D objects in CamiTK
parent
f1cd5052
Pipeline
#15646
passed with stages
in 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/Advanced Topics/Display_new_3D_objets_in_CamiTK.md
0 → 100644
View file @
aab6a004
!!! warning
This is a work in progress. |
For some CamiTK actions, displaying new elements in the viewers might be
needed.
## How to create a new component and add it to a viewer
To complete with a nice solution.
## How to display the output of a vtk filter
This method avoid the creation of a new Component : the output of a vtk
filter can be displayed by only changing the data connection of the
initial Component.
Example with a clip filter :
```
c++
MeshComponent
*
your_mesh
;
// the initial mesh
vtkSmartPointer
<
vtkClipDataSet
>
filter
=
vtkSmartPointer
<
vtkClipDataSet
>::
New
();
filter
->
SetInputConnection
(
mesh
->
getDataPort
());
filter
->
SetClipFunction
(
your_plane
);
filter
->
Update
();
mesh
->
setDataConnection
(
filter
->
GetOutputPort
());
```
The initial mesh is unchanged, there is no need saving it before apply
the filter.
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