[Insight-users] read dicom images, register and write out dicoms with no change in metadata

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Apr 9 07:55:00 EDT 2008


Hi Dan,

  Have you tried:

  Insight/Examples/IO/DicomImageReadPrintTags.cxx

  Were you able to provide your own user defined dictionary ? Or were
you looking for something different ?

Thanks
-Mathieu

On Tue, Apr 8, 2008 at 11:27 PM, Blezek, Daniel J., Ph.D.
<Blezek.Daniel at mayo.edu> wrote:
> Hi Mathieu,
>
>   I've had occasional need to reference a vender private tag for
>  processing.  I'm guessing Sirisha needs to look at a vender private tag
>  generated by the scanner, not insert a new one.  DICOM does not require
>  an implementation to preserve private tags, but sometimes it's a nice
>  feature.
>
>  -dan
>
>
>  -----Original Message-----
>  From: insight-users-bounces at itk.org
>  [mailto:insight-users-bounces at itk.org] On Behalf Of Mathieu Malaterre
>  Sent: Tuesday, April 08, 2008 3:29 PM
>  To: Tadimalla, Sirisha
>  Cc: insight-users at itk.org
>  Subject: Re: [Insight-users] read dicom images,register and write out
>  dicoms with no change in metadata
>
>
>
> Hi Sirisha,
>
>   Please CC the itk users mailing list as others might benefit from this
>  thread too. See my comments interlaced.
>
>
>  On Tue, Apr 8, 2008 at 6:32 PM, Tadimalla, Sirisha
>  <sirisha-tadimalla at uiowa.edu> wrote:
>  > Hi Mathieu,
>  >
>  >  Thanks for replying. I need one particular private tag to remain in
>  > the  output header. I will be using it for further processing of the
>  > image in  MATLAB.
>
>  Don't take me as arrogant, but this not something you should be doing.
>  Why don't you set a particular comment in Ipublic tags, such as mage
>  Comments (0020,4000). Private tags belong to the private vendor and
>  -again- you should not manipulate them AFAIK. Unless of course you are
>  creating your set of private tags, in which case you can do whatever you
>  like.
>
>  >  Can you elaborate on how I can extract this from the input and copy
>  > it  for writing?
>  >
>
>  Get the gdcm 1.2 tarball from the official repository and have a look
>  at: exReadWriteFile.cxx for instance (any other example in the
>  gdcm/Example should be a good starting point).
>
>
>  >  Another issue that I have is that I use the registered image pixel
>  > values for a curve fitting procedure, so I need those values to remain
>
>  > the same. The original pixel values are doubles, but GDCM doesn't
>  > accept  it when I define my pixeltype as double. What should I do?
>
>  It should work out of the box. Are you copying back everything from the
>  meta data dictionary (see itk user guide for example) ? If so make sure
>  you are not dropping actidentally the Rescale Slope / Rescale Intercept
>  DICOM tag. They are used at read time to convert the stored pixel into
>  your 'double' pixel type, and then again at write time to convert your
>  double pixel type to regular DICOM pixel type (generally 16bits unsigned
>  short). Be sure to keep the same Rescale Slope / Rescale Intercept to
>  avoid any data loss.
>
>
>  HTH
>  --
>  Mathieu
>
>
> _______________________________________________
>  Insight-users mailing list
>  Insight-users at itk.org
>  http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Mathieu


More information about the Insight-users mailing list