[Insight-users] ManagedITK using VB.NET

Dan Mueller dan.muel at gmail.com
Sat Jan 31 02:51:41 EST 2009


Hi Tao,

Try the following instead:

Imports itk
Imports OptimizerType = itk.itkRegularStepGradientDescentOptimizer

Module Test1
    Sub Main()
        Dim optimizer As OptimizerType = OptimizerType.[New]
        AddHandler optimizer.Iteration, AddressOf OnIteration
    End Sub
    Sub OnIteration(ByVal sender As itkObject, ByVal e As itkEventArgs)
    End Sub
End Module

HTH

Regards, Dan

2009/1/31 Tao Dai <uniquedai at gmail.com>:
> Hi, All:
>
> In an example of ManagedITK (registration part)
>
> ==================================================
>
> Here's codes written in VB.NET
> Imports itk
>
> Imports OptimizerType = itk.itkRegularStepGradientDescentOptimizer
> ...
> ...
> ' Create optimiser
>             Dim optimizer As OptimizerType = OptimizerType.[New]
>
>             'optimizer.Iteration += New itkEventHandler(optimizer_Iteration)
>
> The problem is :  there's no member like "Iteration" under the "Optimizer".
> I also checked in Object Browser, not only the
> itkRegularStepGradientDescentOptimizer, but also other optimizers, e.g.,
> itkGradientDescentOptimizer, don't have such a member "Iteration". Is this a
> version problem?  I'm using the pre-compiled assembly pack
> "ManagedITK-bin-x86-3.10.0.1"
>
> Any comments?
>
> Regards,
>
> Tao
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list