When using the inline method SetPoint() of class mitk::Line, there appears a compiler error:
Error 1 error C2679: binary '=' : no operator found which takes a right-hand operand of type 'itk::Point<TCoordRep,NPointDimension>' (or there is no acceptable conversion) D:\prg\MBI-02-src\MITK\Core\Code\DataManagement\mitkLine.h 80
Here is an example usage to reproduce the error:
mitk::Line<double,2> returnValue = mitk::Line<double,2>(); itk::Point<double,2> origin; origin[0] = [TODO]; origin[1] = [TODO]; itk::Vector<double,2> direction; direction[0] = [TODO]; direction[1] = [TODO]; returnValue.SetDirection(direction); returnValue.SetPoint(origin);
To fix it, the inline method SetPoint(...) has to be adapted as follows:
void SetPoint( const itk::Point<TCoordRep,NPointDimension>& point1 )
{ itk::Point<TCoordRep,NPointDimension> point2; point2 = m_Point + m_Direction; m_Point = point1; m_Direction = point2.GetVectorFromOrigin() - point1.GetVectorFromOrigin(); }