<div dir="ltr"><div><div><div>Hello community,<br><br></div>I know that this is not an itk related question, but does anybody know how to input my own created 0-1 bit mask for general registration (BRAINS) in 3D slicer? <br><br></div>Thank you,<br></div>Ivan <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 12, 2017 at 2:31 PM, Andras Lasso <span dir="ltr"><<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="m_4012298218212017936WordSection1">
<p class="MsoNormal">You must follow my example exactly. Lines are not allowed to be removed or reordered.</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Andras</p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:ivan.hidrovo@gmail.com" target="_blank">Ivan Hidrovo</a><br>
<b>Sent: </b>Monday, June 12, 2017 3:28 PM<br>
<b>To: </b><a href="mailto:lasso@queensu.ca" target="_blank">Andras Lasso</a></p><div><div class="h5"><br>
<b>Subject: </b>Re: [ITK] Question about applying registration transformation to another data set</div></div><p></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div><div><div class="h5">
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Dear Andras,<br>
<br>
</div>
We tried this :<br>
<br>
type: int<br>
dimension: 3<br>
sizes: 91 106 115<br>
endian: little<br>
encoding: raw<br>
data file: m1d0_ROIRegboxS.raw<br>
<br>
</div>
It loaded nothing (at least not visible in the windows open)<br>
<br>
</div>
but when we tried a mhd format it appears to show it:<br>
<br>
<b>ObjectType = Image<br>
NDims = 3<br>
DimSize = 91 106 115<br>
ElementType = MET_INT<br>
ElementDataFile = m1d0_ROIRegboxS.raw<br>
</b><br>
</div>
What are we doing wrong in the nrrd format.<br>
<br>
</div>
Can we go ahead with mhd ?<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jun 12, 2017 at 12:29 PM, Ivan Hidrovo <span dir="ltr">
<<a href="mailto:ivan.hidrovo@gmail.com" target="_blank">ivan.hidrovo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>Dear Andras,<br>
<br>
</div>
Thank you. <br>
<span class="m_4012298218212017936HOEnZb"><font color="#888888"><br>
</font></span></div>
<span class="m_4012298218212017936HOEnZb"><font color="#888888">-Ivan <br>
</font></span></div>
<div class="m_4012298218212017936HOEnZb">
<div class="m_4012298218212017936h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jun 12, 2017 at 12:19 PM, Andras Lasso <span dir="ltr">
<<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div class="m_4012298218212017936m_1166016867216625748m_-7599681074914382734WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Yes, you can load raw files into 3D Slicer. You just have to create a small text file that specifies how your raw file should be interpreted (pixel type, image
size, spacing). For example, if you have a raw file ‘myimage.raw’ create a text file called ‘myimage.nhdr’ in the same directory with the following content:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">NRRD0004<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">type:
<b>short</b><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">dimension: 3<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">space: left-posterior-superior<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">sizes:
<b>256 256 130</b><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">space directions:
<b>(1.0,0,0) (0,1.0,0) (0,0,1.0)<u></u><u></u></b></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">kinds: domain domain domain<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">endian: little<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">encoding: raw<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">space origin: (0.0,0.0,0.0)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#1f497d">data file: myimage.raw<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Probably you only need to change
<i>type</i> (probably uchar, short, or double – see all options here: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fteem.sourceforge.net%2Fnrrd%2Fformat.html%23basic&data=02%7C01%7Classo%40queensu.ca%7Cf9bded9ae6454207bc0008d4b1c928e2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636328924909734583&sdata=2WkBPYI0I%2FtaXtqiMxzdBPPtB8W7FoDXM%2B6JfMXBU3w%3D&reserved=0" target="_blank">
http://teem.sourceforge.net/nr<wbr>rd/format.html#basic</a>), <i>sizes</i> (image size in pixels), and
<i>space directions</i> (change 1.0 values to image spacing values).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">If you create your images in Matlab then you can use nrrdwrite.m to write your matrix into a raw file along with a .nhdr text header file (<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsubversion.assembla.com%2Fsvn%2Fslicerrt%2Ftrunk%2FMatlabBridge%2Fsrc%2FMatlabCommander%2Fcommandserver%2F&data=02%7C01%7Classo%40queensu.ca%7Cf9bded9ae6454207bc0008d4b1c928e2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636328924909734583&sdata=WWT2Wu4ATC51JBOE7TFoFSx7O9u5USw0qVAYZ6YC1H0%3D&reserved=0" target="_blank">https://subversion.assembla.c<wbr>om/svn/slicerrt/trunk/MatlabBr<wbr>idge/src/MatlabCommander/comma<wbr>ndserver/</a>).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">You can load the image by drag-and-dropping the .nrrd file into 3DSlicer application window.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Andras<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></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:<a href="mailto:community-bounces@itk.org" target="_blank">community-bounces@itk.<wbr>org</a>]
<b>On Behalf Of </b>Ivan Hidrovo<br>
<b>Sent:</b> Monday, June 12, 2017 1:05 PM<br>
<b>To:</b> <a href="mailto:community@itk.org" target="_blank">community@itk.org</a><br>
<b>Subject:</b> Re: [ITK] Question about applying registration transformation to another data set<u></u><u></u></span></p>
<div>
<div class="m_4012298218212017936m_1166016867216625748h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hello community, <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Can you kindly tell me <br>
1) if you can input a threshold to an image on ITK when implementing an algorithm?
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">For example when running registration I wish to use only voxel values within a lower and higher threshold<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">2) Also,do you know if you can use raw files in Slicer3D? we had difficulty putting raw data into slicer and hence switched to ITK<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you,<u></u><u></u></p>
</div>
<p class="MsoNormal">Ivan <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Jun 9, 2017 at 12:08 PM, Ivan Hidrovo <<a href="mailto:ivan.hidrovo@gmail.com" target="_blank">ivan.hidrovo@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello all,<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">We are registering 2 data sets A and B using ImageRegistration8.cxx. We get an output dataset C registered to A and also some matrix numbers which we believe to be the rigid registration parameters.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> We need to apply the same registration transformation to another data set (of a different modality) -- is there a way to use this code or another code to apply a given transformation to an image.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Or do we need to make small changes to the code to do this.<u></u><u></u></p>
</div>
<p class="MsoNormal">thanks,<u></u><u></u></p>
</div>
<p class="MsoNormal">Ivan<u></u><u></u></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</blockquote></div><br></div>