[ITK-users] VectorUInt32 and VectorDouble in Java...How?
Lowekamp, Bradley (NIH/NLM/LHC) [C]
blowekamp at mail.nih.gov
Tue Oct 25 08:57:26 EDT 2016
Hello,
That is a very good question I can help with!
These vector classes are wrappers for the C++ std::vector<T> template classes. SWIG generates these data structures, and provides a JAVA like interface for the object. Unlike Python, JAVA is a strongly type language and requires explicit types and constructors. Here is the snippet that I think you need:
VectorUInt32 shrinkFactors = new VectorUIn32(3)
shrinkFactors.set(3)
shrinkFactors.set(2)
shrinkFactors.set(1)
VectorDouble smoothingSigmas = new VectorDouble(3)
smoothingSigmas.set(2)
smoothingSigmas.set(1)
smoothingSigmas.set(1)
HTH,
Brad
> On Oct 25, 2016, at 3:42 AM, ivan <ivan.granata.na at gmail.com> wrote:
>
> hi
>
> how can i specify VectorUInt32 and VectorDouble in Java...
>
> i ve this in python
> R.SetShrinkFactorsPerLevel([3,2,1])
> R.SetSmoothingSigmasPerLevel([2,1,1])
>
> SetShrinkFactorsPerLevel would VectorUInt32
> and
> SetSmoothingSigmasPerLevel would VectorDouble
>
>
> thanks
>
>
>
>
>
> --
> View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-VectorUInt32-and-VectorDouble-in-Java-How-tp37700.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> 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://public.kitware.com/mailman/listinfo/insight-users
More information about the Insight-users
mailing list