diff --git a/cmake/version.cmake b/cmake/version.cmake index 2ef6dcf..3031eb7 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -4,7 +4,7 @@ set (VTK_CONTRIB_MAJOR_VERSION "5") set (VTK_CONTRIB_MINOR_VERSION "13") -set (VTK_CONTRIB_RELEASE_VERSION "0") +set (VTK_CONTRIB_RELEASE_VERSION "1") set (VTK_CONTRIB_VERSION ${VTK_CONTRIB_MAJOR_VERSION}.${VTK_CONTRIB_MINOR_VERSION}.${VTK_CONTRIB_RELEASE_VERSION}) diff --git a/src/VtkContrib/public/VtkContrib/vtk2dAxiDihedron.h b/src/VtkContrib/public/VtkContrib/vtk2dAxiDihedron.h index 663533a..29ef853 100644 --- a/src/VtkContrib/public/VtkContrib/vtk2dAxiDihedron.h +++ b/src/VtkContrib/public/VtkContrib/vtk2dAxiDihedron.h @@ -4,8 +4,6 @@ * @date 18/09/2019 */ -#ifndef VTK_5 - #ifndef VTK_2DAXI_DIHEDRON_H #define VTK_2DAXI_DIHEDRON_H @@ -83,6 +81,5 @@ class vtk2dAxiDihedron : public vtkTrihedron vtkConeSource* m_zTipCurveSource; }; // class vtk2dAxiDihedron -#endif // VTK_5 #endif // VTK_2DAXI_DIHEDRON_H diff --git a/src/VtkContrib/vtk2dAxiDihedron.cpp b/src/VtkContrib/vtk2dAxiDihedron.cpp index 5910fbc..75a164e 100644 --- a/src/VtkContrib/vtk2dAxiDihedron.cpp +++ b/src/VtkContrib/vtk2dAxiDihedron.cpp @@ -4,8 +4,6 @@ * @date 18/09/2019 */ -#ifndef VTK_5 - #include "VtkContrib/vtk2dAxiDihedron.h" #include @@ -45,11 +43,7 @@ vtk2dAxiDihedron::vtk2dAxiDihedron ( ) GetZAxisArrowSource ( ).InvertOn ( ); if (0 != GetZAxisLabelActor ( )) GetZAxisLabelActor ( )->AddPosition (1., -radius, -2.1); -#ifndef VTK_5 zShaftCurveMapper->SetInputConnection (m_zShaftCurveSource->GetOutputPort ( )); -#else // VTK_5 - zShaftCurveMapper->SetInput (m_zShaftCurveSource->GetOutput ( )); -#endif // VTK_5 zShaftCurveMapper->ScalarVisibilityOff ( ); m_zShaftActor->SetMapper (zShaftCurveMapper); AddPart (m_zShaftActor); @@ -64,11 +58,7 @@ vtk2dAxiDihedron::vtk2dAxiDihedron ( ) 1., -radius, -GetZAxisArrowSource ( ).GetTipLength ( ) / 2.); vtkPolyDataMapper* zTipConeMapper = vtkPolyDataMapper::New ( ); zTipConeMapper->ScalarVisibilityOff ( ); -#ifndef VTK_5 zTipConeMapper->SetInputConnection (m_zTipCurveSource->GetOutputPort ( )); -#else // VTK_5 - zTipConeMapper->SetInput (m_zTipCurveSource->GetOutput ( )); -#endif // VTK_5 m_zTipActor = vtkActor::New ( ); m_zTipActor->SetMapper (zTipConeMapper); m_zTipActor->GetProperty ( )->SetColor (vtkTrihedron::zColor); @@ -168,4 +158,3 @@ void vtk2dAxiDihedron::SetElevationColor (double r, double g, double b) m_zTipActor->GetProperty ( )->SetColor (r, g, b); } // vtk2dAxiDihedron::SetElevationColor -#endif // VTK_5 diff --git a/src/VtkContrib/vtkECMAxesActor.cpp b/src/VtkContrib/vtkECMAxesActor.cpp index 1a4f96d..e81015f 100644 --- a/src/VtkContrib/vtkECMAxesActor.cpp +++ b/src/VtkContrib/vtkECMAxesActor.cpp @@ -36,33 +36,21 @@ vtkECMAxesActor::vtkECMAxesActor ( ) // Création de l'axe X _xAxis->SetPoint1 (-1., 0., 0.); _xAxis->SetPoint2 (1., 0., 0.); -#ifndef VTK_5 xAxisMapper->SetInputConnection (_xAxis->GetOutputPort ( )); -#else // VTK_5 - xAxisMapper->SetInput (_xAxis->GetOutput ( )); -#endif // VTK_5 xAxisMapper->ScalarVisibilityOff ( ); _xAxisActor->SetMapper (xAxisMapper); // Création de l'axe Y _yAxis->SetPoint1 (0., -1., 0.); _yAxis->SetPoint2 (0., 1., 0.); -#ifndef VTK_5 yAxisMapper->SetInputConnection (_yAxis->GetOutputPort ( )); -#else // VTK_5 - yAxisMapper->SetInput (_yAxis->GetOutput ( )); -#endif // VTK_5 yAxisMapper->ScalarVisibilityOff ( ); _yAxisActor->SetMapper (yAxisMapper); // Création de l'axe Z _zAxis->SetPoint1 (0., 0., -1.); _zAxis->SetPoint2 (0., 0., 1.); -#ifndef VTK_5 zAxisMapper->SetInputConnection (_zAxis->GetOutputPort ( )); -#else // VTK_5 - zAxisMapper->SetInput (_zAxis->GetOutput ( )); -#endif // VTK_5 zAxisMapper->ScalarVisibilityOff (); _zAxisActor->SetMapper (zAxisMapper); diff --git a/src/VtkContrib/vtkFrustumWidget.cpp b/src/VtkContrib/vtkFrustumWidget.cpp index 9828be7..eba465c 100644 --- a/src/VtkContrib/vtkFrustumWidget.cpp +++ b/src/VtkContrib/vtkFrustumWidget.cpp @@ -224,7 +224,7 @@ void vtkFrustumWidget::vtkInternalPlaneWidget::SetInteractorEnabled (bool enable } // if (true == enabled) } // if (0 != this->Picker) else - vtkErrorMacro ("vtkFrustumWidget::SetInteractorEnabled : null picker.") + vtkErrorMacro ("vtkFrustumWidget::SetInteractorEnabled : null picker."); } // vtkInternalPlaneWidget::SetInteractorEnabled @@ -393,7 +393,7 @@ void vtkFrustumWidget::SetPlane (SIDE p, double origin [3], double normal [3]) Update (planeWidget); } // if (0 != planeWidget) else - vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p) + vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p); } // vtkFrustumWidget::SetPlane @@ -406,7 +406,7 @@ void vtkFrustumWidget::GetPlane (SIDE p, double origin [3], double normal [3]) planeWidget->GetNormal (normal); } // if (0 != planeWidget) else - vtkErrorMacro ("vtkFrustumWidget::GetPlane : 0 <= p <= 5 is not verified. p =" << p) + vtkErrorMacro ("vtkFrustumWidget::GetPlane : 0 <= p <= 5 is not verified. p =" << p); } // vtkFrustumWidget::GetPlane @@ -419,7 +419,7 @@ void vtkFrustumWidget::SetPlaneOrigin (SIDE p, double origin [3]) Update (planeWidget); } // if (0 != planeWidget) else - vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p) + vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p); } // vtkFrustumWidget::SetPlaneOrigin @@ -429,7 +429,7 @@ void vtkFrustumWidget::GetPlaneOrigin (SIDE p, double origin [3]) if (0 != planeWidget) planeWidget->GetOrigin (origin); else - vtkErrorMacro ("vtkFrustumWidget::GetPlaneOrigin : 0 <= p <= 5 is not verified. p =" << p) + vtkErrorMacro ("vtkFrustumWidget::GetPlaneOrigin : 0 <= p <= 5 is not verified. p =" << p); } // vtkFrustumWidget::GetPlaneOrigin @@ -442,7 +442,7 @@ void vtkFrustumWidget::SetPlaneNormal (SIDE p, double normal [3]) Update (planeWidget); } // if (0 != planeWidget) else - vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p) + vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= p <= 5 is not verified. p =" << p); } // vtkFrustumWidget::SetPlaneNormal @@ -452,7 +452,7 @@ void vtkFrustumWidget::GetPlaneNormal (SIDE p, double normal [3]) if (0 != planeWidget) planeWidget->GetNormal (normal); else - vtkErrorMacro ("vtkFrustumWidget::GetPlaneNormal : 0 <= p <= 5 is not verified. p =" << p) + vtkErrorMacro ("vtkFrustumWidget::GetPlaneNormal : 0 <= p <= 5 is not verified. p =" << p); } // vtkFrustumWidget::GetPlaneNormal @@ -467,7 +467,7 @@ void vtkFrustumWidget::SetInteractorColor (SIDE axis, double rgb [3]) { if ((axis >= _planeWidgets.size ( )) || (0 == _planeWidgets [axis])) { - vtkErrorMacro ("vtkFrustumWidget::SetInteractorColor : 0 <= axis <= " << _planeWidgets.size ( ) << " is not verified. axis =" << axis) + vtkErrorMacro ("vtkFrustumWidget::SetInteractorColor : 0 <= axis <= " << _planeWidgets.size ( ) << " is not verified. axis =" << axis); return; } // if ((axis >= _planeWidgets.size ( )) || (0 == _planeWidgets [axis])) @@ -496,7 +496,7 @@ void vtkFrustumWidget::SetInteractorEnabled (SIDE p, bool enabled) if (0 != planeWidget) planeWidget->SetInteractorEnabled (enabled); else - vtkErrorMacro ("vtkFrustumWidget::SetInteractorEnabled : 0 <= p <= 5 is not verified. p =" << p) + vtkErrorMacro ("vtkFrustumWidget::SetInteractorEnabled : 0 <= p <= 5 is not verified. p =" << p); } // vtkFrustumWidget::SetInteractorEnabled @@ -505,7 +505,9 @@ void vtkFrustumWidget::GetBounds (double bounds [6]) vtkPolyData* frustum = 0 == _frustum ? 0 : _frustum->GetOutput ( ); if (0 == frustum) - vtkErrorMacro ("vtkFrustumWidget::GetBounds : null frustum.") + { + vtkErrorMacro ("vtkFrustumWidget::GetBounds : null frustum."); + } else { // frustum->GetBounds (bounds); @@ -575,7 +577,9 @@ void vtkFrustumWidget::SetPlanes (vtkPlanes& planes) Update (0); } else - vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= planes.GetNumberOfPlanes ( ) <= 5 is not verified. p =" << planes.GetNumberOfPlanes ( )) + { + vtkErrorMacro ("vtkFrustumWidget::SetPlane : 0 <= planes.GetNumberOfPlanes ( ) <= 5 is not verified. p =" << planes.GetNumberOfPlanes ( )); + } } // vtkFrustumWidget::SetPlanes @@ -601,7 +605,7 @@ void vtkFrustumWidget::AddParallelPlanes (SIDE p) case TOP : AddParallelPlanes (BOTTOM, TOP); break; case FRONT : case BACK : AddParallelPlanes (FRONT, BACK); break; - default : vtkErrorMacro ("vtkFrustumWidget::AddParallelPlanes : 0 <= p <= 5 is not verified. p =" << p) + default : vtkErrorMacro ("vtkFrustumWidget::AddParallelPlanes : 0 <= p <= 5 is not verified. p =" << p); } // switch (p) } // vtkFrustumWidget::AddParallelPlanes @@ -616,7 +620,7 @@ void vtkFrustumWidget::RemoveParallelPlanes (SIDE p) case TOP : RemoveParallelPlanes (BOTTOM, TOP); break; case FRONT : case BACK : RemoveParallelPlanes (FRONT, BACK); break; - default : vtkErrorMacro ("vtkFrustumWidget::RemoveParallelPlanes : 0 <= p <= 5 is not verified. p =" << p) + default : vtkErrorMacro ("vtkFrustumWidget::RemoveParallelPlanes : 0 <= p <= 5 is not verified. p =" << p); } // switch (p) } // vtkFrustumWidget::RemoveParallelPlanes diff --git a/src/VtkContrib/vtkKatAxisActor.cpp b/src/VtkContrib/vtkKatAxisActor.cpp index 5cd6410..ca804c8 100644 --- a/src/VtkContrib/vtkKatAxisActor.cpp +++ b/src/VtkContrib/vtkKatAxisActor.cpp @@ -113,11 +113,7 @@ vtkKatAxisActor::vtkKatAxisActor() this->TitleVector = vtkVectorText::New(); this->TitleMapper = vtkPolyDataMapper::New(); -#ifndef VTK_5 this->TitleMapper->SetInputConnection (this->TitleVector->GetOutputPort()); -#else // VTK_5 - this->TitleMapper->SetInput(this->TitleVector->GetOutput()); -#endif // VTK_5 this->TitleActor = vtkFollower::New(); this->TitleActor->SetMapper(this->TitleMapper); @@ -129,11 +125,7 @@ vtkKatAxisActor::vtkKatAxisActor() this->Axis = vtkPolyData::New(); this->AxisMapper = vtkPolyDataMapper::New(); -#ifndef VTK_5 this->AxisMapper->SetInputData(this->Axis); -#else // VTK_5 - this->AxisMapper->SetInput(this->Axis); -#endif // VTK_5 this->AxisActor = vtkActor::New(); this->AxisActor->SetMapper(this->AxisMapper); @@ -1203,11 +1195,7 @@ vtkKatAxisActor::SetNumberOfLabels(const int numLabels) { this->LabelVectors[i] = vtkVectorText::New(); this->LabelMappers[i] = vtkPolyDataMapper::New(); -#ifndef VTK_5 this->LabelMappers[i]->SetInputConnection(this->LabelVectors[i]->GetOutputPort()); -#else // VTK_5 - this->LabelMappers[i]->SetInput(this->LabelVectors[i]->GetOutput()); -#endif // VTK_5 this->LabelActors[i] = vtkFollower::New(); this->LabelActors[i]->SetMapper(this->LabelMappers[i]); } diff --git a/src/VtkContrib/vtkPolygonFilter.cpp b/src/VtkContrib/vtkPolygonFilter.cpp index a704a2a..8cac2e2 100644 --- a/src/VtkContrib/vtkPolygonFilter.cpp +++ b/src/VtkContrib/vtkPolygonFilter.cpp @@ -3,6 +3,10 @@ #include #include #include +#include +#if VTK_MAJOR_VERSION >= 9 +#include +#endif // VTK_MAJOR_VERSION >= 9 #include #include @@ -68,9 +72,23 @@ int vtkPolygonFilter::RequestData (vtkInformation* request, vtkInformationVector output->Reset ( ); const size_t cellNum = cells->GetNumberOfCells ( ); - vtkIdType* cellsPtr = cells->GetPointer ( ); output->SetPoints (pointSet); output->Allocate (cellNum, cellNum); +#ifdef VTK_CELL_ARRAY_V2 // defined in vtkCellArray.h CP v 5.13.1 Portage VTK 9.3.0 + vtkSmartPointer cellIterator = vtk::TakeSmartPointer (cells->NewIterator ( )); + for (cellIterator->GoToFirstCell ( ); !cellIterator->IsDoneWithTraversal ( ); cellIterator->GoToNextCell ( )) + { + vtkIdType nodeCount = 0; + const vtkIdType* ids = 0; + cellIterator->GetCurrentCell (nodeCount, ids); + switch (nodeCount) + { + case 3 : output->InsertNextCell (VTK_TRIANGLE, nodeCount, ids); break; + case 4 : output->InsertNextCell (VTK_QUAD, nodeCount, ids); break; + } // switch (nodeCount) + } // for (cellIterator->GoToFirstCell ( ); !cellIterator->IsDoneWithTraversal ( ); cellIterator->GoToNextCell ( )) +#else // VTK_CELL_ARRAY_V2 + vtkIdType* cellsPtr = cells->GetPointer ( ); for (int i = 0; i < cellNum; i++) { const vtkIdType nodeCount = *cellsPtr; @@ -82,6 +100,7 @@ int vtkPolygonFilter::RequestData (vtkInformation* request, vtkInformationVector } // switch (nodeCount) cellsPtr += nodeCount; } // for (i = 0; i < cellNum; i++) +#endif // VTK_CELL_ARRAY_V2 output->GetCellData ( )->PassData (input->GetCellData ( )); output->Squeeze ( ); diff --git a/src/VtkContrib/vtkTrihedron.cpp b/src/VtkContrib/vtkTrihedron.cpp index ce63900..90356b1 100644 --- a/src/VtkContrib/vtkTrihedron.cpp +++ b/src/VtkContrib/vtkTrihedron.cpp @@ -71,19 +71,11 @@ vtkTrihedron::vtkTrihedron ( ) // Création de l'axe X m_xAxisArrowSource->SetShaftResolution(ArrowResolution); m_xAxisArrowSource->SetTipResolution(TipResolution); -#ifndef VTK_5 xAxisMapper->SetInputConnection (m_xAxisArrowSource->GetOutputPort ( )); -#else // VTK_5 - xAxisMapper->SetInput (m_xAxisArrowSource->GetOutput ( )); -#endif // VTK_5 xAxisMapper->ScalarVisibilityOff(); m_xAxisActor->SetMapper(xAxisMapper); m_xVectorText->SetText("x"); -#ifndef VTK_5 xLabelMapper->SetInputConnection(m_xVectorText->GetOutputPort()); -#else // VTK_5 - xLabelMapper->SetInput(m_xVectorText->GetOutput()); -#endif // VTK_5 m_xLabelActor->SetMapper(xLabelMapper); m_xLabelActor->SetScale(0.4,0.4,0.4); m_xLabelActor->AddPosition(1.1,0.0,0.0); @@ -102,20 +94,12 @@ vtkTrihedron::vtkTrihedron ( ) // Création de l'axe Y m_yAxisArrowSource->SetShaftResolution(ArrowResolution); m_yAxisArrowSource->SetTipResolution(TipResolution); -#ifndef VTK_5 yAxisMapper->SetInputConnection (m_yAxisArrowSource->GetOutputPort ( )); -#else // VTK_5 - yAxisMapper->SetInput(m_yAxisArrowSource->GetOutput()); -#endif // VTK_5 yAxisMapper->ScalarVisibilityOff(); m_yAxisActor->SetMapper(yAxisMapper); m_yAxisActor->RotateZ(90); m_yVectorText->SetText("y"); -#ifndef VTK_5 yLabelMapper->SetInputConnection(m_yVectorText->GetOutputPort()); -#else // VTK_5 - yLabelMapper->SetInput(m_yVectorText->GetOutput()); -#endif // VTK_5 m_yLabelActor->SetMapper(yLabelMapper); m_yLabelActor->SetScale(0.4,0.4,0.4); m_yLabelActor->AddPosition(0.0,1.1,0.0); @@ -134,20 +118,12 @@ vtkTrihedron::vtkTrihedron ( ) // Création de l'axe Z m_zAxisArrowSource->SetShaftResolution(ArrowResolution); m_zAxisArrowSource->SetTipResolution(TipResolution); -#ifndef VTK_5 zAxisMapper->SetInputConnection (m_zAxisArrowSource->GetOutputPort ( )); -#else // VTK_5 - zAxisMapper->SetInput(m_zAxisArrowSource->GetOutput()); -#endif // VTK_5 zAxisMapper->ScalarVisibilityOff(); m_zAxisActor->SetMapper(zAxisMapper); m_zAxisActor->RotateY(-90); m_zVectorText->SetText("z"); -#ifndef VTK_5 zLabelMapper->SetInputConnection(m_zVectorText->GetOutputPort()); -#else // VTK_5 - zLabelMapper->SetInput(m_zVectorText->GetOutput()); -#endif // VTK_5 m_zLabelActor->SetMapper(zLabelMapper); m_zLabelActor->SetScale(0.4,0.4,0.4); m_zLabelActor->AddPosition(0.0,0.0,1.1); diff --git a/src/tests/point_widget.cpp b/src/tests/point_widget.cpp index c477415..2eae5e1 100644 --- a/src/tests/point_widget.cpp +++ b/src/tests/point_widget.cpp @@ -105,13 +105,9 @@ int main ( int argc, char *argv[] ) vtkUnstructuredGrid* grid = vtkUnstructuredGrid::New ( ); vtkDataSetMapper* mapper = vtkDataSetMapper::New ( ); -#ifndef VTK_5 mapper->SetInputData (grid); -#else // VTK_5 - mapper->SetInput (grid); -#endif // VTK_5 mapper->ScalarVisibilityOff ( ); -#if defined(VTK5) || defined(VTK_7) +#ifdef VTK_7 mapper->SetImmediateModeRendering (false); #endif vtkActor* actor = vtkActor::New ( ); diff --git a/versions.txt b/versions.txt index 00e7a59..d835bfa 100644 --- a/versions.txt +++ b/versions.txt @@ -1,3 +1,11 @@ +Version 5.13.1 : 24/10/25 +================ + +Portage VTK 9.2.5/9.5.2. + +Suppression du code VTK 5. + + Version 5.13.0 : 21/10/25 ================