[Insight-users] SimpleITK FastMarching

Reuben Middendorf rueben.middendorf at gmail.com
Thu Oct 18 16:50:48 EDT 2012


Hi Brad,

seed.push_back([128,128]); seems to give the same error

I modified the code to:

.....
        org.itk.simple.VectorUIntList seed = new
org.itk.simple.VectorUIntList();
        org.itk.simple.VectorUInt32 pts;
        pts = new org.itk.simple.VectorUInt32(2);
        pts.push_back(128);
        pts.push_back(128);
        seed.push_back(pts);
        org.itk.simple.FastMarchingImageFilter waveProp = new
org.itk.simple.FastMarchingImageFilter();
        waveProp.setTrialPoints(seed);
.....

This compiles, but I'm unsure whether this is doing what I'm expecting.
I'll find out when my full code runs, I guess, but if you can tell offhand
if this is doing something bizzare, please let me know.

Regards,

Reuben



On Thu, Oct 18, 2012 at 4:10 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>wrote:

> Hello Reuben,
>
> The TrialPoints arguments is expecting a list of seeds points. You are
> using the correct SWIG wrapped type of VectorUIntList. To add seeds to this
> object I would try it's push_back method. Something like the following
> should work:
>
>     org.itk.simple.VectorUIntList seed = new
> org.itk.simple.VectorUIntList();
>     seed.push_back([128,128]);
>     org.itk.simple.FastMarchingImageFilter waveProp = new
> org.itk.simple.FastMarchingImageFilter();
>     waveProp.setTrialPoints(seed);
>
> Brad
>
>
> On Oct 18, 2012, at 3:12 PM, Reuben Middendorf <
> rueben.middendorf at gmail.com> wrote:
>
> Dear ITK users,
>
> I am a newbie to ITK and thought SimpleITK would be a good place to start.
> I am currently using SimpleITK in a Java environment. I am having some
> issues with setting the trial points in the program.
> Here is the code snippet:
> .............
>         org.itk.simple.VectorUIntList seed = new
> org.itk.simple.VectorUIntList();
>         seed = ([128,128]);
>         org.itk.simple.FastMarchingImageFilter waveProp = new
> org.itk.simple.FastMarchingImageFilter();
>         waveProp.setTrialPoints(seed);
> .............
>
> I get the following error at compile time:
>
> C:\Users\ReubenMiddendorf\Documents\NetBeansProjects\JavaSimpleITKFastMarching\src\javasimpleitkfastmarching\JavaSimpleITKFastMarching.java:22:
> illegal start of expression
>         seed = ([128,128]);
> C:\Users\ReubenMiddendorf\Documents\NetBeansProjects\JavaSimpleITKFastMarching\src\javasimpleitkfastmarching\JavaSimpleITKFastMarching.java:22:
> ';' expected
>         seed = ([128,128]);
>
> I came across the following on the net:
>
> http://itk-insight-users.2283740.n2.nabble.com/About-SetTrialPoints-in-FastMarchingImageFilter-td7560371.html
>
> but the solution there doesn't seem to work here.
>
> Any help would be greatly appreciated.
>
> Regards,
>
> Reuben Middendorf
>
>
> _____________________________________
> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121018/01ea99f8/attachment.htm>


More information about the Insight-users mailing list