[Insight-developers] recent changes in itkTriangleCell.txx seems to break wrapitk builds

Luis Ibanez luis.ibanez at kitware.com
Sat Jul 19 08:47:33 EDT 2008


Arnaud,

The CrossProduct() templated function in itkVector.h
is a historic mishap, that we have to keep around
for Backwards compatibility.

The correct CrossProduct to use is the one in the
CovariantVector.h,cxx files.

The outcome of a cross product between two vectors
is not a vector, but a covariant vector. In the
particular case the you are using it in the TriangleCell,
for computing Normals, the correct type to use for
representing the Normal to a surface is a Covariant
Vector, and not a Vector.

Normals do not behave as Vectors under Affine Transforms.

These templated function is specialized in the .cxx
files only for three cases:

itkCovariantVector.cxx

CrossProduct( CovariantVector<double,3> ...
CrossProduct( CovariantVector<float,3> ...
CrossProduct( CovariantVector<int,3> ...

The case that is missing in the Wrapping is (float,2)

...which... is not a valid case, since you can't
have Normals to 3 points in a 2D space, or 4D, 5D...

The Normal computation should be removed from the
TriangleCell, or it should be delegated through
an intermediate class that could be specialized
for computing a cross product in 3D, and doing
nothing in any other dimension.


Also, the "std::cout" lines should be removed
from the code.

There is a lot of commented out code that must
be removed from the TriangleCell, before the
release.


      Luis



----------------------
Gaëtan Lehmann wrote:
> Hi Arnaud,
> 
> It seems that your recent changes in itkTriangleCell.txx are breaking the builds
> with wrapitk enabled.
> 
> http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkTriangleCell.txx?view=annotate&root=Insight&sortby=date
> http://www.cdash.org/CDash/viewBuildError.php?buildid=127316
> http://www.cdash.org/CDash/viewBuildError.php?buildid=127107
> 
> Can you look at that problem?
> Maybe I have instantiated the wrong types?
> 
> Thanks,
> 
> Gaëtan
> _______________________________________________
> 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