X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRT_Contour.h;h=940f25a7371e609d3b0186d054958e566ecd52fc;hb=1fea92ac237c16c1f027ffabdb42066f6f4f6114;hp=b59976969eaac0d6ce3808f25ef0bf88c2f60189;hpb=163fa80ef3873595f3e3cf75fb03e53536d1a6ee;p=clitk.git diff --git a/common/clitkDicomRT_Contour.h b/common/clitkDicomRT_Contour.h index b599769..940f25a 100644 --- a/common/clitkDicomRT_Contour.h +++ b/common/clitkDicomRT_Contour.h @@ -39,6 +39,8 @@ namespace clitk { 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(); @@ -47,37 +49,12 @@ namespace clitk { vtkPoints * mData; vtkPolyData * mMesh; bool mMeshIsUpToDate; + ///Z location of the contour + double mZ; }; //-------------------------------------------------------------------- - //-------------------------------------------------------------------- - template - 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 - std::vector parse_string(std::string str,char delim) { - std::istringstream ss(str); - std::string token; - std::vector result; - while (getline(ss,token,delim)) - { - result.push_back(parse_value(token)); - } - return result; - } - //-------------------------------------------------------------------- } // end namespace clitk