[Insight-users] DICOM and orientation
Lic. José M. Rodriguez Bacallao
jmrbcu at gmail.com
Tue Jun 30 10:03:54 EDT 2009
hi, I used vtkImageFlip to do that flip but with WrapITK I could be
use itkFlipImageFilter this way:
with itk:
flip = itk.FlipImageFilter[image_type].New(Input = fr.GetOutput())
flip.SetFlipAxes((0,1))
con.SetInput(flip.GetOutput())
with vtk:
flip = vtk.vtkImageFlip()
flip.SetFilteredAxis(1)
flip.SetInput(con.GetOutput())
On 6/30/09, Amardeep Singh <amar.singh at gmx.de> wrote:
> Hi
>
> I guess, you could use the itkFlipImageFilter before you pass the image
> to VTK for visualisation.
> Unfortunately, I don't know how to do that in WrapITK, but in the
> following post you can see
> an example of its use in C++:
> http://www.nabble.com/Re:-Nifti-vs-Dicom-orientation-td23276815.html
>
> The following post might be of interest, as well:
> http://www.itk.org/pipermail/insight-users/2005-April/012900.html
>
> HTH
> Amardeep
>
> Lic. José M. Rodriguez Bacallao wrote:
>> no, I don't miss the answer, in fact, I asked how to display the image
>> in a correct way!!!
>>
>> On 6/30/09, Amardeep Singh <amar.singh at gmx.de> wrote:
>>
>>> Hi
>>>
>>> You might have missed Bill Lorensen's answer to your question. Have
>>> another look:
>>> http://n2.nabble.com/DICOM-and-orientation-td3176010.html#a3176022
>>>
>>> Regards
>>> Amardeep
>>>
>>> Lic. José M. Rodriguez Bacallao wrote:
>>>
>>>> no one?
>>>>
>>>> On 6/29/09, Lic. José M. Rodriguez Bacallao <jmrbcu at gmail.com> wrote:
>>>>
>>>>
>>>>> hi folks, I'm reading a dicom image with itk (WrapITK) and visualizing
>>>>> with vtk but, when I try to visualize it, it show inverted in the
>>>>> screen, this is my code to read and visualize the image:
>>>>>
>>>>> image_type = itk.Image[itk.SS, 2]
>>>>>
>>>>> image_type = itk.Image[itk.SS, 2]
>>>>> fr = itk.ImageFileReader[image_type].New()
>>>>> con = itk.ImageToVTKImageFilter[image_type].New()
>>>>>
>>>>> fr.SetFileName('/home/jmrbcu/temp/IM66.dcm')
>>>>> con.SetInput(fr.GetOutput())
>>>>>
>>>>> v = vtk.vtkImageViewer2()
>>>>> ri = vtk.vtkRenderWindowInteractor()
>>>>> v.SetupInteractor(ri)
>>>>> v.SetInput(con.GetOutput())
>>>>>
>>>>> v.Render()
>>>>> v.SetColorWindow(255)
>>>>> v.SetColorLevel(128)
>>>>>
>>>>> ri.Start()
>>>>>
>>>>> --
>>>>> 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 Insight-users
mailing list