<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20160708142948554470 { word-wrap: break-word; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: CALIBRI, sans-serif; }body { font-size: 10.5pt; font-family: 'Segoe UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Thanks! Can't wait to see the new release. Set method for metadata is exactly what i want.</div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>weiehome@sina.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:zivrafael.yaniv@nih.gov">Yaniv, Ziv Rafael (NIH/NLM/LHC) [C]</a></div><div><b>Date:</b> 2016-07-08 00:32</div><div><b>To:</b> <a href="mailto:weiehome@sina.com">weiehome@sina.com</a>; <a href="mailto:blowekamp@mail.nih.gov">Lowekamp, Bradley (NIH/NLM/LHC) [C]</a></div><div><b>CC:</b> <a href="mailto:community@itk.org">community@itk.org</a></div><div><b>Subject:</b> Re: [ITK] question regarding simpleitk java wrapper</div></div></div><div><div class="FoxDiv20160708142948554470">
<div>
<div>
<div>Hello Tom,</div>
</div>
</div>
<div><br>
</div>
<div>We are currently working on adding a Set method for data in the metadata dictionary of SimpleITK images. This should be out shortly.</div>
<div><br>
</div>
<div>With regard to the second question, "how can i use Simpleitk java to read self-defined structure to recontruct dicom images including pixel data and metadata.” If the image is in your self defined data structure then SimpleITK can’t do a thing, we only
work with SimpleITK images. If you have a SimpleITK image object which you filled with intensity data+spacing data + size data + direction data, you will be able to update its meta-data dictionary once we add the Set method for the meta-data dictionary and
then you can save it as a DICOM series.</div>
<div><br>
</div>
<div>hope this clarified things</div>
<div> Ziv</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>"<a href="mailto:weiehome@sina.com">weiehome@sina.com</a>" <<a href="mailto:weiehome@sina.com">weiehome@sina.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, July 7, 2016 at 5:21 AM<br>
<span style="font-weight:bold">To: </span>"Lowekamp, Bradley (NIH/NLM/LHC) [C]" <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:community@itk.org">community@itk.org</a>" <<a href="mailto:community@itk.org">community@itk.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [ITK] question regarding simpleitk java wrapper<br>
</div>
<div><br>
</div>
<div>
<div>
<div><span></span>Hi, Bradley</div>
<div><br>
</div>
<div>Thank you ! But how can i fill it with metadata information?</div>
<div>In c++, i can set metadatas manually using raw pointer to MetadataDictionary instance to achieve it, but in JAVA, it seems there is no such way of setting Image Metadata?</div>
<div><br>
</div>
<div>One function i found is CopyInformation(), however it requires Given input image has to be as same dimension as output one.</div>
<div>What i want is followings: </div>
<div>1.First read dicoms volume data (CTs) from a folder recursively using SeriesReader</div>
<div>2. then convert all 3d volumes into my own data structure, then serialize it into bytes and passed to some remote server.</div>
<div>consider 1-2 steps are data import steps.</div>
<div>when exporting the data from remote server, i do :</div>
<div>3.read the bytes and deserialize bytes into self-defined image data structure.</div>
<div>4.convert data structure into itk image(3d)</div>
<div>remember when i do import, i actually extract all dicom tags i needed and put finally into data structure. </div>
<div>So the question is how can i use Simpleitk java to read self-defined structure to recontruct dicom images including pixel data and metadata.</div>
<div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"> </span></div>
<div>Best Regards,</div>
<div>Tom </div>
<div><br>
</div>
<hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span>
<div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<div><a href="mailto:weiehome@sina.com">weiehome@sina.com</a></div>
</div>
</span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;">
<div> </div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px">
<div><b>From:</b> <a href="mailto:blowekamp@mail.nih.gov">Lowekamp, Bradley (NIH/NLM/LHC) [C]</a></div>
<div><b>Date:</b> 2016-07-06 21:00</div>
<div><b>To:</b> <a href="mailto:weiehome@sina.com">weiehome@sina.com</a></div>
<div><b>CC:</b> <a href="mailto:community@itk.org">community@itk.org</a></div>
<div><b>Subject:</b> Re: [ITK] question regarding simpleitk java wrapper</div>
</div>
</div>
<div>
<div class="FoxDiv20160707170845260230" style="word-wrap: break-word; -webkit-line-break: after-white-space;">Hello,
<div class=""><br class="">
</div>
<div class="">You can create it in a similar way to C++. The constructor does have required arguments to specify its size and pixel type.. You need to look at the Doxygen for the API documentation [1]. Also the SimpleITK Image will automatically allocated and
initialized the data to 0 unlike an ITK image.</div>
<div class=""><br class="">
</div>
<div class="">It would look something like the </div>
<div class=""><br class="">
</div>
<div class="">
<div class=""> Image img2 = new Image( 10, 10, PixelIDValueEnum.sitkInt16 );</div>
<div class=""><br class="">
</div>
<div class=""> VectorDouble origin = new VectorDouble(img2.getDimension());</div>
<div class=""> origin.set( 0, 1.0);</div>
<div class=""> origin.set( 1, 2.0);</div>
<div class=""> img2.setOrigin(origin);</div>
<div class=""><br class="">
</div>
<div class=""> System.out.format("%s", img2.toString());</div>
</div>
<div class=""><br class="">
</div>
<div class="">HTH,</div>
<div class="">Brad</div>
<div class=""><br class="">
</div>
<div class="">[1] <a href="https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1Image.html" class="">https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1Image.html</a></div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="" style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;">
<div class="">On Jul 6, 2016, at 5:25 AM, <a href="mailto:weiehome@sina.com" class="">
weiehome@sina.com</a> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span class=""></span>Hi, </div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Is there a possible way i can create an itk image in java just like in c++ :</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Image itkImage = new Image();</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
itkImage.setOrgin( ... );</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
itkImage.setSpacing( ... );</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
itkImage.setRegion( ... );</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
itkImage.fill(0);</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
It seems in java i can get itk Image object either by reading files or from filters?</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span segoeui??;font-size:14px;color:rgb(0,0,0);background-color:rgba(0,font-weight:normal;font-style:normal;text-decoration:none;?="" style="font-family: '} ';" class=""></span><br class="">
</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Regards, Tommi</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<div style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span segoeui??;font-size:14px;color:rgb(0,0,0);background-color:rgba(0,font-weight:normal;font-style:normal;text-decoration:none;?="" style="font-family: '} ';" class=""><br class="">
</span></div>
<span style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Community
mailing list</span><br style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="mailto:Community@itk.org" style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Community@itk.org</a><br style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="http://public.kitware.com/mailman/listinfo/community" style="font-family: 'Segoe UI'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://public.kitware.com/mailman/listinfo/community</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
</div>
</span>
</div></div></blockquote>
</body></html>