[Insight-users] Writing DICOM metadata

Mario Ceresa mrceresa at gmail.com
Tue Apr 20 06:00:31 EDT 2010


Hello,
I just wanted to say that I solved my problem.

Attached is the diff of the solution.

Basically I retrieve the dictionary from the dicomIO and manually
force it to the read image before writing it down.

Still it seems to me a bit awkward: is there something that I'm missing?

Thanks,

Mario

On 19 April 2010 19:51, Mario Ceresa <mrceresa at gmail.com> wrote:
> Hello everybody!
>
> I'm sorry to ask a stupid question, but:
>
> How do I copy the DICOM metadata when I copy a serie to a single file?
>
> The approach
>
> writer->SetMetaDataDictionary( dicomIO->GetMetaDataDictionary() );
>
> doesn't work for me.
>
> I looked at the DicomSeriesReadImageWrite? examples but they seem not
> to copy the metadata as well.
>
> I attach the utilized code hoping that someone can help me spot the error,
>
> Thanks in advance,
>
> Mario
>
> PS: I compile it with cmake:
> ADD_EXECUTABLE(copy_metadata copy_metadata_main.cxx)
> TARGET_LINK_LIBRARIES(copy_metadata ITKCommon ITKIO)
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: working_dicom_metadata_copy.diff
Type: application/octet-stream
Size: 1277 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100420/8cebdd00/attachment.obj>


More information about the Insight-users mailing list