[vtkusers] DICOM image rendered incorrectly
Fahlgren, Eric
eric.fahlgren at smith-nephew.com
Fri Jan 10 14:08:57 EST 2014
So, I've implemented a bug fix by simply skipping all sequences in ReadNextRecord in Utilities/DICOMParser/DICOMParser.cxx . This file appears to be ancient, with no real maintainer at present, so is there anyone here that would be willing to look my changes over and incorporate them into the base? (Being myself the czar over a couple of large codebases, I'm very sensitive to stepping into something without proper oversight.)
A summary of my changes:
Add private member "bool Skipping" to the DICOMParser class.
In ReadNextRecord set Skipping to true when (group,element) == (fffe,e000) and false when (fffe,000d). If skipping, do not perform any data storage callbacks.
Eric
From: David Gobbi [mailto:david.gobbi at gmail.com]
Sent: Thursday, January 09, 2014 16:57
To: Fahlgren, Eric
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] DICOM image rendered incorrectly
On Thu, Jan 9, 2014 at 5:13 PM, Fahlgren, Eric <eric.fahlgren at smith-nephew.com<mailto:eric.fahlgren at smith-nephew.com>> wrote:
Thanks, David, I've been on the verge of moving to your vtk-dicom for a month or so, I hope to get to it soon.
In any case, I've attached the image in a zip.
I didn't know about that "Stamp Image Sequence" block at all. AHA! I just deleted the stamp and now it renders fine!
gdcmanon --dumb --remove 0089,1010 -i IM3anon -o IM3xxx
Now my guess is reworked to think that the image reader is grabbing the metadata from the stamp image and applying them to the main image.
That makes sense. I don't think the vtkDICOMImageReader even knows about sequences. If that is the case, then whatever attributes it reads from a sequence will be treated as regular metadata and will overwrite previously-discovered attributes.
I tried the file in my own vtk-dicom reader, and it displays just fine. So that eases my mind, at least.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140110/c54b5c09/attachment.htm>
More information about the vtkusers
mailing list