[Insight-users] How to Write Sequence Data into a DICOM file, using ITK?

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Jul 10 05:25:28 EDT 2008


Hi,

  Sorry, I completely missed your previous post.

On Wed, Jul 9, 2008 at 5:28 PM, Subrahmanyam Gorthi
<subrahmanyam.gorthi at gmail.com> wrote:
> Hi all,
>
> This is regarding my previous query on writing sequence data into a DICOM
> file:
>
> For writing the DICOM sequence data using ITK, I was looking into the ITK
> code of:
> itkGDCMImageIO.* & itkImageIO.*  for finding out any related methods.
> but unable to figure out anything.
>
> At the gdcm-library level, (in ITK\Utilities\gdcm\src) I saw DICOM sequence
> data related classes
> but not yet clear to me on how to use them at IMageIO level.
>
> I would like to know:
>
> 1. In the current ITK, is it possible to write sequence data into a DICOM
> file?

yes.

> 2. If it is possible to write sequence data, are there any examples in ITK
> that deal with
>    sequence DICOM data?
>    If you can point out those examples, it will be very helpful to me.

There are no such examples in ITK :(
In fact the ITK-GDCM layer does not allow one to transmit Sequence to
the MetaIO dictionary. Technically this is just a matter of
implementing a meta data dict of meta data dict (I think this is
possible, I would just need to convert them recusively to DICOM
struct).

> 3. In case if it's not possible currently to write the sequence data, can
> you please advise me on
>     how to implement this?

Your case is slightly different as you have direct access to the gdcm
structure, which offer way to modify/edit SQ data.

> I am currently trying to implement "itkRTSTRUCTIO" class (which is very
> similar to
> "itkGDCMImageIO" calss) for reading and writing RTSTRUCT data; for that, I
> need
> to process this sequence data.

Simply download the latest of GDCM 1.x:

http://sourceforge.net/project/showfiles.php?group_id=137895&package_id=151454

There are example in gdcm/Example, for instance AnonymizeDicomDir.cxx
where it shows how to traverse SQ:

gdcm::SQItem *tmpSI=s->GetFirstSQItem();
...
 tmpSI=s->GetNextSQItem();

If you have any further GDCM related question, please raise them
directly in gdcm mailing list:

  http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib

I tend to read it more carefully.

Regards,
-- 
Mathieu


More information about the Insight-users mailing list