X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMeshReader.cxx;h=b04163853d202f14f1a435f89b50c9444f38a036;hb=73f0ab806cbb168db4d09908a714f8b7a662ee21;hp=d03b0ac29c69013051926ae048ddebaa51deb1ca;hpb=2b5b3e906ee95519169e9b6d4bb2da9d2e00d8b3;p=clitk.git diff --git a/vv/vvMeshReader.cxx b/vv/vvMeshReader.cxx index d03b0ac..b041638 100644 --- a/vv/vvMeshReader.cxx +++ b/vv/vvMeshReader.cxx @@ -24,7 +24,7 @@ // gdcm #include -#if GDCM_MAJOR_VERSION == 2 +#if GDCM_MAJOR_VERSION >= 2 #include #include #include @@ -34,6 +34,7 @@ #endif // vtk +#include #include #include #include @@ -124,7 +125,7 @@ std::vector > vvMeshReader::GetROINames() } #else -#if GDCM_MAJOR_VERSION == 2 +#if GDCM_MAJOR_VERSION >= 2 // duplicate code from clitk::DicomRT_StructureSet::Read gdcm::Reader * reader = new gdcm::Reader; @@ -222,14 +223,7 @@ std::vector > vvMeshReader::GetROINames() std::vector vvMeshReader::readSelectedContours() { std::vector result; -#if GDCM_MAJOR_VERSION == 2 - -#if CLITK_USE_SYSTEM_GDCM == 0 - - clitkExceptionMacro("ERROR ! You need to compile vv with itk4 + system_gdcm to use this function"); - -#endif - +#if GDCM_MAJOR_VERSION >= 2 gdcm::Reader reader; reader.SetFileName(filename.c_str()); reader.Read(); @@ -297,7 +291,11 @@ std::vector vvMeshReader::readSelectedContours() ids[1] = (ids[0] + 1) % tpoint_number.GetValue(); //0-1,1-2,...,n-1-0 contour->GetLines()->InsertNextCell(2, ids); } +#if VTK_MAJOR_VERSION <= 5 append->AddInput(contour); +#else + append->AddInputData(contour); +#endif } else if (contour_type == "POINT ")