[Dcmlib] [Fwd: RE: [Insight-developers] GDCM problems with created dicom]

Mathieu Malaterre mathieu.malaterre at kitware.com
Sat Dec 18 16:46:28 CET 2004


> Subject: RE: [Insight-developers] GDCM problems with created dicom
> 
> Mathieu,
> I found the rest of the problem. The fix you provided was part of the
> solution.
> 
> The other problem was that the pixel data in the dictionary for
> group/element
> 7fe0 0010 had a representation of OB, not OW.
> 
> Most readers probably don't use this because this info can be derived from
> other tags. Of course, this representation should vary depending on whether
> the data is chars or shorts, but the current gdcm code won't let you change
> a representation on the fly (as far as I can tell).
> 
> Since most medical data is 16 bit, I have changed the entry in the
> dictionary from "OB" to "OW". Now I can generate files that the dicom3tools
> can read.
> 
> I'll be checking in the changes this morning. It seems that I have to make a
> trivial change to gdcmDefaultDicts.cxx.in to get the dictionary to rebuild.
> The dependency on dicomV3.dic is missing.
> 
> Thanks for your help,
> 
> Bill
> 
> -----Original Message-----
> From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com]
> Sent: Friday, December 17, 2004 10:55 AM
> To: Lorensen, William E (Research)
> Subject: Re: [Insight-developers] GDCM problems with created dicom
> 
> 
> Done
> 
> $ cvs ci -m"BUG: The (Meta) Group Length tags contain a wrong lenght. 
> Remove those tags from the output until the calculation of lenght is 
> fixed in gdcm." itkGDCMImageIO.cxx itkGDCMImageIO.h
> /cvsroot/Insight/Insight/Code/IO/itkGDCMImageIO.cxx,v  <-- 
> itkGDCMImageIO.cxx
> new revision: 1.43; previous revision: 1.42
> /cvsroot/Insight/Insight/Code/IO/itkGDCMImageIO.h,v  <--  itkGDCMImageIO.h
> new revision: 1.9; previous revision: 1.8
> 
> 
> Lorensen, William E (Research) wrote:
> > Yes, remove it for now and Ill try it.
> > 
> > 
> > -----Original Message-----
> > From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com]
> > Sent: Friday, December 17, 2004 10:39 AM
> > To: Lorensen, William E (Research)
> > Cc: insight-developers at public.kitware.com
> > Subject: Re: [Insight-developers] GDCM problems with created dicom
> > 
> > 
> > Lorensen, William E (Research) wrote:
> > 
> >>Mathieu,
> >>I am having trouble with dicom files that we are creating. We are reading
> >>dicoms, filtering them and creating new dicoms. We are passing the meta
> > 
> > data
> > 
> >>from the input to the output unmodified.
> >>
> >>If I run the dicom3tools dcdump program it fails on an assertion
> >>
> >>  dcdump 88_20_0.0625_1.dcm
> >>you get an error messages that includes the phrase
> >>  Assertion `bitsallocated <= bytesinword*8u' failed.
> >>
> >>I have tried to track things down further, and there is trouble in the
> >>0x0002 area. I notice lots of FIXME comments in the gdcm code aroubd
> >>processing of the 0x0002 tags.
> >>
> >>I know this message is a bit cryptic, but I'm on travel trying to get this
> >>to work.
> >>
> >>Once I get back, I'll get you a sample file that is failing. I can force
> > 
> > the
> > 
> >>fail if I run the dicomSeriesReadSeriesWrite example.
> >>
> >>Have you seen problems like this?
> > 
> > 
> > Unfortunately yes. There has been some mail on the gdcm mailing list 
> > about this issue. e-film had also some trouble reading some DICOM imagea 
> > produced by GDCM. It appears that the length of group 0x0002 was wrong. 
> > The easy solution was simply to remove this tag from the output.
> > 
> > As a quick fix I can remove this tag also from itkGDCMImageIO, until 
> > they rewrite the function that calculate the lenght of group 0x0002.
> > 
> > How does that sound ?
> > 
> > Mathieu
> > 
> > 
> 
> 
> 





More information about the Dcmlib mailing list