image_plane_widget overlay

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

image_plane_widget overlay

koudoro
Hi All,

I just want to overlay 2 image_plane_widgets. To do this, I try to  
play with  "plane_opacity" of these actors.

On this small example (attached file), we can see data (on background)  
and its mask (in foreground). if only one of the 2 plane is active, we  
can obsviously only see this one.

My problem :   if I re-activate the previously inactive one, both  
plane are visible however, the plane that has just been activated is  
in front of this other one.

How can I always have the same image_plane_widget in the foreground ?

Thanks in advance,

Serge





_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

overlay.py (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: image_plane_widget overlay

Gael Varoquaux
On Thu, Feb 25, 2010 at 12:15:17PM +0100, koudoro wrote:

> I just want to overlay 2 image_plane_widgets. To do this, I try to play
> with  "plane_opacity" of these actors.
>
> On this small example (attached file), we can see data (on background)  
> and its mask (in foreground). if only one of the 2 plane is active, we  
> can obsviously only see this one.
>
> My problem :   if I re-activate the previously inactive one, both plane
> are visible however, the plane that has just been activated is in front
> of this other one.
>
> How can I always have the same image_plane_widget in the foreground ?

Hi,

AFAICT it's a bug of the image plane widget in VTK, so we can't do much
about it. You could probably use a scalar cut plane as a workaround, but
it will be much slower, though, and will use more memory.

I don't reproduce the problem though. It's probably fixed in the more
recent versions of VTK, or its due to your graphic card. What's your
graphic card and your VTK version?

import vtk
v=  vtk.vtkVersion()
v.GetVTKVersion()

Cheers,

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: image_plane_widget overlay

koudoro
So,

- vtk version: 5.4.0
- graphic card: NVIDIA GeForce 9400M

Thanks for the workaround but I prefer to keep memory for image  
processing.
Do you know another way to visualize several 3D overlayed images (3 or  
4 gray scale images) ?

vtkimageblend can be a solution but find the perfect lut afraid  
me.... :-)

Thanks for your help,

Serge

ps: Does it exist an " imagetracerwigdet "'s example on ets svn?






Le 25 févr. 10 à 13:19, Gael Varoquaux a écrit :

> On Thu, Feb 25, 2010 at 12:15:17PM +0100, koudoro wrote:
>> I just want to overlay 2 image_plane_widgets. To do this, I try to  
>> play
>> with  "plane_opacity" of these actors.
>>
>> On this small example (attached file), we can see data (on  
>> background)
>> and its mask (in foreground). if only one of the 2 plane is active,  
>> we
>> can obsviously only see this one.
>>
>> My problem :   if I re-activate the previously inactive one, both  
>> plane
>> are visible however, the plane that has just been activated is in  
>> front
>> of this other one.
>>
>> How can I always have the same image_plane_widget in the foreground ?
>
> Hi,
>
> AFAICT it's a bug of the image plane widget in VTK, so we can't do  
> much
> about it. You could probably use a scalar cut plane as a workaround,  
> but
> it will be much slower, though, and will use more memory.
>
> I don't reproduce the problem though. It's probably fixed in the more
> recent versions of VTK, or its due to your graphic card. What's your
> graphic card and your VTK version?
>
> import vtk
> v=  vtk.vtkVersion()
> v.GetVTKVersion()
>
> Cheers,
>
> Gaël
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: image_plane_widget overlay

Gael Varoquaux
On Thu, Feb 25, 2010 at 02:06:03PM +0100, koudoro wrote:
> - vtk version: 5.4.0
> - graphic card: NVIDIA GeForce 9400M

OK, its probably a graphics card problem. You are unlucky: on the two
boxes I have here, I don't have the problem.

> Thanks for the workaround but I prefer to keep memory for image  
> processing.

I can understand that.

> Do you know another way to visualize several 3D overlayed images (3 or  
> 4 gray scale images) ?

I have looked a bit at that, and came to the conclusion that to do things
cleanly, I probably needed to use a blending filter. I moved on to
something else...

What exactly do you want to do: display different plane at different
locations, or one plane at the same location on which you switch the
scalar filed that you are looking at?

> vtkimageblend can be a solution but find the perfect lut afraid  
> me.... :-)

It's probably a good option, I would say it's worth exploring, a bit of
effort thought.

If you tell me your end goal, we can try and come up with a trick to give
acceptable functionality without too much coding.

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev