First compilable version of GEOM and SMESH modules.
bool SMESH_ActorDef::IsInfinitive(){
vtkDataSet *aDataSet = myPickableActor->GetUnstructuredGrid();
- aDataSet->Update();
+ //aDataSet->Update(); // OUV_PORTING_VTK6: seems to be useless
myIsInfinite = aDataSet->GetNumberOfCells() == 0 ||
( aDataSet->GetNumberOfCells() == 1 &&
aDataSet->GetCell(0)->GetCellType() == VTK_VERTEX );
{
vtkXMLUnstructuredGridWriter* aWriter = vtkXMLUnstructuredGridWriter::New();
aWriter->SetFileName(theFileName);
- aWriter->SetInput(theGrid);
+ aWriter->SetInputData(theGrid);
aWriter->SetDataModeToAscii();
if(theGrid->GetNumberOfCells()){
aWriter->Write();
myCellsNumDataSet = vtkUnstructuredGrid::New();
myCellCenters = VTKViewer_CellCenters::New();
- myCellCenters->SetInput(myCellsNumDataSet);
+ myCellCenters->SetInputData(myCellsNumDataSet);
myClsMaskPoints = vtkMaskPoints::New();
- myClsMaskPoints->SetInput(myCellCenters->GetOutput());
+ myClsMaskPoints->SetInputConnection(myCellCenters->GetOutputPort());
myClsMaskPoints->SetOnRatio(1);
myClsSelectVisiblePoints = vtkSelectVisiblePoints::New();
- myClsSelectVisiblePoints->SetInput(myClsMaskPoints->GetOutput());
+ myClsSelectVisiblePoints->SetInputConnection(myClsMaskPoints->GetOutputPort());
myClsSelectVisiblePoints->SelectInvisibleOff();
myClsSelectVisiblePoints->SetTolerance(0.1);
myClsLabeledDataMapper = vtkLabeledDataMapper::New();
- myClsLabeledDataMapper->SetInput(myClsSelectVisiblePoints->GetOutput());
+ myClsLabeledDataMapper->SetInputConnection(myClsSelectVisiblePoints->GetOutputPort());
myClsLabeledDataMapper->SetLabelFormat("%d");
myClsLabeledDataMapper->SetLabelModeToLabelScalars();
anArray->SetValue(anId,aSMDSId);
}
aDataSet->GetCellData()->SetScalars(anArray);
- myCellCenters->SetInput(aDataSet);
+ myCellCenters->SetInputData(aDataSet);
myCellsLabels->SetVisibility(GetVisibility());
}else{
myCellsLabels->SetVisibility(false);
myFaceOrientationFilter = SMESH_FaceOrientationFilter::New();
myFaceOrientationDataMapper = vtkPolyDataMapper::New();
- myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput());
+ myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort());
myFaceOrientation = vtkActor::New();
myFaceOrientation->SetMapper(myFaceOrientationDataMapper);
{
int anId = 0;
if(theIsImplicitFunctionUsed)
- myPassFilter[ anId ]->SetInput( myExtractGeometry->GetOutput() );
+ myPassFilter[ anId ]->SetInputConnection( myExtractGeometry->GetOutputPort() );
else
- myPassFilter[ anId ]->SetInput( myMergeFilter->GetOutput() );
+ myPassFilter[ anId ]->SetInputConnection( myMergeFilter->GetOutputPort() );
myIsImplicitFunctionUsed = theIsImplicitFunctionUsed;
SetStoreClippingMapping(myStoreClippingMapping);
//myIsShrinkable = theGrid->GetNumberOfCells() > 10;
myIsShrinkable = true;
- myExtractUnstructuredGrid->SetInput(theGrid);
+ myExtractUnstructuredGrid->SetInputData(theGrid);
- myMergeFilter->SetGeometry(myExtractUnstructuredGrid->GetOutput());
+ myMergeFilter->SetGeometryConnection(myExtractUnstructuredGrid->GetOutputPort());
- myExtractGeometry->SetInput(myMergeFilter->GetOutput());
+ myExtractGeometry->SetInputConnection(myMergeFilter->GetOutputPort());
int anId = 0;
SetImplicitFunctionUsed(myIsImplicitFunctionUsed);
- myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myPassFilter[ anId + 1]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 1
- myTransformFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 2
- myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
- myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
+ myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 3
- myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myGeomFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 4
- myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() );
- myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myPassFilter[ anId ]->SetInputConnection( myGeomFilter->GetOutputPort() );
+ myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 5
- myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ // OUV_PORTING_VTK6: to check
+ myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
vtkLODActor::SetMapper( myMapper );
Modified();
theLookupTable->SetNumberOfTableValues(theScalarBarActor->GetMaximumNumberOfColors());
theLookupTable->Build();
- myMergeFilter->SetScalars(aDataSet);
+ myMergeFilter->SetScalarsData(aDataSet);
aDataSet->Delete();
}
GetMapper()->SetScalarVisibility(anIsInitialized);
theLookupTable->SetRange(aScalars->GetRange());
theLookupTable->Build();
- myMergeFilter->SetScalars(aDataSet);
+ myMergeFilter->SetScalarsData(aDataSet);
aDataSet->Delete();
}
else if (MultiConnection2D* aMultiConnection2D = dynamic_cast<MultiConnection2D*>(theFunctor.get())){
theLookupTable->SetRange(aScalars->GetRange());
theLookupTable->Build();
- myMergeFilter->SetScalars(aDataSet);
+ myMergeFilter->SetScalarsData(aDataSet);
aDataSet->Delete();
}
}
::SetShrink()
{
if ( !myIsShrinkable ) return;
- if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
+ if ( vtkAlgorithmOutput* aDataSet = myPassFilter[ 0 ]->GetOutputPort() )
{
- myShrinkFilter->SetInput( aDataSet );
- myPassFilter[ 1 ]->SetInput( myShrinkFilter->GetOutput() );
+ myShrinkFilter->SetInputConnection( aDataSet );
+ myPassFilter[ 1 ]->SetInputConnection( myShrinkFilter->GetOutputPort() );
myIsShrunk = true;
}
}
::UnShrink()
{
if ( !myIsShrunk ) return;
- if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
+ if ( vtkAlgorithmOutput* aDataSet = myPassFilter[ 0 ]->GetOutputPort() )
{
- myPassFilter[ 1 ]->SetInput( aDataSet );
+ myPassFilter[ 1 ]->SetInputConnection( aDataSet );
myPassFilter[ 1 ]->Modified();
myIsShrunk = false;
Modified();
SMESH_DeviceActor
::SetFacesOriented(bool theIsFacesOriented)
{
- if ( vtkDataSet* aDataSet = myTransformFilter->GetOutput() )
+ if ( vtkAlgorithmOutput* aDataSet = myTransformFilter->GetOutputPort() )
{
myIsFacesOriented = theIsFacesOriented;
if( theIsFacesOriented )
- myFaceOrientationFilter->SetInput( aDataSet );
+ myFaceOrientationFilter->SetInputConnection( aDataSet );
UpdateFaceOrientation();
}
}
myFacePolyData = vtkPolyData::New();
myFaceCenters = VTKViewer_CellCenters::New();
- myFaceCenters->SetInput(myFacePolyData);
+ myFaceCenters->SetInputData(myFacePolyData);
myFaceMaskPoints = vtkMaskPoints::New();
- myFaceMaskPoints->SetInput(myFaceCenters->GetOutput());
+ myFaceMaskPoints->SetInputConnection(myFaceCenters->GetOutputPort());
myFaceMaskPoints->SetOnRatio(1);
myGlyphSource = vtkGlyphSource2D::New();
myGlyphSource->SetCenter(0.5, 0.0, 0.0);
myBaseGlyph = vtkGlyph3D::New();
- myBaseGlyph->SetInput(myFaceMaskPoints->GetOutput());
+ myBaseGlyph->SetInputConnection(myFaceMaskPoints->GetOutputPort());
myBaseGlyph->SetVectorModeToUseVector();
myBaseGlyph->SetScaleModeToDataScalingOff();
myBaseGlyph->SetColorModeToColorByScalar();
- myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput());
+ if( my3dVectors )
+ myBaseGlyph->SetSourceData(myArrowPolyData);
+ else
+ myBaseGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
}
SMESH_FaceOrientationFilter::~SMESH_FaceOrientationFilter()
void SMESH_FaceOrientationFilter::Set3dVectors( bool theState )
{
my3dVectors = theState;
- myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput());
+ if( my3dVectors )
+ myBaseGlyph->SetSourceData(myArrowPolyData);
+ else
+ myBaseGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
Modified();
}
myPointsNumDataSet = vtkUnstructuredGrid::New();
myPtsMaskPoints = vtkMaskPoints::New();
- myPtsMaskPoints->SetInput(myPointsNumDataSet);
+ myPtsMaskPoints->SetInputData(myPointsNumDataSet);
myPtsMaskPoints->SetOnRatio(1);
myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New();
- myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput());
+ myPtsSelectVisiblePoints->SetInputConnection(myPtsMaskPoints->GetOutputPort());
myPtsSelectVisiblePoints->SelectInvisibleOff();
myPtsSelectVisiblePoints->SetTolerance(0.1);
myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
- myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput());
+ myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort());
myPtsLabeledDataMapper->SetLabelFormat("%d");
myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
}
aDataSet->GetPointData()->SetScalars( anArray );
- myPtsMaskPoints->SetInput( aDataSet );
+ myPtsMaskPoints->SetInputData( aDataSet );
myPointLabels->SetVisibility( GetVisibility() );
anArray->Delete();
}
this->ScalarBar = vtkPolyData::New();
this->ScalarBarMapper = vtkPolyDataMapper2D::New();
- this->ScalarBarMapper->SetInput(this->ScalarBar);
+ this->ScalarBarMapper->SetInputData(this->ScalarBar);
this->ScalarBarActor = vtkActor2D::New();
this->ScalarBarActor->SetMapper(this->ScalarBarMapper);
this->ScalarBarActor->GetPositionCoordinate()->
// Customization of the vtkScalarBarActor to show distribution histogram.
myDistribution = vtkPolyData::New();
myDistributionMapper = vtkPolyDataMapper2D::New();
- myDistributionMapper->SetInput(this->myDistribution);
+ myDistributionMapper->SetInputData(this->myDistribution);
myDistributionActor = vtkActor2D::New();
myDistributionActor->SetMapper(this->myDistributionMapper);
MESSAGE("vtkUnstructuredGrid::GetMTime: " << mtime);
return mtime;
}
-
+// OUV_PORTING_VTK6: seems to be useless
+/*
void SMDS_UnstructuredGrid::Update()
{
MESSAGE("SMDS_UnstructuredGrid::Update");
MESSAGE("SMDS_UnstructuredGrid::UpdateInformation");
return vtkUnstructuredGrid::UpdateInformation();
}
-
+*/
vtkPoints* SMDS_UnstructuredGrid::GetPoints()
{
// TODO erreur incomprehensible de la macro vtk GetPoints apparue avec la version paraview de fin aout 2010
std::vector<int>& idCellsOldToNew,
int newCellSize);
virtual unsigned long GetMTime();
- virtual void Update();
- virtual void UpdateInformation();
+ // OUV_PORTING_VTK6: seems to be useless
+ //virtual void Update();
+ //virtual void UpdateInformation();
virtual vtkPoints *GetPoints();
//#ifdef VTK_HAVE_POLYHEDRON
// Create and display actor
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput(myGrid);
+ myMapper->SetInputData(myGrid);
myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff();
// Orientation of faces
myFaceOrientationFilter = SMESH_FaceOrientationFilter::New();
- myFaceOrientationFilter->SetInput(myGrid);
+ myFaceOrientationFilter->SetInputData(myGrid);
myFaceOrientationDataMapper = vtkPolyDataMapper::New();
- myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput());
+ myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort());
myFaceOrientation = SALOME_Actor::New();
myFaceOrientation->PickableOff();
// Create and display actor
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput(myGrid);
+ myMapper->SetInputData(myGrid);
myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff();
// Orientation of faces
myFaceOrientationFilter = SMESH_FaceOrientationFilter::New();
- myFaceOrientationFilter->SetInput(myGrid);
+ myFaceOrientationFilter->SetInputData(myGrid);
myFaceOrientationDataMapper = vtkPolyDataMapper::New();
- myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput());
+ myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort());
myFaceOrientation = SALOME_Actor::New();
myFaceOrientation->PickableOff();
// Create and display actor
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput(myPlaneSource->GetOutput());
+ myMapper->SetInputData(myPlaneSource->GetOutput());
myActor = SALOME_Actor::New();
myActor->VisibilityOff();
// Create and display actor
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput( myGrid );
+ myMapper->SetInputData( myGrid );
myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff();
aCells->Delete();
// create actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
- aMapper->SetInput( aGrid );
+ aMapper->SetInputData( aGrid );
aGrid->Delete();
myPreview = SALOME_Actor::New();
myPreview->PickableOff();
aCells->Delete();
// create actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
- aMapper->SetInput( aGrid );
+ aMapper->SetInputData( aGrid );
aGrid->Delete();
myPreview = SALOME_Actor::New();
myPreview->PickableOff();
// Create and display actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
- aMapper->SetInput( myIdGrid );
+ aMapper->SetInputData( myIdGrid );
myIdActor = SALOME_Actor::New();
myIdActor->SetInfinitive(true);
myPointsNumDataSet = vtkUnstructuredGrid::New();
myPtsMaskPoints = vtkMaskPoints::New();
- myPtsMaskPoints->SetInput(myPointsNumDataSet);
+ myPtsMaskPoints->SetInputData(myPointsNumDataSet);
myPtsMaskPoints->SetOnRatio(1);
myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New();
- myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput());
+ myPtsSelectVisiblePoints->SetInputConnection(myPtsMaskPoints->GetOutputPort());
myPtsSelectVisiblePoints->SelectInvisibleOff();
myPtsSelectVisiblePoints->SetTolerance(0.1);
myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
- myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput());
+ myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort());
#if (VTK_XVERSION < 0x050200)
myPtsLabeledDataMapper->SetLabelFormat("%g");
#endif
anArray->SetValue( i, myIDs[i] );
aDataSet->GetPointData()->SetScalars( anArray );
anArray->Delete();
- myPtsMaskPoints->SetInput( aDataSet );
+ myPtsMaskPoints->SetInputData( aDataSet );
myPointLabels->SetVisibility( theIsActorVisible );
}
else {
// Create and display actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
- aMapper->SetInput( myGrid );
+ aMapper->SetInputData( myGrid );
myPreviewActor = SALOME_Actor::New();
myPreviewActor->SetInfinitive(true);
// Create and display actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
- aMapper->SetInput(aGrid);
+ aMapper->SetInputData(aGrid);
myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff();
// Create and display actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
- aMapper->SetInput(aGrid);
+ aMapper->SetInputData(aGrid);
myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff();
// Create and display actor
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput( aGrid );
+ myMapper->SetInputData( aGrid );
aGrid->Delete();
myPreviewActor = SALOME_Actor::New();