<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Menlo;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">I’m not sure if it helps, but you create DICOM-RT structure sets (RTSTRUCT) from labelmaps using 3D Slicer’s DICOM module and the SlicerRT extension.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="http://www.slicerrt.org">www.slicerrt.org</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="https://www.slicer.org/wiki/Documentation/Nightly/Modules/DICOM#DICOM_export">https://www.slicer.org/wiki/Documentation/Nightly/Modules/DICOM#DICOM_export</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Andras<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Community [mailto:community-bounces@itk.org]
<b>On Behalf Of </b>Amber Simpson<br>
<b>Sent:</b> November 21, 2016 12:18<br>
<b>To:</b> community@itk.org<br>
<b>Subject:</b> [ITK] exporting MHD to DICOM RT<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi All,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have 200 images and segmented masks in MHD format that I would like to export to DICOM RT for sharing on The Cancer Imaging Archive. There is a publication that covers this topic, but the code appears to be restricted to ITK 3.10. The
issues I encountered while compiling on Ubuntu 16.04 and OS X 10.9.5 are detailed below.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The paper and source code:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="http://www.insight-journal.org/browse/publication/316" target="_blank">http://www.insight-journal.org/browse/publication/316</a> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Any help would be greatly appreciated. I'm open to other approaches as well.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Amber<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">---------------------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Compile error on the RTSTRUCT code with ITK 4.10:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"Menlo",serif;color:black">[ 50%]
</span><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#34BD26">Building CXX object CMakeFiles/export2RTSTRUCT.dir/export2RTSTRUCT.cxx.o<o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"Menlo",serif">In file included from /Users/simpsonl/Dropbox/Liver/src/RTSTRUCT/export2RTSTRUCT.cxx:8:<o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><span style="font-size:8.5pt;font-family:"Menlo",serif">/Users/simpsonl/Dropbox/Liver/src/RTSTRUCT/itkRTSTRUCTIO.h:28:10:
<span style="color:#C33720">fatal error: </span></span></b><span style="font-size:8.5pt;font-family:"Menlo",serif"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><span style="font-size:8.5pt;font-family:"Menlo",serif"> 'gdcmSeqEntry.h' file not found</span></b><span style="font-size:8.5pt;font-family:"Menlo",serif"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"Menlo",serif">#include "gdcmSeqEntry.h"<o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#34BD26"> ^</span></b><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#34BD26"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">There is a bug report discussed here:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="http://public.kitware.com/pipermail/insight-users/2009-April/029900.html" target="_blank">http://public.kitware.com/pipermail/insight-users/2009-April/029900.html</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The error is apparently solved by reverting to ITK 3.10. Unfortunately, ITK 3.10 is not compiling on either workstation. This is the compile error with ITK 3.10 on OS X (Ubuntu was similarly problematic):<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p style="margin:0in;margin-bottom:.0001pt"><b><span style="font-size:8.5pt;font-family:"Menlo",serif">/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:668:1: note: </span></b><span style="font-size:8.5pt;font-family:"Menlo",serif"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"Menlo",serif"> candidate function<o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"Menlo",serif">abs(long double __x) _NOEXCEPT {return fabsl(__x);}<o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><b><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#34BD26">^</span></b><span style="font-size:8.5pt;font-family:"Menlo",serif;color:#34BD26"><o:p></o:p></span></p>
<p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"Menlo",serif">27 warnings and 4 errors generated.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This is apparently solvable with ITK 4: <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://itk.org/pipermail/insight-users/2015-March/051696.html" target="_blank">https://itk.org/pipermail/insight-users/2015-March/051696.html</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">and the cycle continues ...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>