[Insight-users] Wrapping Custom Classes

Luis Ibanez luis . ibanez at kitware . com
Mon, 22 Dec 2003 11:42:04 -0500


Hi Carlos,

1) Yes, you can wrap custom classes without having to touch
     the ITK source tree.

     Please look at

              InsightApplications/ConnectVTKITK

    for an example on how to do this.  The two classes there
    are intended to connect VTK and ITK pipelines and the
    CMakeLists.txt file is configured for wrapping these two
    classes.


2)  Do you intend to use an optimization process for computing
     this plane ?

    In this case, yes, you need to create a cost function that derives
    from itk::SingleValuedCostFucntion.   The array of parameters
    for the  cost function will be the coefficients of the plane.



Please let us know if you have further questions.


    Thanks


         Luis


-----------------------------
Carlos Phillips wrote:

> Hi,
> Is there a way to wrap a custom ITK based class in python without 
> changing the itk source tree.
>
> I need to compute the best fit plane for image data using sum of 
> absolute distances. If I understand correctly, I need to subclass 
> itk::SingleValuedCostFunction to represent the sum of absolute 
> distances between a plane with given parameters and the image data. My 
> ITK/VTK code is almost entirely written in python, so I need to find a 
> way to make the SingleValuedCostFunction subclass available to the 
> python runtime.
>
> Carlos
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>