<div>OK, it seems it is working now:</div><div> </div><div><font color="#000066"><strong>marching.SetTrialPoints([[100,200],[200,200]])<br></strong></font><font color="#006600">Out[97]: &lt;SimpleITK.FastMarchingImageFilter; proxy of &lt;Swig Object of type &#39;itk::simple::FastMarchingImageFilter::Self *&#39; at 0x000000000AC97B40&gt; &gt;</font></div>
<div> </div><div>Many many thnx!<br><br></div><div class="gmail_quote">On Tue, May 15, 2012 at 2:01 PM, Bradley Lowekamp <span dir="ltr">&lt;<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>&gt;</span> wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div style="word-wrap:break-word">Hello,<div><br></div><div>
<br></div><div>Please not that the name of the methods is plural indicating that it may expect multiple points in the array of points.</div><div><br></div><div>The filters is expecting an array of arrays so you need to add another set of [] ie:</div>
<div><br></div><div><br></div><div>pts = [[100,200]]</div><div>or</div><div>pts = [(100,200)]</div><div>or</div><div>pts = [[100,200],[200,200]]</div><div><br></div><div>martching.SetTrialPoints( pts )</div><div><br></div>
<div><br></div><div>I think most combinations of Python arrays and tuples should work.</div><div><br></div><div>Brad</div><div><br><div><div><div class="h5"><div>On May 15, 2012, at 1:42 PM, Ing. Arturo Vargas Olivares wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5"><div>Hello to all</div><div> </div><div>I&#39;m trying to define the trial points for a Fast Marching Image Filter with the method &#39;SetTrialPoints&#39; (commands in <font color="#000066"><strong>blue</strong></font>) but I receive the following message (in <font color="#006600">green</font>).</div>

<div>I&#39;d like to figure out what I&#39;m missing.</div><div> </div><div>Do you have any ideas??</div><div> </div><div> </div><div> </div><div><font color="#000066"><strong>marching = sitk.FastMarchingImageFilter()</strong></font></div>

<div><font color="#000066"><strong></strong></font> </div><div><font color="#000066"><strong>marching.SetTrialPoints((100,200))<br></strong></font><font color="#006600">---------------------------------------------------------------------------<br>

TypeError                                 Traceback (most recent call last)<br>C:\Users\Student3\Desktop\MRI images\&lt;ipython-input-68-fa3390ad2511&gt; in &lt;module&gt;()<br>----&gt; 1 marching.SetTrialPoints((100,200))</font></div>

<div><font color="#006600">C:\Python27\lib\site-packages\simpleitk-0.4.0-py2.7-win-amd64.egg\SimpleITK.pyc in SetTrialPoints(self, *args, **kwargs)<br>   9540     def SetTrialPoints(self, *args, **kwargs):<br>   9541         &quot;&quot;&quot;SetTrialPoints(self, std::vector&lt;(std::vector&lt;(uint32_t,std::allocator&lt;(uint32_t)&gt;)&gt;,std::allocator&lt;(std::vector&lt;(uint32_t,std::allocator&lt;(uint32_t)&gt;)&gt;)&gt;)&gt; t) -&gt; Self&quot;&quot;&quot;<br>

-&gt; 9542         return _SimpleITK.FastMarchingImageFilter_SetTrialPoints(self, *args, **kwargs)<br>   9543 <br>   9544     def AddTrialPoint(self, *args, **kwargs):</font></div><div><font color="#006600">TypeError: in method &#39;FastMarchingImageFilter_SetTrialPoints&#39;, argument 2 of type &#39;std::vector&lt; std::vector&lt; uint32_t,std::allocator&lt; uint32_t &gt; &gt;,std::allocator&lt; std::vector&lt; uint32_t,std::allocator&lt; uint32_t &gt; &gt; &gt; &gt;&#39;</font></div>
</div></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>
</blockquote></div><br><div>
<span style="text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;border-collapse:separate"><span style="font:12px/normal Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;border-collapse:separate;font-size-adjust:none;font-stretch:normal"><div style="word-wrap:break-word">
<span style="font:12px/normal Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;border-collapse:separate;font-size-adjust:none;font-stretch:normal"><p style="margin:0px">
<font style="font:12px/normal Helvetica;font-size-adjust:none;font-stretch:normal" size="3" face="Helvetica">========================================================</font></p><p style="margin:0px"><font style="font:12px/normal Helvetica;font-size-adjust:none;font-stretch:normal" size="3" face="Helvetica">Bradley Lowekamp<span> </span><span> </span></font></p>
<p style="margin:0px"><font style="font:12px/normal Helvetica;font-size-adjust:none;font-stretch:normal" size="3" face="Helvetica">Medical Science and Computing for</font></p><p style="margin:0px"><font style="font:12px/normal Helvetica;font-size-adjust:none;font-stretch:normal" size="3" face="Helvetica">Office of High Performance Computing and Communications</font></p>
<p style="margin:0px"><font style="font:12px/normal Helvetica;font-size-adjust:none;font-stretch:normal" size="3" face="Helvetica">National Library of Medicine<span> </span></font></p><p style="margin:0px"><font style="font:12px/normal Helvetica;font-size-adjust:none;font-stretch:normal" size="3" face="Helvetica"><a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a></font></p>
<br></span></div></span></span><br>
</div>
<br></div></div></blockquote></div><br>