[Insight-users] (no subject)
Mathieu Malaterre
mathieu.malaterre at kitware.com
Fri Sep 30 12:29:20 EDT 2005
Wordon,
I am definitely convinced now you are using a -broken- converter from
ACR/NEMA to DICOMV3.
Here is a list of problem:
- Transfer Syntax UID declare the image BigEndian but is in fact Little
Endian (biggest issue !)
- Media Storage SOP Class UID and SOP Class UID declare the image being
MR, but Modality specify 'OT' instead.
- Your image have a High Bit of 0
Some other error from dciodvfy:
Warning - Value dubious for this VR - (0x0008,0x0090) PN Referring
Physician's Name PN [0] = <Anonymized> - Retired Person Name form
Warning - Value dubious for this VR - (0x0010,0x0010) PN Patient's Name
PN [0] = <Anonymized> - Retired Person Name form
MRImage
Error - Missing attribute Type 2 Required Element=<PatientID>
Module=<Patient>
Error - Missing attribute Type 2 Required Element=<PatientBirthDate>
Module=<Patient>
Error - Missing attribute Type 2 Required Element=<PatientSex>
Module=<Patient>
Error - Missing attribute Type 2 Required Element=<StudyDate>
Module=<GeneralStudy>
Error - Missing attribute Type 2 Required Element=<StudyTime>
Module=<GeneralStudy>
Error - Missing attribute Type 2 Required Element=<StudyID>
Module=<GeneralStudy>
Error - Missing attribute Type 2 Required Element=<AccessionNumber>
Module=<GeneralStudy>
Warning - Unrecognized defined term <OT> for attribute <Modality>
Error - Missing attribute Type 2C Conditional Element=<PatientPosition>
Module=<GeneralSeries>
Error - Missing attribute Type 1 Required Element=<FrameOfReferenceUID>
Module=<FrameOfReference>
Error - Missing attribute Type 2 Required
Element=<PositionReferenceIndicator> Module=<FrameOfReference>
Error - Unrecognized enumerated value <ORIGINAL> for attribute <Image Type>
Error - Unrecognized enumerated value <PRIMARY> for attribute <Image Type>
Error - Missing attribute Type 1 Required
Element=<ImageOrientationPatient> Module=<ImagePlane>
Error - Missing attribute Type 1 Required Element=<ImagePositionPatient>
Module=<ImagePlane>
Warning - Unrecognized defined term <MONOCHROME2> for attribute
<Photometric Interpretation>
Error - Unrecognized enumerated value <MONOCHROME2> for attribute
<Photometric Interpretation>
Error - Missing attribute Type 1 Required Element=<ScanningSequence>
Module=<MRImage>
Error - Missing attribute Type 1 Required Element=<SequenceVariant>
Module=<MRImage>
Error - Missing attribute Type 2 Required Element=<ScanOptions>
Module=<MRImage>
Error - Missing attribute Type 2 Required Element=<MRAcquisitionType>
Module=<MRImage>
Error - Missing attribute Type 2 Required Element=<EchoTime>
Module=<MRImage>
Error - Missing attribute Type 2 Required Element=<EchoTrainLength>
Module=<MRImage>
So please keep your ACR/NEMA in original format, do not try to convert
them to a broken DICOM type. gdcm perfectly handles ACR/NEMA, so if you
use ITK, you can load your ACR/NEMA.
Or if you still want a batch program to convert your ACR/NEMA to
DICOMv3, please use gdcm (with very few lines of code you should be all
set).
Could you please confirm that this is indeed the case ? If so I will not
consider this as a bug, and gdcm won't have to support this
pseudo-'DICOM' file.
Thanks
Mathieu
Mathieu Malaterre wrote:
> Wordon,
>
> I had a look at your image, and for some reason it is declared as
> Explicit VR - Big Endian (1.2.840.10008.1.2.2) but is indeed Explicit VR
> - Little Endian (1.2.840.10008.1.2.1).
>
> Could you tell us where this image is coming from ?
>
> To fix your problem, you could use a program like hexedit on unix
> and search for the string '1.2.840.10008.1.2.2' and replace it with
> '1.2.840.10008.1.2.1'. Or recompile gdcm after changing the function:
>
> gdcm::Document::SwitchByteSwapCode()
>
> To always have SwapCode = 1234 (on little endian system).
>
> ----------------------------------------------------------------
>
> I'll try to find a way in gdcm to make it clearer that reading
> failed. So that user could see right away where is the problem. Thanks
> for the report and the sample image.
>
> HTH
> Mathieu
>
> wordon wrote:
>
>> Hi, Mathieu:
>> I use the code to read the file as below.
>> But the output file only has header part.
>> Can you give me some point?
>> The DICOM file as attached file.
>> ================================================================
>> typedef signed short InputPixelType;
>> const unsigned int InputDimension = 3;
>> typedef itk::Image< InputPixelType, InputDimension > InputImageType;
>> typedef itk::ImageFileReader< InputImageType > ReaderType;
>> ReaderType::Pointer reader = ReaderType::New();
>> reader->SetFileName( argv[1] );
>> typedef itk::GDCMImageIO ImageIOType;
>> ImageIOType::Pointer gdcmImageIO = ImageIOType::New();
>> reader->SetImageIO( gdcmImageIO );
>> reader->Update();
>>
>> typedef itk::ImageFileWriter< InputImageType > Writer1Type;
>> Writer1Type::Pointer writer1 = Writer1Type::New();
>> writer1->SetFileName( argv[2] );
>> writer1->SetInput( reader->GetOutput() );
>> writer1->SetImageIO( gdcmImageIO );
>> writer1->Update();
>>
>> return EXIT_FAILURE;
>> }
>> ==========================================================
>>
>> -----Original Message-----
>> From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com] Sent:
>> Thursday, September 29, 2005 10:34 PM
>> To: wordon
>> Cc: ITK Mailing List
>> Subject: Re: [Insight-users] (no subject)
>>
>> wordon wrote:
>>
>>> Hi,all :
>>>
>>> I has a problem about :
>>>
>>> How to read a DICOM file it has several image in one file?
>>
>>
>>
>> If you refer to multiframe DICOM, then the different slices are
>> actually the whole (generally 3D) image. All you need to do is
>> allocate the proper image type (Dimension and PixelType). And the
>> reader should do the work for you.
>>
>> HTH
>> Mathieu
>
>
>
More information about the Insight-users
mailing list