Sorry, I’m not familiar with VTK picking, but AFAIK, there is some picking 
functionality in our mitkVtkPropRenderer. At least there’s a method for setting 
a picking mode and to retrieve a world position from a screen position. Also a 
method for picking a datanode can be found in that class. You could try to 
utilize these APIs.

Best,
Stefan

From: Admin Uniapp [mailto:contactuni...@gmail.com]
Sent: Mittwoch, 25. Oktober 2017 16:29
To: Dinkelacker, Stefan
Cc: Goch, Caspar Jonas; MITK
Subject: Re: [mitk-users] VTK mesh rendering issue

Hi Stefan,

Many thanks for looking into this. I tried to apply the VTK Depth Sorting 
filter on the mesh before visualising it in the renderer, which sort of fixed 
the visualisation problem but then I'm visualising the surface to allow the 
user to select points/cells on the mesh. The results coming from the VTK 
interactor and mouse event positions were still all over the place. It seems 
that although the visualisation is fixed, the event positions returned by the 
VTK interactor still struggles to find the right position (they fall into the 
surface). What are your thoughts on the best approach to tackle this? I have 
the same issue on two separate machines.

BW

On Wed, Oct 25, 2017 at 3:14 PM, Dinkelacker, Stefan 
<s.dinkelac...@dkfz-heidelberg.de<mailto:s.dinkelac...@dkfz-heidelberg.de>> 
wrote:
Thanks for the mesh. It really seems to be something related to the combination 
of the MITK rendering window configuration and the graphics driver. Most of the 
time these kinds of rendering artifacts could be resolved by upgrading the 
graphics driver. I do not have MITK 2016.03 installed, but with 2016.11 on 
Ubuntu 17.04 I can kind of reproduce the appearance you have from certain 
angles by reducing the opacity a little bit but I can then solve it by 
activating Depth Sorting for the mesh in the Properties View. So basically it 
is a deph buffer or sorting problem, which again is something we encountered on 
some computers and notebooks with older or open source nvidia graphics drivers 
compared to recent closed ones like the nvidia-3xy packages.

Caspar could reproduce your problem with MITK 2016.03 in an Ubuntu VM but this 
is not very surprising because of the reduced OpenGL capabilities in such an 
environment. However, we also noticed that in his VM, the inner faces were 
rendered instead of the outer faces which in the first place reveal the 
artifacts (you can check this with the Backface Culling property). If the mesh 
has correct normals, it might happen in the cleaning step of MITK when opening 
a mesh.

From: Admin Uniapp 
[mailto:contactuni...@gmail.com<mailto:contactuni...@gmail.com>]
Sent: Mittwoch, 25. Oktober 2017 13:51
To: Goch, Caspar Jonas
Cc: MITK
Subject: Re: [mitk-users] VTK mesh rendering issue

Hi Casper,

Please have a look at the attachment. Just to remind you this issue happens on 
Ubuntu 16.04.3 LTS and with MITK 2016.03.0.
Many thanks for your kind help.

All the best
Dora

On Wed, Oct 25, 2017 at 12:42 PM, Goch, Caspar Jonas 
<c.g...@dkfz-heidelberg.de<mailto:c.g...@dkfz-heidelberg.de>> wrote:
Hi Dora,

would it be possible for you to share the mesh with us? That would make 
troubleshooting easier.

Best,
Caspar

Von: Admin Uniapp 
[mailto:contactuni...@gmail.com<mailto:contactuni...@gmail.com>]
Gesendet: Mittwoch, 25. Oktober 2017 12:59

An: Goch, Caspar Jonas
Cc: MITK
Betreff: Re: [mitk-users] VTK mesh rendering issue

Hello everyone,

Can anyone please shed some light on this annoying issue? The surface mesh I'm 
trying to visualise is "not even supposed" to be transparent. It's a solid 
simple VTK mesh which has no problem rendering on a standalone VTK application. 
The rendering issue only happens within the MITK platform. As parts of 
visualisation disappears when I rotate the mesh, I can't reliably pick 
cells/points on the surface of this mesh within MITK. I notices some other user 
has reported a similar bug: https://phabricator.mitk.org/T23485 too.

Any help or hints would go a long way as I've been stuck on this for a while 
now.

Many thanks
Dora

On Fri, Oct 20, 2017 at 1:41 PM, Admin Uniapp 
<contactuni...@gmail.com<mailto:contactuni...@gmail.com>> wrote:
Hi again,

I tried to code vtkDepthSortPolyData in my application to fix the rendering 
issue (discussed before) in a custom VTK renderer I have built on top of MITK. 
The issue now I'm facing is the location of geteventposition (mouse locations) 
from the VTK interactor seems to be all over the place. Is there anyway to fix 
this rendering problem in MITK? I don't think enabling Depth Sorting would be a 
good/long term solution. Any ideas as always would be highly appreciated.

