void Print(std::ostream & os = std::cout) const;
bool Read(gdcm::SQItem * item);
vtkPolyData * GetMesh();
+ vtkPoints * GetPoints() {return mData;}
+ double GetZ() const {return mZ;}
protected:
void ComputeMesh();
vtkPoints * mData;
vtkPolyData * mMesh;
bool mMeshIsUpToDate;
+ ///Z location of the contour
+ double mZ;
};
//--------------------------------------------------------------------
- //--------------------------------------------------------------------
- template<class ElementType>
- ElementType parse_value(std::string str)
- {
- std::istringstream parser(str);
- ElementType value;
- parser >> value;
- if (parser.fail()) {
- DD(str);
- DD(value);
- }
- assert(!parser.fail());
- return value;
- }
-
- template<class ElementType>
- std::vector<ElementType> parse_string(std::string str,char delim) {
- std::istringstream ss(str);
- std::string token;
- std::vector<ElementType> result;
- while (getline(ss,token,delim))
- {
- result.push_back(parse_value<ElementType>(token));
- }
- return result;
- }
- //--------------------------------------------------------------------
} // end namespace clitk