[ITK] tag 0018 | 0088
Todd Jensen
todd.jensen at ieee.org
Thu Jul 16 12:53:44 EDT 2015
> From: Jim Qicun Shi
>
> Hi Todd,
>
> Thanks for the reply. m_spacing[2] or m_spacing[0] (x dimension), m_spacing[1] (y), m_spacing[2] (z) are parameters from 0028|0030 (x, y) and 0018|0050 (z). But my question is how to re-set 0018|0088.
>
> Best wishes,
>
> Jim
Using GDCM 2.4.x with ITK 4.7.x or ITK 3.20.1, the following works for outputting the value I set for spacing between slices:
itk::MetaDataDictionary outMetaData;
:
itk::EncapsulateMetaData< vcl_string >( outMetaData, “0018|0088", “5.0" );
:
itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New();
typedef itk::ImageFileWriter< TExportImageType > WriterType;
typename WriterType::Pointer dcmWriter = WriterType::New();
outputImage->SetMetaDataDictionary( outMetaData );
dcmWriter->SetFileName( outputFile.str() );
dcmWriter->SetInput( outputImage );
dcmWriter->SetImageIO( dicomIO );
dcmWriter->Update();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150716/d0441c87/attachment.html>
More information about the Community
mailing list