[Insight-users] Unable to write dicom tag using GDCMImageIO
suicheng gu
gusuch at yahoo.com
Sat Oct 6 21:04:51 EDT 2012
I used the following code to obtain the coronal view, but the orientation tag is still 1\0\0\0\1\0
And one more problem is that some dcm files are with size of 0.
itk::OrientImageFilter<InputImageType,InputImageType>::Pointer orienter =
itk::OrientImageFilter<InputImageType,InputImageType>::New();
orienter->UseImageDirectionOn();
orienter->SetDesiredCoordinateOrientationToCoronal();
orienter->SetInput(reader->GetOutput());
orienter->Update();
________________________________
From: Bill Lorensen <bill.lorensen at gmail.com>
To: suicheng gu <gusuch at yahoo.com>
Cc: "insight-users at itk.org" <insight-users at itk.org>
Sent: Sunday, October 7, 2012 4:33 AM
Subject: Re: [Insight-users] Unable to write dicom tag using GDCMImageIO
You can use itkOrientImageFilter to change the direction of the volume. Then when you write the IDCOM with itk, the direction cosines will be correct.
On Sat, Oct 6, 2012 at 11:24 AM, suicheng gu <gusuch at yahoo.com> wrote:
Thanks very much.
>what I want to do is to reconstruct the coronal and saggittal views and save them as dcm files.
>I can manually change the direction of the volume data
>If I can't change these tags, can I just create one dictionary? such as the example: ImageReadDicomSeriesWrite.cxx
>
>
>
>________________________________
> From: Bill Lorensen <bill.lorensen at gmail.com>
>To: suicheng gu <gusuch at yahoo.com>
>Cc: "insight-users at itk.org" <insight-users at itk.org>
>Sent: Saturday, October 6, 2012 11:07 PM
>Subject: Re: [Insight-users] Unable to write dicom tag using GDCMImageIO
>
>
>
>If I recall, tags that are related to orientation and spacing cannot be changed. You must change the orientation of the data before you write the dicom file. The writer will output the proper tag that goes with the data.
>
>
>On Sat, Oct 6, 2012 at 5:21 AM, suicheng gu <gusuch at yahoo.com> wrote:
>
>Hi,
>>
>>I was trying to chage the image orientation tag using
>>itk::EncapsulateMetaData<std::string>(dict1,"0020|0037", "1\\0\\0\\0\\0\\1");
>>But the image orientation was still 1\0\0\0\1\0
>>
>>
>>
>>I also tested the provided exmaple:
>>InsightToolkit-4.1.0\Examples\IO\DicomImageReadChangeHeaderWrite.cxx
>>
>>It works for some tags, such as the instance number: DicomImageReadChangeHeaderWrite $infile$ $outfile$ 0020|0013 10
>>
>>But it failed on the image orientation: DicomImageReadChangeHeaderWrite $infile$ $outfile$ 0020|0037 1\0\0\0\0\1
>>
>>
>>
>>Anyone can help?
>>Thanks in advance.Suicheng
>>
>>_____________________________________
>>Powered by http://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
>>
>>
>
>
>
>--
>Unpaid intern in BillsBasement at noware dot com
>
>
>
>
--
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121006/574e3011/attachment.htm>
More information about the Insight-users
mailing list