[Insight-users] About 'SetTrialPoints' in 'FastMarchingImageFilter()'
Ing. Arturo Vargas Olivares
ing.arturo.vargas at gmail.com
Tue May 15 14:25:55 EDT 2012
OK, it seems it is working now:
*marching.SetTrialPoints([[100,200],[200,200]])
*Out[97]: <SimpleITK.FastMarchingImageFilter; proxy of <Swig Object of type
'itk::simple::FastMarchingImageFilter::Self *' at 0x000000000AC97B40> >
Many many thnx!
On Tue, May 15, 2012 at 2:01 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>wrote:
> Hello,
>
>
> Please not that the name of the methods is plural indicating that it may
> expect multiple points in the array of points.
>
> The filters is expecting an array of arrays so you need to add another set
> of [] ie:
>
>
> pts = [[100,200]]
> or
> pts = [(100,200)]
> or
> pts = [[100,200],[200,200]]
>
> martching.SetTrialPoints( pts )
>
>
> I think most combinations of Python arrays and tuples should work.
>
> Brad
>
> On May 15, 2012, at 1:42 PM, Ing. Arturo Vargas Olivares wrote:
>
> Hello to all
>
> I'm trying to define the trial points for a Fast Marching Image Filter
> with the method 'SetTrialPoints' (commands in *blue*) but I receive the
> following message (in green).
> I'd like to figure out what I'm missing.
>
> Do you have any ideas??
>
>
>
> *marching = sitk.FastMarchingImageFilter()*
> **
> *marching.SetTrialPoints((100,200))
> *
> ---------------------------------------------------------------------------
> TypeError Traceback (most recent call last)
> C:\Users\Student3\Desktop\MRI images\<ipython-input-68-fa3390ad2511> in
> <module>()
> ----> 1 marching.SetTrialPoints((100,200))
> C:\Python27\lib\site-packages\simpleitk-0.4.0-py2.7-win-amd64.egg\SimpleITK.pyc
> in SetTrialPoints(self, *args, **kwargs)
> 9540 def SetTrialPoints(self, *args, **kwargs):
> 9541 """SetTrialPoints(self,
> std::vector<(std::vector<(uint32_t,std::allocator<(uint32_t)>)>,std::allocator<(std::vector<(uint32_t,std::allocator<(uint32_t)>)>)>)>
> t) -> Self"""
> -> 9542 return
> _SimpleITK.FastMarchingImageFilter_SetTrialPoints(self, *args, **kwargs)
> 9543
> 9544 def AddTrialPoint(self, *args, **kwargs):
> TypeError: in method 'FastMarchingImageFilter_SetTrialPoints', argument 2
> of type 'std::vector< std::vector< uint32_t,std::allocator< uint32_t >
> >,std::allocator< std::vector< uint32_t,std::allocator< uint32_t > > > >'
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> ========================================================
>
> Bradley Lowekamp
>
> Medical Science and Computing for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120515/173d29e5/attachment.htm>
More information about the Insight-users
mailing list