[vtk-developers] vtkDICOMImageReader broken in vtk 5.0 and up?
Mathieu Malaterre
mathieu.malaterre at kitware.com
Thu Apr 27 15:05:43 EDT 2006
Hi Sven,
<publicity>
As Karthik says you should really have a look into GDCM if you plan to
do some serious DICOM treatment.
</publicity>
Anyway you are still rejecting user coming from our IP, so it's always
tricky to get your data. But anyway I have it, and I'll have a look.
Thanks for the report.
Mathieu
Karthik Krishnan wrote:
> Mathieu will have more to say, but have you tried using vtkgdcmViewer. I
> use it all the time cause its in sync with gdcm cvs and usually tells me
> if things are fixed in gdcm cvs (where things are fixed more often).
>
> cvs -d:pserver:anonymous at cvs.creatis.insa-lyon.fr:2402/cvs/public co gdcm
>
> build with cmake as usual
>
> vtkgdcmViewer file.dcm
> vtkgdcmSerieViewer seriesdirectory
>
> bye
> -karthik
>
> Sven Prevrhal wrote:
>
>> Hi Mathieu and others:
>>
>> vtkDICOMImageReader or vtkImageViewer2 from 5.0 up seems to have a memory
>> problem with bigger files - I have a digitized X-ray of 10MB, and
>> older vtk
>> versions are leaky, at least the python wrappers. This is a potential
>> showstopper for me
>> I see two ways out - 1. fix vtkDICOMImageReader and/or vtkImageViewer2
>> 2. find a tool that converts to 16-bit JPEG or other format (I don't know
>> any) and try to read that.
>> Can you point me to where the problem might lie? I will try
>> implementing a
>> bug fix then.
>>
>> The DICOM file that causes a crash in my configuration is on
>> ftp://ftp.mrsc.ucsf.edu/pub/sven/SC.1.3.6.1.4.1.9590.100.1.1.581587240110609
>>
>> 28131648073180919160033
>> The JPEG version (only 8bit!) is ftp://ftp.mrsc.ucsf.edu/pub/sven/x.jpg
>>
>> Sven Prevrhal
>>
>>
>> -----Original Message-----
>> From: Sven Prevrhal [mailto:sven.prevrhal at radiology.ucsf.edu] Sent:
>> Wednesday, March 15, 2006 1:24 PM
>> To: 'Mathieu Malaterre'
>> Subject: RE: [vtkusers] vtkDICOMImageReader broken in vtk 5.0 and up?
>>
>> Great! From where do I pull the cvs sources?
>> :pserver:anonymous at public.kitware.com:/cvsroot/VTK or, as your text
>> suggests, somehow form ParaView?
>>
>> - Sven
>>
>>
>> -----Original Message-----
>> From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com]
>> Sent: Wednesday, March 15, 2006 12:15 PM
>> To: Sven Prevrhal
>> Subject: Re: [vtkusers] vtkDICOMImageReader broken in vtk 5.0 and up?
>>
>> Sven,
>>
>> I believe the seg fault you saw is fixed in current VTK CVS.
>>
>> Please give it a try if you can. Thanks for the data to reproduce
>> the problem.
>>
>>
>> $ cvs ci -m"BUG: DICOM spec do not enforce value to be present for
>> Slice Number"
>> /cvsroot/ParaView/ParaView/VTK/Utilities/DICOMParser/DICOMAppHelper.cxx,v
>> <-- DICOMAppHelper.cxx
>> new revision: 1.23; previous revision: 1.22
>> /cvsroot/ParaView/ParaView/VTK/Utilities/DICOMParser/DICOMParser.cxx,v
>> <-- DICOMParser.cxx
>> new revision: 1.15; previous revision: 1.14
>>
>> HTH
>> Mathieu
>> Ps: You may want to contact your DICOM vendor as the DICOM has a very
>> bizarre 0008,0008 Image Type value: "Vidar" ??? Whereas it should be
>> something like:
>>
>> DERIVED/SECONDARY
>>
>> Sven Prevrhal wrote:
>>
>>
>>> Hi Mathieu,
>>>
>>> You can grab the images from ftp://ftp.mrsc.ucsf.edu/pub/sven. The setup
>>> file is unrelated!
>>>
>>> Thanks for looking at this!
>>>
>>> sven
>>>
>>> Sven Prevrhal, Ph.D.
>>> Department of Radiology
>>> University of California, San Francisco
>>>
>>> 185 Berry St, Suite 350, San Francisco, CA 94107
>>> ph 415-353-9404, fax 415-353-3438
>>>
>>> Faculty Assistant: Jessica.Mapes at radiology.ucsf.edu
>>>
>>>
>>> -----Original Message-----
>>> From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com] Sent:
>>> Friday, March 10, 2006 12:49 PM
>>> To: Sven Prevrhal
>>> Cc: vtkusers at vtk.org
>>> Subject: Re: [vtkusers] vtkDICOMImageReader broken in vtk 5.0 and up?
>>>
>>> Sven Prevrhal wrote:
>>>
>>>
>>>
>>>> I have DICOM images that vtk 4.4 will read just fine, but vtk 5.0
>>>> and up and nightly builds will crash. (I built vtk with python
>>>> 2.4). Anybody experiencing similar behavior?
>>>>
>>>
>>> Can you send me a sample data to reproduce the problem ?
>>>
>>> Thanks
>>> Mathieu
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> import vtk
>>
>> # This script is for testing the 3D Sobel filter.
>> # Displays the 3 components using color.
>>
>> format = 'DICOM'
>> # Image pipeline
>> if format == 'DICOM':
>> reader = vtk.vtkDICOMImageReader()
>>
>> reader.SetFileName("C:/temp/SC.1.3.6.1.4.1.9590.100.1.1.58158724011060928131648073180919160033")
>>
>> win = 400000
>> lev = 400000
>> else:
>> reader = vtk.vtkJPEGReader()
>> reader.SetFileName("C:/temp/x.jpg")
>> win = 4000
>> lev = 0
>> viewer = vtk.vtkImageViewer()
>> viewer.SetInputConnection( reader.GetOutputPort() )
>> viewer.SetColorWindow(win)
>> viewer.SetColorLevel(lev)
>> viewer.Render()
>>
>> viewer2 = vtk.vtkImageViewer2()
>> viewer2.SetInputConnection( reader.GetOutputPort() )
>> viewer2.SetColorWindow(win)
>> viewer2.SetColorLevel(lev)
>> viewer2.Render()
>>
>> iren = vtk.vtkRenderWindowInteractor()
>> viewer2.SetupInteractor(iren)
>> iren.Initialize()
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> vtk-developers mailing list
>> vtk-developers at vtk.org
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
More information about the vtk-developers
mailing list