[vtkusers] Part of an actor invisible, the rest visible

Baris Yalcin B.Yalcin at dkfz-heidelberg.de
Tue Jun 29 05:08:38 EDT 2004


Am Montag, 28. Juni 2004 22:52 schrieb David.Pont at ForestResearch.co.nz:

Hi Dave, 

thank you for this suggestion. I tried the vtkDepthSortPolyData, but it didn't 
work. Depending on the angle between the camera and the part of the object  
which should be invisible, you can see or not see the invisible part.

As attachement you find 2 screenshots: in "screenshot_invisible.jpg" the 
invisible part of the object is really invisible, vtkDepthSortPolyData works 
here. 
But if rotate the object a little bit, then I have the result in 
"screenshot_visible.jpg": the invisible part is again visible and hides the 
structure behind.

My current pipeline is:
PolyData->TubeFilter->PolyDataMapper->Actor->Renderer

The pipeline with vtkDepthSortPolyData:
PolyData->TubeFilter->DepthSortPolyData->PolyDataMapper->Actor->Renderer

And here is the code:
------------------------------------------------------------------------------------
...
...
vtkTubeFilter tubeFilter = new vtkTubeFilter();
tubeFilter.SetInput( polyData );

vtkCamera camera = new vtkCamera();
vtkDepthSortPolyData depthSort = new vtkDepthSortPolyData();
depthSort.SetInput( tubeFilter.GetOutput() );   
depthSort.SetDirectionToBackToFront(); )
depthSort.SetDepthSortModeToParametricCenter();
depthSort.SetCamera(camera);
depthSort.SortScalarsOn();
depthSort.Update();             

vtkPolyDataMapper mapper = new vtkPolyDataMapper();
mapper.SetInput( depthSort.GetOutput() );
...
...
------------------------------------------------------------------------------------

Maybe I make here in the code an error with vtkDepthSortPolyData. Do you have 
any idea?

Baris 



> Baris,
>    try vtkDepthSortPolyData
>    Dave P
>
> |---------+----------------------------->
> |
> |         |           Baris Yalcin      |
> |         |           <B.Yalcin at dkfz-hei|
> |         |           delberg.de>       |
> |         |           Sent by:          |
> |         |           vtkusers-bounces at v|
> |         |           tk.org            |
> |         |
> |         |
> |         |           28/06/2004 23:41  |
> |
> |---------+----------------------------->
> |
>   >------------------------------------------------------------------------
>   >--------------------------------------------------------|
>   >
>   |       To:       vtkusers at vtk.org                                       
>   |                                                        | cc:           
>   |                                                                        
>   |                                   | Subject:  [vtkusers] Part of an
>   | actor invisible, the rest visible                                      
>   |                  |
>   |
>   >------------------------------------------------------------------------
>   >--------------------------------------------------------|
>
> Hi everyone,

-- 
MSc Informationstechnik Baris Yalcin
Deutsches Krebsforschungszentrum      
Abteilung Medizinische und Biologische Informatik 
Im Neuenheimer Feld 280    
D-69120 Heidelberg
  
Tel: (+49) 6221-42 2325
Fax: (+49) 6221-42 2345
E-Mail: B.Yalcin at dkfz.de 
http://mbi.dkfz-heidelberg.de/mbi/people/baris.shtml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot_invisible.jpg
Type: image/jpeg
Size: 21904 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040629/f5e977e7/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot_visible.jpg
Type: image/jpeg
Size: 23022 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040629/f5e977e7/attachment-0001.jpg>


More information about the vtkusers mailing list