Best wishes

On Tue, Oct 17, 2017 at 11:52 AM, Admin Uniapp 
<contactuni...@gmail.com<mailto:contactuni...@gmail.com>> wrote:
Hi Caspar,
Switching the opacity makes the whole mesh more opaque or transparent but 
doesn't change the strange visualisation problem. The meshes I'm testing are 
not supposed to be transparent at all.
Thanks for all your help.
Best wishes

On Mon, Oct 16, 2017 at 12:52 PM, Goch, Caspar Jonas 
<c.g...@dkfz-heidelberg.de<mailto:c.g...@dkfz-heidelberg.de>> wrote:
Hi Dora,

I know we had some issues with depth sorting for transparent surfaces over the 
years. Does your visualization change when you right click the surface in the 
data manager and switch the opacity between 1.0 and 0.99?

Best,
Caspar

Von: Admin Uniapp 
[mailto:contactuni...@gmail.com<mailto:contactuni...@gmail.com>]
Gesendet: Montag, 16. Oktober 2017 12:44

An: Goch, Caspar Jonas
Cc: MITK
Betreff: Re: [mitk-users] VTK mesh rendering issue

Hi Caspar,

Thanks for your reply. I tried to change the rendering properties and it seems 
that enabling the "Depth Sorting" option fix the problem temporarily. Does this 
give a hint what might be the underlying problem?

The specs are:

Ubuntu 16.04 LTS
OpenGL version string: 3.0 Mesa 17.0.7
Graphics: Intel HD Graphics 620 (Kabylake GT2)
Processor: Intel Core i7-7600U CPU @ 2.80 GHz x 4


On Mon, Oct 16, 2017 at 10:04 AM, Goch, Caspar Jonas 
<c.g...@dkfz-heidelberg.de<mailto:c.g...@dkfz-heidelberg.de>> wrote:
Hi Dora,

sorry for the late reply. I am not sure what the cause might be. It seems to be 
on our side, so it might be due to specific options we set on the rendering 
context that differ from the default vtk options. It could be helpful to know 
the hardware and openGL specs for your systems.
You could try changing some of the surface rendering properties to narrow down 
the culprit. (Just open the properties view and change e.g. the 
materal.Interpolation method)

Best,
Caspar

Von: Admin Uniapp 
[mailto:contactuni...@gmail.com<mailto:contactuni...@gmail.com>]
Gesendet: Donnerstag, 5. Oktober 2017 16:47
An: Goch, Caspar Jonas
Cc: MITK
Betreff: Re: [mitk-users] VTK mesh rendering issue

Dear Casper,
I just created a standalone app to visualise the same mesh with VTK alone and 
it seems fine (attached screenshot). The VTK version I used was the exact same 
as what comes with MITK 2016.3.0 super build.

It appears that something in the MITK 2016.3.0 renderer window is not happy 
with my version of Ubuntu 16.04. I tested the same mesh both on a laptop and a 
desktop with Ubuntu 16.04 and they both had the same issue. They both have a 
clean newly installed version of Ubuntu. The exact same setup on older Ubuntu 
14.04 doesn't suffer from the issue.
Any ideas what I should be looking at?
Many thanks as always.


On Thu, Oct 5, 2017 at 10:29 AM, Goch, Caspar Jonas 
<c.g...@dkfz-heidelberg.de<mailto:c.g...@dkfz-heidelberg.de>> wrote:
Hi Dora,

it might be something with the way we render surfaces. It might also be 
something with VTK itself. Could you render the surface in VTK directly and 
report whether the same thing happens there?
I have opened a task for it [1]. Even if it is a VTK issue it would be 
interesting to know your laptops graphics chip.

Best,
Caspar

[1] https://phabricator.mitk.org/T23485


Von: Admin Uniapp 
[mailto:contactuni...@gmail.com<mailto:contactuni...@gmail.com>]
Gesendet: Freitag, 29. September 2017 16:25
An: MITK
Betreff: [mitk-users] VTK mesh rendering issue

Hi everyone,
I load a simple VTK mesh in MITK 2016.03 and the 3D view has issues rendering 
it properly. By rotating the mesh around half of its surface become transparent 
for no reason and you can see the other side of the mesh. I attached a 
screenshot too.
This doesn't happen to me on my Linux desktop but only on the Linux Ubuntu 
laptop, so I guessed maybe there is something wrong with my graphics card 
driver but the same mesh on the same laptop renders normally on Paraview for 
instance.
Any ideas?
Many thanks
Dora







------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to