[vtk-developers] New image mappers

Dean Inglis dean.inglis at camris.ca
Tue Apr 5 04:10:39 EDT 2011


another observation, re window level code in vtkInteractorStyleImage.cxx:

the following at ~line 511 does not allow for inverting the image
by windowing:

    if ( newWindow < 0.01 )
      {
      newWindow = 0.01;
      }

as opposed to similar code found in vtkImageViewer2:

      if (fabs(newWindow) < 0.01)
        {
        newWindow = 0.01*(newWindow < 0 ? -1 : 1);
        }

Is there a reason why inverting the image by windowing is disabled?

thanks,
Dean

> Hi David,
>
> great work on the new image mappers/property!  A couple of comments about
> vtkInteractorStyleImage.  I tried 
> VTK/Examples/ImageProcessing/ImageInteractorReslice.py
> switching the interactor style from 3D to 2D and notice that switching 
> between x y z
> orientations as well as ctrl + right button for slice scrolling all works 
> nicely!
> Not sure if this is a bug, but if I pre-set the slice mapper orientation 
> to anything other than z:
> im.SetOrientationToX()
> when I run the script the slice orientation still comes up as z until I 
> hit the x char.
> Also, I notice if I start in z orientation, and then hit z char, the slice 
> changes (at least
> with the example data set) by a slice or two.  Finally, it would be useful 
> to
> have events for StartSliceEvent, EndSliceEvent and an 
> ImageOrientationChangedEvent
> in vtkInteractoStyleImage.
>
> Dean
>
>
> ---- Original Message ----- 
> Sent: Thursday, March 31, 2011 3:22 PM
> Subject: Re: [vtk-developers] New image mappers
>
>
> A few new image mapper items have just been committed.  I'd love to
> hear some feedback about these classes (bug reports, feature requests,
> praise, whatever).  So far I haven't heard from anyone who has tried
> them since I submitted them.
>
> The new items:
>
> 1) A "vtkImageStack" class and a SetLayerNumber() method in
> vtkImageProperty.  The image stack layers the images in the correct
> order, and it does a simple two-pass rendering trick where it delays
> writing to the depth buffer until all of the images have rendered, in
> order to avoid depth-buffer coincidence artifacts.
>
> 2) Assemblies can now be used with vtkImageSlice.  This was broken before.
>
> 3) Checkerboarding is supported, it can be turned on and off in the
> image property.
>
> These are probably the last changes that I will be making for the next
> few weeks.
>
> - David
>
>
> On Mon, Mar 21, 2011 at 11:27 AM, David Gobbi <david.gobbi at gmail.com> 
> wrote:
>> The dashboard is coming up clean for the new image mapper classes
>> (vtkImageSliceMapper and vtkImageResliceMapper) so I'm confident
>> that they're ready to use now.
>>
>> There are two issues remaining to be fixed:
>> - They always render duing the "Opaque" pass
>> - They don't work properly when in an assembly
>>
>> I'm thinking that I'll let the user select which pass to render in:
>> 1) as an underlay (render first, don't set the depth buffer)
>> 2) as per the default (check and set the depth buffer)
>> 3) in "translucent" pass (check but don't set the depth buffer)
>> 4) as an overlay (render last, don't check or set depth buffer)
>>
>> Not giving the user access to all of these options seems unnecessarily
>> restrictive (and this restrictiveness was one thing I disliked about the
>> vtkImageActor).
>>
>> The assembly issue is a bug, so I just have to fix it. I'm also strongly
>> considering an image-specific assembly subclass called "vtkImageStack"
>> to simplify layering of images. The idea is that each image can be
>> assigned a layer number, and vtkImageStack will ensure that the images
>> in the stack are sorted according to this number. This will also allow me
>> to add some tricks to eliminate all depth buffer coincidence problems
>> between the images.
>>
>> - David
>>
>>
>> On Tue, Mar 15, 2011 at 8:25 AM, David Gobbi <david.gobbi at gmail.com> 
>> wrote:
>>> The new image mappers have been merged into VTK.
>>> For a description of these mappers, see the wiki page:
>>> http://www.vtk.org/Wiki/VTK/Image_Rendering_Classes
>>>
>>> - David
>>>
>>>
>>> On Mon, Mar 14, 2011 at 7:40 AM, David Gobbi <david.gobbi at gmail.com> 
>>> wrote:
>>>> I just pushed another image-mapper patchset to gerrit this
>>>> morning. In this patchset, vtkImage has been renamed to
>>>> vtkImageSlice and more bugs have been fixed. Unless
>>>> something comes up, I'll merge this into VTK tomorrow.
>>>>
>>>> - David
>>>>
>>>>
>>>> On Fri, Mar 11, 2011 at 10:10 AM, David Gobbi <david.gobbi at gmail.com> 
>>>> wrote:
>>>>> I've updated gerrit with my latest image mapper patches.
>>>>> http://review.source.kitware.com/1163
>>>>> This patch set includes a full set of regression tests.
>>>>> I'm hoping to be able to move this into VTK next week.
>>>>>
>>>>> - David
>>>>>
>>>>>
>>>>> On Tue, Mar 8, 2011 at 2:06 PM, David Gobbi <david.gobbi at gmail.com> 
>>>>> wrote:
>>>>>> I've pushed my new image mapper classes to Gerrit,
>>>>>> you should be able to find them at the following link:
>>>>>> http://review.source.kitware.com/1163
>>>>>>
>>>>>> They come with one example (in python, of course)
>>>>>> and over the next few days I'll add some regression
>>>>>> tests.
>>>>>>
>>>>>> - David
>>>>>>
>>>>>
>>>>
>>>
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
> 




More information about the vtk-developers mailing list