From: Anthony Geay Date: Mon, 14 Feb 2022 06:55:59 +0000 (+0100) Subject: Fix ZJFilter to deal with int64 family array X-Git-Tag: V9_9_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=tools%2Fparavisaddons_common.git Fix ZJFilter to deal with int64 family array --- diff --git a/src/ZJFilter/plugin/ZJFilterModule/vtkZJFilter.cxx b/src/ZJFilter/plugin/ZJFilterModule/vtkZJFilter.cxx index e257e58..57a4c9b 100644 --- a/src/ZJFilter/plugin/ZJFilterModule/vtkZJFilter.cxx +++ b/src/ZJFilter/plugin/ZJFilterModule/vtkZJFilter.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include @@ -381,7 +381,7 @@ vtkDataSet* FilterFamilies(vtkZJFilter* zeBoss, vtkDataSet* input, const std::se if (!da) return 0; std::string daName(da->GetName()); - vtkIntArray* dai(vtkIntArray::SafeDownCast(da)); + vtkLongArray* dai(vtkLongArray::SafeDownCast(da)); if (daName != arrNameOfFamilyField || !dai) return 0; // @@ -391,7 +391,7 @@ vtkDataSet* FilterFamilies(vtkZJFilter* zeBoss, vtkDataSet* input, const std::se zeSelection->SetNumberOfComponents(1); char* pt(new char[nbOfTuples]); zeSelection->SetArray(pt, nbOfTuples, 0, VTK_DATA_ARRAY_DELETE); - const int* inPtr(dai->GetPointer(0)); + const long* inPtr(dai->GetPointer(0)); std::fill(pt, pt + nbOfTuples, 0); catchAll = true; catchSmth = false; @@ -527,12 +527,12 @@ int vtkZJFilter::RequestData( // vtkSmartPointer ds(FilterFamilies(this, usgIn, zeIds)); { - vtkNew arr; + vtkNew arr; arr->SetName((*it).c_str()); arr->SetNumberOfComponents(1); int nbTuples(ds->GetNumberOfCells()); arr->SetNumberOfTuples(nbTuples); - int* pt(arr->GetPointer(0)); + long* pt(arr->GetPointer(0)); std::fill(pt, pt + nbTuples, ids[i]); ds->GetCellData()->AddArray(arr); }