<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Gabriel,</div><div><br></div>Could you describe your platform more?<div><br></div><div>Windows? Mac? Linux?</div><div>Compiler version(s)?</div><div><br></div><div>Thanks,</div><div><br></div><div><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Ho Cheung</div><div><br></div></div></div></div></div><div><div>On Aug 16, 2013, at 3:29 PM, Gabriel Santiago &lt;<a href="mailto:santiago.eletrica@gmail.com">santiago.eletrica@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Could be an ITK version problem? It doens't work for me no matter what I do!<br><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 16 August 2013 17:26, Matt McCormick <span dir="ltr">&lt;<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>&gt;</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>Hi Gabriel,<br><br>Your program compiles for me.<br><br></div>HTH,<br>Matt<br></div><div class="HOEnZb">
<div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 16, 2013 at 7:45 PM, Gabriel Santiago <span dir="ltr">&lt;<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The weirdest thing is, if I replace the variables <b>desiredRegion.SetSize(size)</b> and<b> desiredRegion.SetIndex(start)</b> inside for<b> </b><b><b>desiredRegion.SetSize(</b>inputRegion.GetSize()</b>) and <b>desiredRegion.SetIndex(</b><b>inputRegion.GetIndex()</b>) respectively, it doesn't appear the error message and the program compiles just fine.<div>

<div><br>
<div><div class="gmail_extra"><br><br><div class="gmail_quote">On 16 August 2013 16:32, Gabriel Santiago <span dir="ltr">&lt;<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Sorry, but where you read<div><br><br><div><b>typedef itk::Image&lt;InputAnalyzeImage, 3&gt; Image3D;<br>


</b></div><b>typedef itk::Image&lt;OutputJPGImage, 2&gt; Image2D;</b><br><br></div></div>
Please, read<br><br><div><b><span style="color:rgb(255,0,0)">typedef itk::Image&lt;InputImage, 3&gt; Image3D;</span><br></b></div><span style="color:rgb(255,0,0)"><b>typedef itk::Image&lt;OutputImage, 2&gt; Image2D;</b></span><br>



<br></div>and<div><br><br><b>typedef itk::ImageFileReader&lt;</b><b>Analyze3DImage&gt; Reader3D;<br>

typedef itk::ImageFileWriter&lt;</b><b>JPG2DImage&gt; Writer2D;<br><br></b></div></div>read<b><br></b><div><br><span style="color:rgb(255,0,0)"><b>typedef itk::ImageFileReader&lt;</b><b>Image3D&gt; Reader3D;<br>

typedef itk::ImageFileWriter&lt;Image2D</b><b>&gt; Writer2D;</b></span><br><br>Thanks,<div><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 16 August 2013 16:26, Gabriel Santiago <span dir="ltr">&lt;<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br>Here it is:<br><b><br>// STD libraries:<br>#include &lt;iostream&gt;<br>#include &lt;string&gt;<br>



// ITK libraries:<br>#include "itkImage.h"<br>#include "itkImageFileReader.h"<br>
#include "itkImageFileWriter.h"<br>
#include "itkExtractImageFilter.h"<br>#include "itkAnalyzeImageIO.h"<br>#include "itkOrientImageFilter.h"<br>#include "itkSize.h"<br><br></b></div><b>// Type def.<br></b><div><b>typedef unsigned char InputImage;<br>





typedef unsigned char OutputImage;<br><br>// Image def.::<div><br>typedef itk::Image&lt;InputAnalyzeImage, 3&gt; Image3D;<br></div>typedef itk::Image&lt;OutputJPGImage, 2&gt; Image2D;<br><br>typedef itk::ImageFileReader&lt;</b><b>Analyze3DImage&gt; Reader3D;<br>





typedef itk::ImageFileWriter&lt;</b><b>JPG2DImage&gt; Writer2D;<br>typedef itk::ExtractImageFilter&lt;</b><b>Image3D, Image2D&gt; Filter3D;<br><br>Image2D::Pointer extract2DSlice(Image3D::</b><b>Pointer buffer, int plane, int slice)<br>




