Skip to content

Commit

Permalink
STYLE: remove useless member for the union of 3 objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Feb 23, 2022
1 parent 6d73ac0 commit 5522ddd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion include/rtkForbildPhantomFileReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class RTK_EXPORT ForbildPhantomFileReader : public itk::LightProcessObject
ConvexShape::Pointer m_ConvexShape;
ConvexShapeVectorType m_Unions;
std::vector<int> m_UnionWith;
std::vector<int> m_UnionIntersectionPosition;
};

} // end namespace rtk
Expand Down
5 changes: 2 additions & 3 deletions src/rtkForbildPhantomFileReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,6 @@ ForbildPhantomFileReader::FindUnions(const std::string & s)
itkExceptionMacro(<< "Could not compile " << regex);
const char * currs = s.c_str();
m_UnionWith.push_back(-1);
m_UnionIntersectionPosition.push_back(-1);
while (re.find(currs))
{
currs += re.end();
Expand All @@ -533,7 +532,6 @@ ForbildPhantomFileReader::FindUnions(const std::string & s)
ico->SetDensity(-1. * m_ConvexShape->GetDensity());

m_UnionWith.back() = pos;
m_UnionIntersectionPosition.back() = m_Unions.size();
m_Unions.push_back(ico.GetPointer());

// Handles the union of three objects. Union of more objects would require
Expand All @@ -549,7 +547,8 @@ ForbildPhantomFileReader::FindUnions(const std::string & s)

ico = IntersectionOfConvexShapes::New();
ico->AddConvexShape(m_ConvexShape);
ico->AddConvexShape(m_Unions[m_UnionIntersectionPosition[pos]]);
ico->AddConvexShape(m_GeometricPhantom->GetConvexShapes()[pos]);
ico->AddConvexShape(m_GeometricPhantom->GetConvexShapes()[m_UnionWith[pos]]);
ico->SetDensity(m_ConvexShape->GetDensity());
m_Unions.push_back(ico.GetPointer());
}
Expand Down

0 comments on commit 5522ddd

Please sign in to comment.