[ITK-users] ResampleDICOM and Assertion failed: (slope == (int)slope)

Nick Patterson pattersonnp.work at gmail.com
Wed Sep 3 11:10:02 EDT 2014


Hi,

  This is a problem that I have had before and have reported it as a ticket on the GDCM Git page. I have written some code which is heavily dependent on being able to read in a series of DICOM images, in this case they are of PET/NM modality. 

When a series of images are provided, which have "non-integer" rescale slope, the following error is returned at the final stage when SeriesWriter->Update() is invoked. 

Assertion failed: (slope == (int)slope), function InverseRescaleFunction, file /opt/SOURCE/GDCM/2.5/Source/MediaStorageAndFileFormat/gdcmRescaler.cxx, line 67.
Abort trap: 6


I cannot provide my own code here, as it may make the problem less clear. However, the problem is directly recreated using the ResampleDICOM.cxx example from the ITK examples page. If a series of PT/NM images are run through the code the above problem occurs. This is particularly problematic since NM/PT modality images do often have non-integer rescale slopes and currently I am not able to deal with images of this modality.

There are 2 things to note:-
1) I have reported this error with GDCM developer and this problem appeared to have been resolved. I have previously been resampling NM/PT DICOM images using the ResampleDICOM.cxx example in the past without issue. If I recall correctly, ITK 4.5.2 worked with the latest GDCM release. 

2) CT images (where the slope/intercepts are integer) work fine. 


I shall re-log this on the GDCM pages, but since I am unsure that something didn’t change in latest versions of ITK I wanted to report it here too.

I would be much obliged if anyone would be able to test the ResampleDICOM.cxx example with DICOM images which have a rescale slope which is not-integer - and see if the problem can be recreated.

I am currently using:- ITK 4.7 (from git) and pulled the latest GDCM from Git Repo yesterday.


Regards, Nick.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20140903/823dcb33/attachment.html>


More information about the Insight-users mailing list