[vtkusers] vtkDICOMImageReader results,..

Miguel Angel Rodriguez Florido marf at ctm.ulpgc.es
Fri Jul 27 09:55:23 EDT 2007


	Well, I was seeing your code, when I had an idea to check before update
my VTK.

	I saw that you check the image scalar range. I did it, and I got "0
1",..ahahahah!! (light :-)). I din't have an "Update", so the class was
losing the scalar range.

	So, adding the "Update" method to the reader, it works perfectly!!!.

	Thank you very much.

	Best.

Mathieu Malaterre wrote:
> Hi Miguel,
> 
>   Thanks for sending me a copy of the image. Using vtkDICOMImageReader
> from VTK CVS I can read the image perfectly.
> 
>>>> import vtk
>>>> r = vtk.vtkDICOMImageReader()
>>>> r.SetFileName('DCT0045.dcm')
>>>> r.Update()
>>>> r.GetOutput().GetScalarRange()
> (-1023.0, 3072.0)
>>>> w = vtk.vtkXMLImageDataWriter()
>>>> w.SetFileName('/tmp/DCT0045.vti')
>>>> w.SetInput(r.GetOutput())
>>>> w.Write()
> 
> I can load the image fine paraview.
> 
> You should either use a more recent VTK version. Or switch to using
> GDCM (same DICOM lib as ITK).
> 
> HTH
> -Mathieu


-- 
Miguel Angel Rodriguez Florido
Center for Technology in Medicine-ULPGC-Gran Canaria-CanaryIslands,Spain
Emails:marf@{ctm.ulpgc.es,bwh.harvard.edu}-http://www.ctm.ulpgc.es/~marf
Tfnos:+34 928 451253, +34 928 452956 - Fax:+34 928 451243



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070727/33e1481c/attachment.bin>


More information about the vtkusers mailing list