{<br>&nbsp;&nbsp;&nbsp; Filter3D::Pointer filter = Filter3D::New();<br>
&nbsp;&nbsp;&nbsp; Image3D::RegionType inputRegion = buffer-&gt;</b><b>GetLargestPossibleRegion();<div><br><br>&nbsp;&nbsp;&nbsp; Image3D::SizeType size = inputRegion.GetSize();<br>&nbsp;&nbsp;&nbsp; size[plane] = 0;<br>&nbsp;&nbsp;&nbsp; Image3D::IndexType start = inputRegion.GetIndex();<br>





&nbsp;&nbsp;&nbsp; const unsigned int sliceNumber = slice;<br>&nbsp;&nbsp;&nbsp; start[plane] = sliceNumber;<br><br></div></b></div><div><b>&nbsp;&nbsp;&nbsp; // The problem is HERE!<br></b></div><div><b><div>&nbsp;&nbsp;&nbsp; Image3D::RegionType desiredRegion;<br>&nbsp;&nbsp;&nbsp; desiredRegion.SetSize(size);<br>




&nbsp;&nbsp;&nbsp; desiredRegion.SetIndex(start);<br>
<br></div>&nbsp;&nbsp;&nbsp; filter-&gt;SetExtractionRegion(</b><b>desiredRegion);<br>&nbsp;&nbsp;&nbsp; filter-&gt;SetInput(buffer);<br><br>&nbsp;&nbsp;&nbsp; Image2D::Pointer img = filter-&gt;GetOutput();<br>&nbsp;&nbsp;&nbsp; return img;<br>}</b><br></div><div><br></div></div>



<div class="gmail_extra"><div>
<br><br><div class="gmail_quote">On 16 August 2013 16:21, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">If you post a small, minimal example that with all includes, perhaps we can help.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Fri, Aug 16, 2013 at 3:17 PM, Gabriel Santiago <span dir="ltr">&lt;<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>&gt;</span> wrote:<br>





</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="ltr"><div><div><div><div><div><div>Dear all,<br><br></div>I am trying to reproduce the example of page 118, of the itkSoftwareGuide, changing<br>





<br><i>typedef itk::ImageMaskSpatialObject&lt;3&gt; ImageMaskSpatialObject;</i><br>
<br></div>to<br><br><b>typedef itk::Image&lt;InputAnalyzeImage, 3&gt; Image3D;</b><br><br></div>I think it should work, but when I come to the following lines<br><br><b>&nbsp;&nbsp;&nbsp; Image3D::SizeType size = inputRegion.GetSize();<br>






&nbsp;&nbsp;&nbsp; size[plane] = 0;<br>&nbsp;&nbsp;&nbsp; Image3D::IndexType start = inputRegion.GetIndex();<br>&nbsp;&nbsp;&nbsp; const unsigned int sliceNumber = slice;<br>&nbsp;&nbsp;&nbsp; start[plane] = sliceNumber;<br><br>&nbsp;&nbsp;&nbsp; Image3D::RegionType desiredRegion;<br>&nbsp;&nbsp;&nbsp; desiredRegion.SetSize(size);<br>






&nbsp;&nbsp;&nbsp; desiredRegion.SetIndex(start);</b><br><br>I am getting the following error messages:<br><br></div><b>Invalid argumentes:<br></b></div><b>Candidates are:<br></b></div><b>void SetSize(const itk::Size&lt;&lt;unknown&gt;&gt;&amp;)&nbsp; and<br>






void SetSize(unsigned long int, unsigned long int)<br><br><br>Invalid argumentes:<br>Candidates are:<br>void SetIndex(const itk::Index&lt;&lt;unknown&gt;&gt;&amp;)&nbsp; and<br>void SetIndex(unsigned long int, unsigned long int)<br>






</b><div><br clear="all"><div><div>Can anyone, please, help me? I am using itk v4.2.<br></div><div>What is going on?<br><br></div><div>Thanks in advance,<span><font color="#888888"><br>
</font></span></div><span><font color="#888888"><br>-- <br>Gabriel Santiago<br>
<br>~"As long as I live so long do I learn"~<div>Ramakhrishna</div>
</font></span></div></div></div>
<br></div>_____________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</font></span></div>
</blockquote></div><br><br clear="all"><br></div><span><font color="#888888">-- <br>Gabriel Santiago<br>Engenheiro de Computação - Serviço de Informática/ Hospital das Clínicas de São Paulo<br><a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a><br>




Cel.: <a href="tel:%2B55%2011%2099801-0881" value="+5511998010881" target="_blank">+55 11 99801-0881</a></font></span><div><br><br>~"As long as I live so long do I learn"~<div>Ramakhrishna</div>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Gabriel Santiago<br><br>~"As long as I live so long do I learn"~<div>Ramakhrishna</div>
</div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Gabriel Santiago<br><br>~"As long as I live so long do I learn"~<div>Ramakhrishna</div>
</div></div></div></div></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Gabriel Santiago<br><br>~"As long as I live so long do I learn"~<div>Ramakhrishna</div>
</div></div></div>
_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote></div><br></div></body></html>