[vtkusers] vtkImageColorViewer and slice orientation

David Gobbi david.gobbi at gmail.com
Mon Nov 30 17:17:24 EST 2009


On Mon, Nov 30, 2009 at 2:49 PM, Lic. José M. Rodriguez Bacallao
<jmrbcu at gmail.com> wrote:
> reader.GetOutput().Update() is not the same that reader.Update()?

When VTK 5.0 was released, data.Update() did a little bit extra that
algorithm.Update() did not do, i.e. in VTK 5.0 the pipeline was newly
designed and had some bugs.  Now the pipeline bugs are fixed, but I
still always call update on data out of habit.


> if U have a renderer per slice, why to have a reslice for every render
> and not just one?

Because I find that the easiest way to use vtkImageReslice is to make
it output just one slice.  It is just my preference, in other words.


> How do I achieve that if I change the window/level in a renderer, all
> images in the 4x4 configuration get updated with the same
> window/level?

Easy.  Use the same vtkLookupTable for all images.  In your data
pipeline, use vtkImageMapToColors() to color the data.  I cannot help
you with vtkImageColorViewer because I never use that class.

    David


> On 11/30/09, David Gobbi <david.gobbi at gmail.com> wrote:
>> Usually I use a separate renderer for each slice.  This also means a
>> separate reslice, image actor, etc.
>>
>> For this to work efficiently, you must force the reader to read all
>> the whole dicom series, like this:
>>
>> reader.GetOutput().Update()
>>
>> If you don't do this, then the reader will only read one slice at a
>> time, so if you are displaying 4x4 then it will go to the disk 16
>> times on every render.  By calling update on the the reader, you force
>> the whole series into memory.
>>
>>     David
>>
>>
>> On Mon, Nov 30, 2009 at 1:58 PM, Lic. José M. Rodriguez Bacallao
>> <jmrbcu at gmail.com> wrote:
>>> thanks, and another question:
>>>
>>> I need to display the images in a dicom serie in several
>>> configurations: just one image, 2 images side by side, 2x2 images and
>>> so on. Which is the recommended way to display those configurations in
>>> a render window, with several renderers or with several image actors?
>>>
>>> On 11/30/09, David Gobbi <david.gobbi at gmail.com> wrote:
>>>> On Mon, Nov 30, 2009 at 1:11 PM, Lic. José M. Rodriguez Bacallao
>>>> <jmrbcu at gmail.com> wrote:
>>>>> yes, thanks, in fact this is my pattern example but, in this example
>>>>> the sagital view is flipped, why is that?
>>>>
>>>> You are complaining because the head is facing right instead of facing
>>>> left??  It is still sagittal.
>>>>
>>>>> PS: So, to use ImageReslice for an dicom image viewer is not a problem?
>>>>
>>>> No problem at all.  Plenty of people use it for dicom.  The only
>>>> restrictions are the following:
>>>>
>>>> 1) the spacing must be constant
>>>>
>>>> 2) the gantry must not be tilted
>>>>
>>>> These restrictions are true for all vtkImageData.  Fortunately, CT and
>>>> MRI almost always use constant slice spacing, so that is never a
>>>> problem.  CT gantry tilt can be fairly common, though, so any dicom
>>>> image viewer should check for it.  MR images never have gantry tilt.
>>>>
>>>>     David
>>>>
>>>>
>>>>>
>>>>> On 11/30/09, David Gobbi <david.gobbi at gmail.com> wrote:
>>>>>> I didn't give the full path for the example in my last email.  Here it
>>>>>> is:
>>>>>>
>>>>>> VTK/Examples/ImageProcessing/Python/ImageSlicing.py
>>>>>>
>>>>>>    David
>>>>>>
>>>>>>
>>>>>> On Mon, Nov 30, 2009 at 12:25 PM, David Gobbi <david.gobbi at gmail.com>
>>>>>> wrote:
>>>>>>> Because no-one has contributed a reslicng image viewer to VTK yet.  I
>>>>>>> would like to do so myself, but I don't know when I will have the
>>>>>>> time.
>>>>>>>
>>>>>>> I did submit a python reslicing example to VTK that you might find
>>>>>>> useful:
>>>>>>>
>>>>>>> VTK/Examples/Python/ImageSlicing.py
>>>>>>>
>>>>>>>   David
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Nov 30, 2009 at 11:45 AM, Lic. José M. Rodriguez Bacallao
>>>>>>> <jmrbcu at gmail.com> wrote:
>>>>>>>> why is that?
>>>>>>>>
>>>>>>>> On 11/30/09, David Gobbi <david.gobbi at gmail.com> wrote:
>>>>>>>>> The only class that uses vtkImageReslice for image viewing is
>>>>>>>>> vtkImagePlaneWidget, you can try it to see if it is suitable for
>>>>>>>>> your
>>>>>>>>> application.  That is the closest thing to a generic reslicing image
>>>>>>>>> viewer that VTK has.
>>>>>>>>>
>>>>>>>>>    David
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Nov 30, 2009 at 9:20 AM, Lic. José M. Rodriguez Bacallao
>>>>>>>>> <jmrbcu at gmail.com> wrote:
>>>>>>>>>> why vtkImageColorViewer(I think that vtkImageViewer2 too) doesn't
>>>>>>>>>> use
>>>>>>>>>> vtkImageReslice for changing the slice orientation (axial, sagital
>>>>>>>>>> and
>>>>>>>>>> coronal)? I am just curious!!!
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Lic. José M. Rodriguez Bacallao
>>>>>>>>>> Centro de Biofisica Medica
>>>>>>>>>> -----------------------------------------------------------------
>>>>>>>>>> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos
>>>>>>>>>> lo
>>>>>>>>>> mismo.
>>>>>>>>>>
>>>>>>>>>> Recuerda: El arca de Noe fue construida por aficionados, el titanic
>>>>>>>>>> por profesionales
>>>>>>>>>> -----------------------------------------------------------------
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Powered by www.kitware.com
>>>>>>>>>>
>>>>>>>>>> Visit other Kitware open-source projects at
>>>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>>>>
>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>>>>>>
>>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Lic. José M. Rodriguez Bacallao
>>>>>>>> Centro de Biofisica Medica
>>>>>>>> -----------------------------------------------------------------
>>>>>>>> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos
>>>>>>>> lo
>>>>>>>> mismo.
>>>>>>>>
>>>>>>>> Recuerda: El arca de Noe fue construida por aficionados, el titanic
>>>>>>>> por profesionales
>>>>>>>> -----------------------------------------------------------------
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Lic. José M. Rodriguez Bacallao
>>>>> Centro de Biofisica Medica
>>>>> -----------------------------------------------------------------
>>>>> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
>>>>> mismo.
>>>>>
>>>>> Recuerda: El arca de Noe fue construida por aficionados, el titanic
>>>>> por profesionales
>>>>> -----------------------------------------------------------------
>>>>>
>>>>
>>>
>>>
>>> --
>>> Lic. José M. Rodriguez Bacallao
>>> Centro de Biofisica Medica
>>> -----------------------------------------------------------------
>>> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
>>> mismo.
>>>
>>> Recuerda: El arca de Noe fue construida por aficionados, el titanic
>>> por profesionales
>>> -----------------------------------------------------------------
>>>
>>
>
>
> --
> Lic. José M. Rodriguez Bacallao
> Centro de Biofisica Medica
> -----------------------------------------------------------------
> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.
>
> Recuerda: El arca de Noe fue construida por aficionados, el titanic
> por profesionales
> -----------------------------------------------------------------
>



More information about the vtkusers mailing list