[Insight-users] Bug in DicomSeriesReadSeriesWrite ??

Yi-Yu Chou yiyu.chou at gmail.com
Thu Aug 16 15:11:57 EDT 2012


I noticed that If I comment out line:
  seriesWriter->SetMetaDataDictionaryArray(
                        reader->GetMetaDataDictionaryArray() )

,values in tag "ImagePositionPatient" were restored correctly
but "ImageOrientationPatient" was still wrong.

I also tried using the following code to restore tag "ImageOrientationPatient",
but not working....
the values were still saved as:  [1\0\0\0\1\0]

typedef itk::MetaDataDictionary   DictionaryType;
DictionaryType::ConstIterator tagItr = dict.Find("0020|0037");

typedef itk::MetaDataObject< std::string > MetaDataStringType;
MetaDataStringType::ConstPointer entryvalue = dynamic_cast<const
MetaDataStringType *>( tagItr->second.GetPointer() );

std::string tagvalue = entryvalue->GetMetaDataObjectValue();
itk::EncapsulateMetaData<std::string>(dict, "0020|0037", tagvalue );

Any further comments will be greatly appreciated !!

YIYU


On Thu, Aug 16, 2012 at 12:11 PM, Bradley Lowekamp
<blowekamp at mail.nih.gov>wrote:

> This sounds like the following unresolved issue:
>
> https://issues.itk.org/jira/browse/ITK-281
>
> Brad
>
> On Aug 16, 2012, at 12:04 PM, Johnson, Hans J wrote:
>
>   Are you reading into a 2D image?  A 2D image only stores 2D origin,
> spacing, etc.
>
>  If you want to preserve the 3rd dimension, you will have to read a
> single slice into a 3D image.
>
>  I am just guessing that this might be the problem.
>
>  Hans
> --
>  Hans J. Johnson, Ph.D.
> hans-johnson at uiowa.edu
> Assistant Professor of Psychiatry
> University of Iowa Carver College of Medicine
>  W278 GH, 200 Hawkins Drive
>  Iowa City, Iowa 52242
> Phone:  319-353-8587
>
>   From: Yi-Yu Chou <yiyu.chou at gmail.com>
> Date: Thursday, August 16, 2012 10:54 AM
> To: Xiaofeng Z <xf10036 at outlook.com>
> Cc: ITK Users <insight-users at itk.org>
> Subject: Re: [Insight-users] Bug in DicomSeriesReadSeriesWrite ??
>
>  yes. I tried on 2 different datasets, and I got same issues...
>
> On Thu, Aug 16, 2012 at 11:45 AM, Xiaofeng Z <xf10036 at outlook.com> wrote:
>
>>  REALLY?
>>
>>
>>
>>  ------------------------------
>> Date: Thu, 16 Aug 2012 10:40:26 -0400
>> From: yiyu.chou at gmail.com
>> To: insight-users at itk.org
>> Subject: [Insight-users] Bug in DicomSeriesReadSeriesWrite ??
>>
>>
>> Dear ITK users,
>>
>> I'm playing with DicomSeriesReadSeriesWrite, but I noticed that values in
>> tags
>> "ImagePositionPatient" and "ImageOrientationPatient" were not restored
>> correctly.
>> should be:
>> (0020,0032) DS [112.81570415012\-115.84296800997\110.38483167658]
>> (0020,0037) DS
>> [-0.0484719045791\0.99882454638764\2.34458564e-008\-0.1526400678013...
>> but I got:
>> (0020,0032) DS [112.81570415012\-115.84296800997\0]    <-- z-value is 0
>> for all slices
>> (0020,0037) DS [1\0\0\0\1\0]
>>
>> Is it a bug in DICOM IO ?
>> Any suggestions would be greatly appreciated !!!
>> Thanks in advance.
>> YIYU
>> ps. I'm running itk4.2
>>
>>  _____________________________________ Powered by www.kitware.com Visit
>> other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html Kitware offers ITK
>> Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php Please keep messages
>> on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQFollow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
>
>
> ------------------------------
> Notice: This UI Health Care e-mail (including attachments) is covered by
> the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
> confidential and may be legally privileged.  If you are not the intended
> recipient, you are hereby notified that any retention, dissemination,
> distribution, or copying of this communication is strictly prohibited.
> Please reply to the sender that you have received the message in error,
> then delete it.  Thank you.
> ------------------------------
>  _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> ========================================================
>
> Bradley Lowekamp
>
> Medical Science and Computing for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120816/87c4b568/attachment.htm>


More information about the Insight-users mailing list