[Insight-users] ITK-3.18 ImageReadDicomSeriesWrite example crashes in GDCMImageIO::Write()

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed May 26 03:44:48 EDT 2010


Luis,

  I believe John, hit bug #9622. It is hard to reproduce on linux. I
believe valgrind will report the problem since the issue is basically
setting v[2] after v.resize(2)...

  I have not had time to review the latest patch from Daniele.

HTH

On Tue, May 25, 2010 at 11:43 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> Hi John,
>
> Thanks for your detailed report
> (and for providing the source code)...
>
> However,...
> Your code works for me,
>
> It doesn't produce any errors at run time,
> and nicely generate the output DICOM slices.
>
>
> I tested it against ITK 3.18 and against the
> current CVS version.
>
> --
>
> Here is how I ran your code:
>
> ./bin/ImageReadWriteSeries   \
>      /home/ibanez/data/VTKData/Data/HeadMRVolume.mhd  \
>      DICOMDir
>
>
> ---
>
>
> Do you have any special settings in your build ?
>
>
> or
>
> are you using a separate GDCM library   ?
>
>
> Please let us know,
>
>
>       Thanks
>
>
>              Luis
>
>
>
> -------------------------------------------------------------------------
> On Tue, May 11, 2010 at 5:46 PM, John Drescher <drescherjm at gmail.com> wrote:
>> I have found that the ImageReadDicomSeriesWrite  example crashes in
>> ITK-3.18.0. The cause is setting the DirectionCosines at line 1997 of
>> itkGDCMImageIO.cxx will cause a crash when m_Direction is a 2 by 2
>> vector which happens when the output image is 2D.
>>
>> 1995 :                    image.SetDirectionCosines(0,m_Direction[0][0]);
>> 1996 :                    image.SetDirectionCosines(1,m_Direction[0][1]);
>> 1997 :                    image.SetDirectionCosines(2,m_Direction[0][2]);
>> 1998 :                    image.SetDirectionCosines(3,m_Direction[1][0]);
>> 1999 :                    image.SetDirectionCosines(4,m_Direction[1][1]);
>> 2000 :                    image.SetDirectionCosines(5,m_Direction[1][2]);
>>
>>
>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/IO/itkGDCMImageIO.cxx?view=annotate&root=Insight&sortby=date
>>
>> One example file I used to test this is the vtk example
>> VTKData\Data\HeadMRVolume.mhd
>>
>>
>> --
>> John M. Drescher
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Mathieu


More information about the Insight-users mailing list