Skip to content

Commit

Permalink
Merge pull request #1220 from aylward/SpatialObjectPointAssignmentOpe…
Browse files Browse the repository at this point in the history
…ratorBug

BUG: operator= defined in [tube|*]SpatialObjectPoint incomplete
  • Loading branch information
thewtex authored Sep 2, 2019
2 parents 126b561 + 096a847 commit d2e5114
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ ContourSpatialObjectPoint<TPointDimension>::operator=(const ContourSpatialObject
this->m_Id = rhs.GetId();
this->m_PositionInObjectSpace = rhs.GetPositionInObjectSpace();
this->m_Color = rhs.GetColor();
this->m_SpatialObject = rhs.GetSpatialObject();
this->m_NormalInObjectSpace = rhs.GetNormalInObjectSpace();
this->m_PickedPointInObjectSpace = rhs.GetPickedPointInObjectSpace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ DTITubeSpatialObjectPoint<TPointDimension>::operator=(const DTITubeSpatialObject
this->SetId(rhs.GetId());
this->SetPositionInObjectSpace(rhs.GetPositionInObjectSpace());
this->SetColor(rhs.GetColor());
this->SetSpatialObject(rhs.GetSpatialObject());

// Tube
this->SetRadiusInObjectSpace(rhs.GetRadiusInObjectSpace());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ LineSpatialObjectPoint<TPointDimension>::operator=(const LineSpatialObjectPoint
{
this->m_Id = rhs.m_Id;
this->m_Color = rhs.m_Color;
this->m_SpatialObject = rhs.m_SpatialObject;
this->m_PositionInObjectSpace = rhs.m_PositionInObjectSpace;
this->m_NormalArrayInObjectSpace = rhs.m_NormalArrayInObjectSpace;
return *this;
Expand Down
6 changes: 6 additions & 0 deletions Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ class ITK_TEMPLATE_EXPORT SpatialObjectPoint
m_SpatialObject = so;
}

SpatialObjectType *
GetSpatialObject() const
{
return m_SpatialObject;
}

/** Set the position in world coordinates, using the
* spatialObject's objectToWorld transform, inverse */
void
Expand Down
2 changes: 2 additions & 0 deletions Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ SpatialObjectPoint<TPointDimension>::operator=(const SpatialObjectPoint & rhs)
this->SetId(rhs.GetId());
this->SetPositionInObjectSpace(rhs.GetPositionInObjectSpace());
this->SetColor(rhs.GetColor());
this->SetSpatialObject(rhs.GetSpatialObject());
}
return *this;
}
Expand All @@ -103,6 +104,7 @@ SpatialObjectPoint<TPointDimension>::PrintSelf(std::ostream & os, Indent indent)
os << m_PositionInObjectSpace[i - 1] << ",";
}
os << m_PositionInObjectSpace[TPointDimension - 1] << std::endl;
os << indent << "SpatialObject: " << m_SpatialObject << std::endl;
}
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ SurfaceSpatialObjectPoint<TPointDimension>::operator=(const SurfaceSpatialObject
{
this->m_Id = rhs.m_Id;
this->m_Color = rhs.m_Color;
this->m_SpatialObject = rhs.m_SpatialObject;
this->m_PositionInObjectSpace = rhs.m_PositionInObjectSpace;
this->m_NormalInObjectSpace = rhs.m_NormalInObjectSpace;
return *this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ TubeSpatialObjectPoint<TPointDimension>::operator=(const TubeSpatialObjectPoint
this->SetId(rhs.GetId());
this->SetPositionInObjectSpace(rhs.GetPositionInObjectSpace());
this->SetColor(rhs.GetColor());
this->SetSpatialObject(rhs.GetSpatialObject());

// class
this->SetRadiusInObjectSpace(rhs.GetRadiusInObjectSpace());
Expand Down

0 comments on commit d2e5114

Please sign in to comment.