[ITK-users] Geodesic Shape Guidance in Python

Matt McCormick matt.mccormick at kitware.com
Tue Apr 26 15:54:13 EDT 2016


Hi Robert,

Do you have a forked version of ITK?
itk::PCAShapeSignedDistanceFunction does not seem to be wrapped in ITK
Git master.

Instead of creating a Python list, try creating a std::vector of
itk::Image itk::SmartPointers.  Something like

shapeModeImages = itk.vector[ImageType]()
[...]
shapeModelImages.append(shapeModeReader.GetOutput())

HTH,
Matt

On Tue, Apr 26, 2016 at 5:48 AM, Robert <scorpiuni at gmail.com> wrote:
> Same Problems as the second problemwith the following Code Lines:
>
> CostFunctionType::ArrayType mean(   shape->GetNumberOfShapeParameters() );
>   CostFunctionType::ArrayType stddev( shape->GetNumberOfShapeParameters() );
>
>   mean.Fill( 0.0 );
>   stddev.Fill( 1.0 );
>   costFunction->SetShapeParameterMeans( mean );
>   costFunction->SetShapeParameterStandardDeviations( stddev );
>
> OptimizerType::ScalesType scales( shape->GetNumberOfParameters() );
>   scales.Fill( 1.0 );
>   for( unsigned int k = 0; k < numberOfPCAModes; k++ )
>     {
>     scales[k] = 20.0;  // scales for the pca mode multiplier
>     }
>   scales[numberOfPCAModes] = 350.0;  // scale for 2D rotation
>   optimizer->SetScales( scales );
>
>
> and a few more....
>
>
>
>
>
>
>
> --
> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Geodesic-Shape-Guidance-in-Python-tp7588780p7588781.html
> Sent from the ITK Insight 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