//--------------------------------------------------------------------
+#if GDCM_MAJOR_VERSION == 2
void clitk::DicomRT_Contour::UpdateDicomItem()
{
DD("DicomRT_Contour::UpdateDicomItem");
double * p = mData->GetPoint(i);
points[i*3] = p[0];
points[i*3+1] = p[1];
- points[i*3+2] = p[2];
+#if VTK_MAJOR_VERSION <= 5
+ points[i*3+1] = p[2];
+#else
+ points[i*3+1] = p[2]-0.5;
+#endif
}
// Get attribute
DD(bb[0]);
}
+#endif
//--------------------------------------------------------------------
const gdcm::DataElement & contourdata = nestedds2.GetDataElement( tcontourdata );
at.SetFromDataElement( contourdata );
const double* points = at.GetValues();
-<<<<<<< Updated upstream
-<<<<<<< variant A
->>>>>>> variant B
- // unsigned int npts = at.GetNumberOfValues() / 3;
-======= end
-=======
// unsigned int npts = at.GetNumberOfValues() / 3;
->>>>>>> Stashed changes
-
assert(at.GetNumberOfValues() == static_cast<unsigned int>(mNbOfPoints)*3);
// Organize values
double p[3];
p[0] = points[i*3];
p[1] = points[i*3+1];
+#if VTK_MAJOR_VERSION <= 5
p[2] = points[i*3+2];
+#else
+ p[2] = points[i*3+2]+0.5;
+#endif
mData->SetPoint(i, p);
if (mZ == -1) mZ = p[2];
if (p[2] != mZ) {
double p[3];
p[0] = points[i*3];
p[1] = points[i*3+1];
+#if VTK_MAJOR_VERSION <= 5
p[2] = points[i*3+2];
+#else
+ p[2] = points[i*3+2]+0.5;
+#endif
mData->SetPoint(i, p);
if (mZ == -1) mZ = p[2];
if (p[2] != mZ) {