X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkDicomRT_Contour.cxx;h=6059f03b6644799d1bfff59410b17d499355e5b4;hb=1fea92ac237c16c1f027ffabdb42066f6f4f6114;hp=cee3b678b8891718ece52546469e5e4eef23af27;hpb=1a13aa34de4f99334b27050c18b32e6e4c8f0650;p=clitk.git diff --git a/common/clitkDicomRT_Contour.cxx b/common/clitkDicomRT_Contour.cxx index cee3b67..6059f03 100644 --- a/common/clitkDicomRT_Contour.cxx +++ b/common/clitkDicomRT_Contour.cxx @@ -25,6 +25,7 @@ clitk::DicomRT_Contour::DicomRT_Contour() { mMeshIsUpToDate = false; mNbOfPoints = 0; + mZ = -1; } //-------------------------------------------------------------------- @@ -74,20 +75,19 @@ bool clitk::DicomRT_Contour::Read(gdcm::SQItem * item) mData = vtkPoints::New(); mData->SetDataTypeToDouble(); mData->SetNumberOfPoints(mNbOfPoints); - double z = -1; for(unsigned int i=0; iSetPoint(i, p); - if (z == -1) z = p[2]; - if (p[2] != z) { + if (mZ == -1) mZ = p[2]; + if (p[2] != mZ) { DD(i); DD(p[2]); - DD(z); + DD(mZ); std::cout << "ERROR ! contour not in the same slice" << std::endl; - assert(p[2] == z); + assert(p[2] == mZ); } }