[Insight-developers] Re: Insight-developers Digest, Vol 8, Is sue 9

Lorensen, William E (Research) lorensen at crd.ge.com
Sun Dec 19 08:47:35 EST 2004


Qin,

I believe we have found the problems. Please update Insight/Utilities/gdcm,
and Insight/Code/IO/itkGDCMImageIO.*, rerun cmake, and rebuild.

I just tried Osiris with images created with itk and these changes. They
load just fine. Befor the fix, images created with the same itk code did not
load correctly.

Bill


-----Original Message-----
From: Qin Binjie [mailto:bjqin at sjtu.edu.cn]
Sent: Sunday, December 19, 2004 8:05 AM
To: insight-developers at itk.org
Subject: [Insight-developers] Re: Insight-developers Digest, Vol 8, Issue 9


Hi bill and all:
     I also found problem related dicom image created by Osiris 4.18 
software, Input dicom image formated 12 bits per pixes is rescaled and 
saved as new image file formated 16 bits per pixel.
     But when use itk's DICOMImageIO2 class, itk::DICOMImageIO2::Pointer 
dicomIO = itk::DICOMImageIO2::New(), to read the new image file, there is 
crash occrued, these problem is related to refering to system memory which 
is can not be readable.
     If my description of problem is not clear, please use Osiris software 
to create new image file,then read it in ITK and find the exact problem.
     Thank you in advance!


? Sat, 18 Dec 2004 12:00:20 -0500 
(EST),<insight-developers-request at itk.org> ??:

> Send Insight-developers mailing list submissions to
> 	insight-developers at itk.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.itk.org/mailman/listinfo/insight-developers
> or, via email, send a message with subject or body 'help' to
> 	insight-developers-request at itk.org
>
> You can reach the person managing the list at
> 	insight-developers-owner at itk.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Insight-developers digest..."
>
>
> Today's Topics:
>
>    1. RE: GDCM problems with created dicom
>       (Lorensen, William E (Research))
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 18 Dec 2004 08:27:30 -0500
> From: "Lorensen, William E (Research)" <lorensen at crd.ge.com>
> Subject: RE: [Insight-developers] GDCM problems with created dicom
> To: "'Mathieu Malaterre'" <mathieu.malaterre at kitware.com>
> Cc: "'insight-developers at public.kitware.com'"
> 	<insight-developers at public.kitware.com>
> Message-ID:
> 	<D95313D68743304EA8BD26E7B44ACF8E01187CAC at xmb04crdge.crd.ge.com>
>
> 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
>>
>>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
> End of Insight-developers Digest, Vol 8, Issue 9
> ************************************************
>



-- 
???????  ??
?! 				

???               Binjie Qin, Ph.D.
Associate Professor
Dept. of Biomedical Engineering
Shanghai Jiao Tong University
1954 Huashan Road Shanghai, 200030,P.R.China
Tel. 86-21-27893022,86-21-62932832-166(or 165)
Fax. 86-21-52540226
E-mail: bjqin at sjtu.edu.cn

_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers


More information about the Insight-developers mailing list