[Insight-developers] Roadblock in Filling CSwig wrapping gaps
Julien Jomier
jjomier at cs.unc.edu
Wed Jan 12 17:04:04 EST 2005
Brad, Kent,
> This error reveals that itk::TreeNode< itk::SpatialObject<2> > is not
> actually a valid instantiation.
The correct instantiation is:
itk::TreeNode< itk::SpatialObject<2> *>
Is this a wrapping only issue, or is this define somewhere else?
Julien
Brad King wrote:
> Kent Williams wrote:
>
>> I'm still having trouble with this. Since itk::TreeNode is needed in
>> more than one wrapped class, I made a new file, and THAT file gets
>> errors indicating that SpatialObject is getting wrapped even though it
>> isn't in the _cable_ namespace.
>
> [snip]
>
>> Building object file wrap_itkTreeNodeTcl.o...
>> /scratch/kent/brains2/iplFreeware/unpackdir/Insight/Code/SpatialObject/itkSpatialObject.txx:
>> In destructor `SwigValueWrapper<T>::~SwigValueWrapper() [with T =
>> itk::SpatialObject<2>]':
>> /scratch/kent/brains2/iplFreeware/gcc3/DEBUG/Insight-build/Wrapping/CSwig/Algorithms/wrap_itkTreeNodeTcl.cxx:1571:
>> instantiated from here
>
>
> This error reveals that itk::TreeNode< itk::SpatialObject<2> > is not
> actually a valid instantiation. These methods appear in the TreeNode
> template:
>
> /** Set the current value of the node */
> TValueType Set(const TValueType data);
>
> /** Return the child position given a value */
> int ChildPosition( TValueType node ) const;
>
> These pass instances of TValueType by value, which is not allowed for
> itk::SpatialObject<> because it derives from itk::LightObject. The
> reason an error has not been seen is because no one is calling these
> methods on this instantiation right now. If we were to be using
> explicit instantiation it would not compile. The wrapping instantiates
> all methods by explicitly calling each one. This is the source of the
> problem.
>
> We need to fix this design problem. Julien, can you comment on this
> please?
>
> Thanks,
> -Brad
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
More information about the Insight-developers
mailing list