#include <vtkIdList.h>
#include <vtkFloatArray.h>
#include <vtkCell.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
// STL
#include <algorithm>
VISU_CommonCellsFilter
::SetProfileUG(vtkUnstructuredGrid *input)
{
- this->SetInput(input);
+ this->SetInputData(0, input);
}
vtkUnstructuredGrid*
VISU_CommonCellsFilter
::GetProfileUG()
{
- return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput());
+ return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(0));
}
void
VISU_CommonCellsFilter
::SetCellsUG(vtkUnstructuredGrid *input)
{
- this->vtkProcessObject::SetNthInput(1, input);
+ this->SetInputData(1, input);
}
vtkUnstructuredGrid*
VISU_CommonCellsFilter
::GetCellsUG()
{
- if (this->NumberOfInputs < 2)
- {
- return NULL;
- }
- return dynamic_cast<vtkUnstructuredGrid*>(this->Inputs[1]);
+ return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(1));
}
-void
+int
VISU_CommonCellsFilter
-::Execute()
+::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
{
VISU::TTimerLog aTimerLog(MYDEBUG,"VISU_CommonCellsFilter::Execute");
- vtkUnstructuredGrid* anInputProfileUG = this->GetProfileUG();
- vtkUnstructuredGrid* anInputCellsUG = this->GetCellsUG();
- vtkUnstructuredGrid* anOutput = this->GetOutput();
+ // get the info objects
+ vtkInformation *inInfo1 = inputVector[0]->GetInformationObject(0);
+ vtkInformation *inInfo2 = inputVector[1]->GetInformationObject(0); // OUV_PORTING: to check
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkUnstructuredGrid *anInputProfileUG = vtkUnstructuredGrid::SafeDownCast(
+ inInfo1->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *anInputCellsUG = vtkUnstructuredGrid::SafeDownCast(
+ inInfo2->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
+ // OUV_PORTING: to delete
+ //vtkUnstructuredGrid* anInputProfileUG = this->GetProfileUG();
+ //vtkUnstructuredGrid* anInputCellsUG = this->GetCellsUG();
+
+ //vtkUnstructuredGrid* anOutput = this->GetOutput();
if(anInputCellsUG == NULL){
anOutput->ShallowCopy(anInputProfileUG);
else
anOutput->ShallowCopy(anInputProfileUG);
}
+ return 1;
}
#ifndef VISU_CommonCellsFilter_HeaderFile
#define VISU_CommonCellsFilter_HeaderFile
-#include <vtkUnstructuredGridToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
-class VISU_CommonCellsFilter: public vtkUnstructuredGridToUnstructuredGridFilter
+class VISU_CommonCellsFilter: public vtkUnstructuredGridAlgorithm
{
public:
static VISU_CommonCellsFilter *New();
- vtkTypeMacro(VISU_CommonCellsFilter,vtkUnstructuredGridToUnstructuredGridFilter);
+ vtkTypeMacro(VISU_CommonCellsFilter,vtkUnstructuredGridAlgorithm);
// Description:
// Specify the Unstructured Grid which overview
VISU_CommonCellsFilter();
~VISU_CommonCellsFilter();
- void Execute(); //generate output data
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data
private:
VISU_CommonCellsFilter(const VISU_CommonCellsFilter&); // Lock copy
vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
//aWriter->SetFileType(VTK_BINARY);
aWriter->SetFileName(theFileName.c_str());
- aWriter->SetInput(theDataSet);
+ aWriter->SetInputData(theDataSet);
aWriter->Write();
aWriter->Delete();
}
vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New();
//aWriter->SetFileType(VTK_BINARY);
aWriter->SetFileName(theFileName.c_str());
- aWriter->SetInput(theDataSet);
+ aWriter->SetInputData(theDataSet);
aWriter->Write();
aWriter->Delete();
}
bool
IsDataOnPoints(vtkDataSet* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING (see the same below)
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
}
bool
IsDataOnCells(vtkDataSet* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
}
bool
IsElnoData(vtkDataSet* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update();
if ( vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData() )
if ( aDataSetAttributes->GetArray( "ELNO_FIELD" ) != NULL )
vtkIdType
GetElemVTKID(vtkDataSet *theDataSet, vtkIdType theID, int theEntity)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER")){
if(theEntity < 0){
vtkIdType
GetElemObjID(vtkDataSet *theDataSet, vtkIdType theID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER"))
return GetObjectID(aDataArray, theID);
vtkIdType
GetNodeVTKID(vtkDataSet *theDataSet, vtkIdType theID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER"))
return GetVTKID(aDataArray, theID, VISU::NODE_ENTITY);
vtkIdType
GetNodeObjID(vtkDataSet *theDataSet, vtkIdType theID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER"))
return GetObjectID(aDataArray, theID);
TGaussPointID
GetObjID(vtkDataSet *theDataSet, vtkIdType theID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER")){
if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
TInputCellID
GetInputCellID(vtkDataSet *theDataSet, vtkIdType theObjID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_INPUTS_MAPPER")){
if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
if(theProfile->myIsAll){
vtkUnstructuredGrid* aDataSet = theMeshOnEntity->GetUnstructuredGridOutput();
- anAppendFilter->AddInput(aDataSet);
+ anAppendFilter->AddInputData(aDataSet);
}else{
const VISU::TGeom2SubProfile& aGeom2SubProfile = theProfile->myGeom2SubProfile;
checkEntity);
const VISU::PUnstructuredGrid& aSource = aSubProfile->GetSource();
- anAppendFilter->AddInput(aSource.GetPointer());
+ anAppendFilter->AddInputData(aSource.GetPointer());
vtkIdType aNbCells = aSource->GetNumberOfCells();
for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){
const VISU::PPolyData& aSource = aGaussSubMesh->GetSource();
aStartID += aSource->GetNumberOfCells();
- anAppendFilter->AddInput(aSource.GetPointer());
+ anAppendFilter->AddInputData(aSource.GetPointer());
}
anAppendFilter->Update(); // Fix on VTK
- theMeshOnEntity->GetOutput()->Update();
+ //theMeshOnEntity->GetOutput()->Update(); // OUV_PORTING
vtkDataSet* aSource = anAppendFilter->GetOutput();
INITMSGA(MYDEBUG,0,"aNbPoints - "<<aSource->GetNumberOfPoints()<<endl);
void
PrintMemorySize(vtkUnstructuredGrid* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
BEGMSG(1,"GetPoints() = "<<double(theDataSet->GetPoints()->GetActualMemorySize()*1000)<<endl);
BEGMSG(1,"GetCells() = "<<double(theDataSet->GetCells()->GetActualMemorySize()*1000)<<endl);
BEGMSG(1,"GetCellTypesArray() = "<<double(theDataSet->GetCellTypesArray()->GetActualMemorySize()*1000)<<endl);
const VISU::PUnstructuredGrid& aSource = aSubMesh->GetSource();
GetCellsOnSubMesh(aSource, aMeshOnEntity, aSubMesh, aVGeom);
- anAppendFilter->AddInput(aSource.GetPointer());
+ anAppendFilter->AddInputData(aSource.GetPointer());
vtkIdType aNbCells = aSource->GetNumberOfCells();
for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){
VISU::PIDMapper anIDMapper = GetFamilyOnEntity(theMeshName,anEntity,aFamilyName);
vtkDataSet* anOutput = anIDMapper->GetOutput();
- anAppendFilter->AddInput(anOutput);
+ anAppendFilter->AddInputData(anOutput);
vtkIdType aStartID = anElemObj2VTKID.size();
vtkIdType aNbCells = anOutput->GetNumberOfCells();
}
if(MYVTKDEBUG){
GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
if(theEntity == VISU::NODE_ENTITY)
BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
else
}
if(MYVTKDEBUG){
GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
if(theEntity == VISU::NODE_ENTITY)
BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
else
#ifndef VISU_ExtractUnstructuredGrid_HeaderFile
#define VISU_ExtractUnstructuredGrid_HeaderFile
-#include <vtkUnstructuredGridToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
#include <set>
-class VISU_ExtractUnstructuredGrid : public vtkUnstructuredGridToUnstructuredGridFilter{
+class VISU_ExtractUnstructuredGrid : public vtkUnstructuredGridAlgorithm{
public:
- vtkTypeMacro(VISU_ExtractUnstructuredGrid,vtkUnstructuredGridToUnstructuredGridFilter);
+ vtkTypeMacro(VISU_ExtractUnstructuredGrid,vtkUnstructuredGridAlgorithm);
// Description:
// Construct with all types of clipping turned off.
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetGeometry(vtkDataSet *input)
{
- this->Superclass::SetInput(input);
+ this->Superclass::SetInputData(input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetScalars(vtkDataSet *input)
{
- this->SetInput(1, input);
+ this->SetInputData(1, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetVectors(vtkDataSet *input)
{
- this->SetInput(2, input);
+ this->SetInputData(2, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetNormals(vtkDataSet *input)
{
- this->SetInput(3, input);
+ this->SetInputData(3, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetTCoords(vtkDataSet *input)
{
- this->SetInput(4, input);
+ this->SetInputData(4, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetTensors(vtkDataSet *input)
{
- this->SetInput(5, input);
+ this->SetInputData(5, input);
}
//------------------------------------------------------------------------------
#include "MED_Vector.hxx"
#include "VTKViewer.h"
+#include <vtkType.h>
+
#include <string>
#include <map>
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetGeometry(vtkDataSet *input)
{
- this->Superclass::SetInput(input);
+ this->Superclass::SetInputData(input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetScalars(vtkDataSet *input)
{
- this->SetInput(1, input);
+ this->SetInputData(1, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetVectors(vtkDataSet *input)
{
- this->SetInput(2, input);
+ this->SetInputData(2, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetNormals(vtkDataSet *input)
{
- this->SetInput(3, input);
+ this->SetInputData(3, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetTCoords(vtkDataSet *input)
{
- this->SetInput(4, input);
+ this->SetInputData(4, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetTensors(vtkDataSet *input)
{
- this->SetInput(5, input);
+ this->SetInputData(5, input);
}
//------------------------------------------------------------------------------
#include <vtkIdList.h>
#include <vtkCell.h>
+#include <vtkVersion.h>
#include <algorithm>
#include <vector>
::GetMemorySize()
{
if(vtkDataSet* anOutput = GetPolyDataOutput()){
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
if(myIsDone){
::GetMemorySize()
{
if(vtkDataSet* anOutput = GetUnstructuredGridOutput()){
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
if(myIsDone){
{
if(myIsVTKDone){
if(vtkDataSet* anOutput = GetOutput()){
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
}
aScalars->Delete();
vtkStructuredGridGeometryFilter* aFilter = vtkStructuredGridGeometryFilter::New();
- aFilter->SetInput( aStructuredGrid );
+ aFilter->SetInputData( aStructuredGrid );
aFilter->Update();
myOutput->ShallowCopy( aFilter->GetOutput() );
aFilter->Delete();
#include <vtkCellData.h>
#include <vtkCell.h>
#include <vtkIdList.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
#include <map>
{
}
-void VISU_UsedPointsFilter::Execute(){
- vtkDataSet *anInput = this->GetInput();
- vtkUnstructuredGrid *anOutput = this->GetOutput();
+
+int VISU_UsedPointsFilter::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
+{
+ // get the info objects
+ vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkDataSet *anInput = vtkDataSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
typedef std::map<vtkIdType, vtkIdType> TId2IdMap;
TId2IdMap aId2IdMap;
anOldPointsIds->Delete();
aNewPointsIds->Delete();
anOutput->Squeeze();
+ return 1;
}
#ifndef VISU_UsedPointsFilter_HeaderFile
#define VISU_UsedPointsFilter_HeaderFile
-#include <vtkDataSetToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
#include "VISUConvertor.hxx"
-class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkDataSetToUnstructuredGridFilter
+//class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkDataSetToUnstructuredGridFilter
+class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkUnstructuredGridAlgorithm // OUV_PORTING: to check
{
public:
- vtkTypeMacro(VISU_UsedPointsFilter,vtkDataSetToUnstructuredGridFilter);
+ vtkTypeMacro(VISU_UsedPointsFilter,vtkUnstructuredGridAlgorithm);
static VISU_UsedPointsFilter *New();
protected:
VISU_UsedPointsFilter();
~VISU_UsedPointsFilter();
- virtual void Execute();
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
};
#endif
myShrinkFilter->SetStoreMapping(true);
myAnnotationMapper->Delete();
- myAnnotationActor->SetMapper(myAnnotationMapper.GetPointer());
+ myAnnotationActor->vtkActor2D::SetMapper(myAnnotationMapper.GetPointer()); // OUV_PORTING: to check
myAnnotationActor->Delete();
myAnnotationActor->SetVisibility(0);
myValLblDataSet = vtkUnstructuredGrid::New();
myValCellCenters = VTKViewer_CellCenters::New();
- myValCellCenters->SetInput(myValLblDataSet);
+ myValCellCenters->SetInputData(myValLblDataSet);
myValUsedPoints = VISU_UsedPointsFilter::New();
- myValUsedPoints->SetInput(myValLblDataSet);
+ myValUsedPoints->SetInputData(myValLblDataSet);
myValMaskPoints = vtkMaskPoints::New();
- myValMaskPoints->SetInput(myValCellCenters->GetOutput());
+ myValMaskPoints->SetInputConnection(myValCellCenters->GetOutputPort());
myValMaskPoints->SetOnRatio(1);
myValSelectVisiblePoints = VISU_SelectVisiblePoints::New();
- myValSelectVisiblePoints->SetInput(myValMaskPoints->GetOutput());
+ myValSelectVisiblePoints->SetInputConnection(myValMaskPoints->GetOutputPort());
myValSelectVisiblePoints->SelectInvisibleOff();
myValSelectVisiblePoints->SetTolerance(0.1);
}
myValLabeledDataMapper = vtkLabeledDataMapper::New();
- myValLabeledDataMapper->SetInput(myValSelectVisiblePoints->GetOutput());
+ myValLabeledDataMapper->SetInputConnection(myValSelectVisiblePoints->GetOutputPort());
//myValLabeledDataMapper->SetLabelFormat("%g");
//myValLabeledDataMapper->SetLabelFormat("%.20g");
myValLabeledDataMapper->SetLabelFormat(aFormat);
{
if(!myIsShrinkable)
return;
- if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
- myShrinkFilter->SetInput(aDataSet);
- myPassFilter[1]->SetInput(myShrinkFilter->GetOutput());
+ if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+ myShrinkFilter->SetInputConnection(aDataSet);
+ myPassFilter[1]->SetInputConnection(myShrinkFilter->GetOutputPort());
myIsShrunk = true;
}
}
{
if(!myIsShrunk)
return;
- if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
- myPassFilter[1]->SetInput(aDataSet);
+ if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+ myPassFilter[1]->SetInputConnection(aDataSet);
myPassFilter[1]->Modified();
myIsShrunk = false;
Modified();
if ( !myIsFeatureEdgesAllowed || myIsFeatureEdgesEnabled == theIsFeatureEdgesEnabled )
return;
- if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
+ //if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
+ if ( vtkAlgorithmOutput* aPolyData = myPassFilter[ 2 ]->GetOutputPort() ) // OUV_PORTING: to check
{
if( theIsFeatureEdgesEnabled )
{
- myFeatureEdges->SetInput( aPolyData );
- myPassFilter[ 3 ]->SetInput( myFeatureEdges->GetOutput() );
+ myFeatureEdges->SetInputConnection( aPolyData );
+ myPassFilter[ 3 ]->SetInputConnection( myFeatureEdges->GetOutputPort() );
myIsFeatureEdgesEnabled = true;
}
else
{
- myPassFilter[3]->SetInput( aPolyData );
+ myPassFilter[3]->SetInputConnection( aPolyData );
myPassFilter[3]->Modified();
myIsFeatureEdgesEnabled = false;
Modified();
if ( isOnCell )
{
- myValCellCenters->SetInput( aDataSet );
- myValMaskPoints->SetInput( myValCellCenters->GetOutput() );
+ myValCellCenters->SetInputData( aDataSet );
+ myValMaskPoints->SetInputConnection( myValCellCenters->GetOutputPort() );
}
else if ( isOnPnt )
{
- myValUsedPoints->SetInput( aDataSet );
- myValMaskPoints->SetInput( myValUsedPoints->GetOutput() );
+ myValUsedPoints->SetInputData( aDataSet );
+ myValMaskPoints->SetInputConnection( myValUsedPoints->GetOutputPort() );
}
myValLabels->SetVisibility( GetVisibility() );
{
if(!myIsShrinkable)
return;
- if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
- myShrinkFilter->SetInput(aDataSet);
- myPassFilter[1]->SetInput(myShrinkFilter->GetOutput());
+ if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+ myShrinkFilter->SetInputConnection(aDataSet);
+ myPassFilter[1]->SetInputConnection(myShrinkFilter->GetOutputPort());
myIsShrunk = true;
}
}
{
if(!myIsShrunk)
return;
- if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
- myPassFilter[1]->SetInput(aDataSet);
+ if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+ myPassFilter[1]->SetInputConnection(aDataSet);
myPassFilter[1]->Modified();
myIsShrunk = false;
Modified();
::SetMapperInput(vtkDataSet* theDataSet)
{
if (theDataSet->IsA("vtkPolyData")) {
- myPolyDataExtractor->SetInput(theDataSet);
- myMapper->SetInput(myPolyDataExtractor->GetOutput());
+ myPolyDataExtractor->SetInputData(theDataSet);
+ myMapper->SetInputConnection(myPolyDataExtractor->GetOutputPort());
} else {
- myExtractor->SetInput(theDataSet);
- myMapper->SetInput(myExtractor->GetOutput());
+ myExtractor->SetInputData(theDataSet);
+ myMapper->SetInputConnection(myExtractor->GetOutputPort());
}
- // myMapper->SetInput(theDataSet);
+ // myMapper->SetInputData(theDataSet);
SetMapper(myMapper.GetPointer());
}
// myPolyDataExtractor->SetInput(myCurrentPL->GetPickableDataSet());
//myMapper->SetInput(myPolyDataExtractor->GetOutput());
- myMapper->SetInput(myCurrentPL->GetPickableDataSet());
+ myMapper->SetInputData(myCurrentPL->GetPickableDataSet());
SetMapper(myMapper.GetPointer());
}
{
if(vtkMapper* aMapper = myDeviceActor->GetMapper()){
if(vtkDataSet* aDataSet= aMapper->GetInput()){
- aDataSet->Update();
+ aMapper->Update();
myIsInfinite = aDataSet->GetNumberOfCells() < 2;
}
}
if(Superclass::GetPickable()){
if(vtkMapper* aMapper = GetMapper()){
if(vtkDataSet* aDataSet= aMapper->GetInput()){
- aDataSet->Update();
+ aMapper->Update();
return aDataSet->GetNumberOfCells() > 0;
}
}
// warp
myWarpVector->SetScaleFactor(myGaussPointsPL->GetScale());
- myCellDataToPointData->SetInput(aCellsToWarp);
+ myCellDataToPointData->SetInputData(aCellsToWarp);
myCellDataToPointData->PassCellDataOn();
aCellsToWarp->Delete();
- myWarpVector->SetInput(myCellDataToPointData->GetUnstructuredGridOutput());
+ //myWarpVector->SetInput(myCellDataToPointData->GetUnstructuredGridOutput());
+ myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
vtkUnstructuredGrid* aWarpedDataSet = myWarpVector->GetUnstructuredGridOutput();
- aWarpedDataSet->Update();
+ myWarpVector->Update();
myCellSource->SetPoints(aWarpedDataSet->GetPoints());
}
else
int anId = 0;
if (myPolyDataExtractor) {
- myPolyDataExtractor->SetInput(aDataSet);
- myPassFilter[ anId ]->SetInput( myPolyDataExtractor->GetOutput() );
+ myPolyDataExtractor->SetInputData(aDataSet);
+ myPassFilter[ anId ]->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
} else {
- myPassFilter[ anId ]->SetInput( aDataSet );
+ myPassFilter[ anId ]->SetInputData( aDataSet );
}
- myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++;
- myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ //myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
anId++;
- myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
+ myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
- myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ //myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
Superclass::SetMapper( theMapper );
}
if(Superclass::GetPickable()){
if(vtkMapper* aMapper = GetMapper()){
if(vtkDataSet* aDataSet= aMapper->GetInput()){
- aDataSet->Update();
+ aMapper->Update();
return aDataSet->GetNumberOfCells() > 0;
}
}
myAppendFilter->Delete();
myMapper->Delete();
- myMapper->SetInput(myAppendFilter->GetOutput());
+ myMapper->SetInputConnection(myAppendFilter->GetOutputPort());
for(int i = 0; i < myNbCones; i++){
vtkConeSource* aConeSource = vtkConeSource::New();
- myAppendFilter->AddInput(aConeSource->GetOutput());
+ myAppendFilter->AddInputConnection(aConeSource->GetOutputPort());
aConeSource->SetResolution(4);
mySources[i] = aConeSource;
aConeSource->Delete();
// myMaskPoints->SetOnRatio(100);
myMaskPoints = VISU_LabelPointsFilter::New();
- myMaskPoints->SetInput(myLabelsDataSet);
+ myMaskPoints->SetInputData(myLabelsDataSet);
myLabeledDataMapper = vtkLabeledDataMapper::New();
- myLabeledDataMapper->SetInput(myMaskPoints->GetOutput());
+ myLabeledDataMapper->SetInputConnection(myMaskPoints->GetOutputPort());
//myLabeledDataMapper->SetLabelFormat("%e");
myLabeledDataMapper->SetLabelModeToLabelScalars();
#include "VISU_DataSetActor.h"
#include "SVTK_DeviceActor.h"
+#include <vtkVersion.h>
class VISU_OBJECT_EXPORT VISU_MeshAct : public VISU_DataSetActor
{
void
SetInput(vtkDataSet* theDataSet)
{
- myGeomFilter->SetInput( theDataSet );
+ myGeomFilter->SetInputData( theDataSet );
}
myGeomFilter->SetInside(true);
VISU_OpenGLPointSpriteMapper* aMapper = VISU_OpenGLPointSpriteMapper::New();
- aMapper->SetInput( myGeomFilter->GetOutput() );
+ aMapper->SetInputConnection( myGeomFilter->GetOutputPort() );
std::string aRootDir( getenv( "VISU_ROOT_DIR") );
std::string aMainTexture = aRootDir + "/share/salome/resources/visu/sprite_texture.bmp";
#include "VISU_DataSetActor.h"
#include "SVTK_DeviceActor.h"
+#include <vtkVersion.h>
+
namespace VTK
{
const MarkerType MT_POINT_SPRITE = MT_USER + 1;
::SetMapper(vtkMapper* theMapper)
{
if(theMapper){
- myPassFilter[0]->SetInput(theMapper->GetInput());
+ myPassFilter[0]->SetInputData(theMapper->GetInput());
- myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput());
+ //myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput());
+ myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort()); // OUV_PORTING: to check
- myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput());
+ //myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput());
+ myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort()); // OUV_PORTING: to check
- myPassFilter[3]->SetInput(myPassFilter[2]->GetPolyDataOutput());
+ //myPassFilter[3]->SetInput(myPassFilter[2]->GetPolyDataOutput());
+ myPassFilter[3]->SetInputConnection(myPassFilter[2]->GetOutputPort()); // OUV_PORTING: to check
+ // OUV_PORTING: to check
+ /*
if(vtkDataSetMapper* aMapper = dynamic_cast<vtkDataSetMapper*>(theMapper))
aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput());
else if(vtkPolyDataMapper* aMapper = dynamic_cast<vtkPolyDataMapper*>(theMapper))
aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput());
+ */
+ theMapper->SetInputConnection(myPassFilter[3]->GetOutputPort());
}
vtkLODActor::SetMapper(theMapper);
AM_CPPFLAGS+=$(libVisuPipeLine_la_CPPFLAGS)
LDADD=$(libVisuPipeLine_la_LDFLAGS) libVisuPipeLine.la \
- -lOpUtil -lMEDWrapper -lMEDWrapper_V2_2 -lMEDWrapper_V2_1 -lMEDWrapperBase -lsuit -lqtx -lSALOMEBasics -lvtkWidgets
+ -lOpUtil -lMEDWrapper -lMEDWrapper_V2_2 -lMEDWrapper_V2_1 -lMEDWrapperBase -lsuit -lqtx -lSALOMEBasics
aTimeStamp);
VTKViewer_GeometryFilter* aGeometryFilter = VTKViewer_GeometryFilter::New();
- aGeometryFilter->SetInput(aPresent->GetOutput());
+ aGeometryFilter->SetInputData(aPresent->GetOutput());
aGeometryFilter->SetInside(true);
vtkMaskPoints* aMaskPoints = vtkMaskPoints::New();
- aMaskPoints->SetInput(aGeometryFilter->GetOutput());
+ aMaskPoints->SetInputConnection(aGeometryFilter->GetOutputPort());
aMaskPoints->SetGenerateVertices(true);
aMaskPoints->SetOnRatio(1);
aMapper->SetColorModeToMapScalars();
aMapper->SetScalarVisibility(true);
- aMapper->SetInput(aMaskPoints->GetOutput());
+ aMapper->SetInputConnection(aMaskPoints->GetOutputPort());
aGeometryFilter->Delete();
anActor->SetMapper(aMapper);
{
if ( theUseScalarFilter ) {
// Include threshold filter between the transform and the pass filters.
- myPassFilter->SetInput( myThreshold->GetOutput() );
+ myPassFilter->SetInputConnection( myThreshold->GetOutputPort() );
} else {
// Exclude threshold filter before the pass filter.
- myPassFilter->SetInput( myFieldTransform->GetOutput() );
+ myPassFilter->SetInputConnection( myFieldTransform->GetOutputPort() );
}
}
VISU_ColoredPL
::Build()
{
- myExtractor->SetInput( Superclass::GetClippedInput() );
- myFieldTransform->SetInput(myExtractor->GetOutput());
+ myExtractor->SetInputData( Superclass::GetClippedInput() );
+ myFieldTransform->SetInputConnection(myExtractor->GetOutputPort());
- myThreshold->SetInput( myFieldTransform->GetOutput() );
+ myThreshold->SetInputConnection( myFieldTransform->GetOutputPort() );
// The pass filter is used here for possibility to include/exclude
// threshold filter before it.
- myPassFilter->SetInput( myFieldTransform->GetOutput() );
+ myPassFilter->SetInputConnection( myFieldTransform->GetOutputPort() );
GetMapperHolder()->SetLookupTable(GetMapperTable());
//GetMapper()->InterpolateScalarsBeforeMappingOn();
myDisplacement[0]);
//Build lines
vtkDataSet *aDataSet = anAppendPolyData->GetOutput();
- aDataSet->Update();
+ anAppendPolyData->Update();
if(aDataSet->GetNumberOfCells() == 0)
aDataSet = GetMergedInput();
double theOrig[3])
{
vtkEDFCutter *aCutPlane = vtkEDFCutter::New();
- aCutPlane->SetInput(theDataSet);
+ aCutPlane->SetInputData(theDataSet);
vtkPlane *aPlane = vtkPlane::New();
aPlane->SetOrigin(theOrig);
aPlane->SetNormal(theDir);
aCutPlane->SetCutFunction(aPlane);
aPlane->Delete();
- theAppendPolyData->AddInput(aCutPlane->GetOutput());
+ theAppendPolyData->AddInputConnection(aCutPlane->GetOutputPort());
aCutPlane->Delete();
}
CutWithPlane(theAppendPolyData,theDataSet,theDir,aOrig);
}
vtkPolyData *aPolyData = theAppendPolyData->GetOutput();
- aPolyData->Update();
theAppendPolyData->Update();
}
VISU_CutPlanesPL::CutWithPlane(anAppendPolyData, GetMergedInput(), aVector1, myPoint1);
vtkDataSet *aDataSet = anAppendPolyData->GetOutput();
- aDataSet->Update();
+ anAppendPolyData->Update();
VISU_CutPlanesPL::CutWithPlane(myAppendPolyData, aDataSet, aVector2, myPoint1);
myAppendPolyData->Update();
VISU_DataSetMapperHolder
::SetUnstructuredGridIDMapper(const VISU::PUnstructuredGridIDMapper& theIDMapper)
{
- myElnoDisassembleFilter->SetInput( theIDMapper->GetUnstructuredGridOutput() );
- myExtractGeometry->SetInput( myElnoDisassembleFilter->GetOutput() );
+ myElnoDisassembleFilter->SetInputData( theIDMapper->GetUnstructuredGridOutput() );
+ myExtractGeometry->SetInputConnection( myElnoDisassembleFilter->GetOutputPort() );
myUnstructuredGridIDMapper = theIDMapper;
SetIDMapper( theIDMapper );
}
myCellDataToPointData = VISU_CellDataToPointData::New();
myCellDataToPointData->PassCellDataOn();
- myInputPassFilter->SetInput(vtkUnstructuredGrid::New());
+ myInputPassFilter->SetInputData(vtkUnstructuredGrid::New());
- myCellDataToPointData->SetInput(myInputPassFilter->GetOutput());
+ myCellDataToPointData->SetInputConnection(myInputPassFilter->GetOutputPort());
- myWarpVector->SetInput(myCellDataToPointData->GetOutput());
+ myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort());
- myOutputPassFiler->SetInput(myWarpVector->GetOutput());
+ myOutputPassFiler->SetInputConnection(myWarpVector->GetOutputPort());
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
void VISU_DeformationPL::SetWarpVectorInput(vtkDataSet *theInput)
{
- myInputPassFilter->SetInput(theInput);
+ myInputPassFilter->SetInputData(theInput);
}
//----------------------------------------------------------------------------
{
Superclass::Build();
- myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
- GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
+ //myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
+ myWarpScalar->SetInputConnection( GetFieldTransformFilter()->GetOutputPort() ); // OUV_PORTING: to check
+ //GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
+ GetPolyDataMapper()->SetInputConnection( myWarpScalar->GetOutputPort() ); // OUV_PORTING: to check
}
VISU_DeformedGridPL
::Update()
{
- vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
+ //vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
+ vtkAlgorithmOutput* aPointSet = GetFieldTransformFilter()->GetOutputPort(); // OUV_PORTING: to check
if ( !myIsContour ) // surface prs
{
- myWarpScalar->SetInput( aPointSet );
+ myWarpScalar->SetInputConnection( aPointSet );
}
else // contour prs
{
- myContourFilter->SetInput( aPointSet );
+ myContourFilter->SetInputConnection( aPointSet );
double aScalarRange[2];
GetSourceRange( aScalarRange );
myContourFilter->GenerateValues( GetNumberOfContours(), aScalarRange );
- myWarpScalar->SetInput( myContourFilter->GetOutput() );
+ myWarpScalar->SetInputConnection( myContourFilter->GetOutputPort() );
}
Superclass::Update();
UpdateScalars();
- myScalarsFieldTransform->SetInput(myScalarsExtractor->GetOutput());
+ myScalarsFieldTransform->SetInputConnection(myScalarsExtractor->GetOutputPort());
// Sets geometry for merge filter
myScalarsMergeFilter->SetGeometry(myWarpVector->GetUnstructuredGridOutput());
::UpdateScalars()
{
vtkDataSet* aScalars = GetScalars();
- myScalarsElnoDisassembleFilter->SetInput(aScalars);
- myExtractGeometry->SetInput(myScalarsElnoDisassembleFilter->GetOutput());
- myScalarsExtractor->SetInput(myExtractGeometry->GetOutput());
+ myScalarsElnoDisassembleFilter->SetInputData(aScalars);
+ myExtractGeometry->SetInputConnection(myScalarsElnoDisassembleFilter->GetOutputPort());
+ myScalarsExtractor->SetInputConnection(myExtractGeometry->GetOutputPort());
if(VISU::IsDataOnCells(myScalarsElnoDisassembleFilter->GetOutput()))
GetMapper()->SetScalarModeToUseCellData();
if(!theDataSet)
return 0.0;
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
int aNbCells = theDataSet->GetNumberOfCells();
int aNbPoints = theDataSet->GetNumberOfPoints();
vtkDataArray* aFieldArrayMOD = theInputData->GetArray("VISU_FIELD_GAUSS_MOD");
if (aFieldArrayMOD) {
switch (anInputDataType) {
- vtkTemplateMacro4(Module2ScalarsMOD,
+ vtkTemplateMacro(Module2ScalarsMOD(
aFieldArrayMOD,
(VTK_TT *)(anOutputPtr),
theNbOfTuples,
- theGaussMetric);
+ theGaussMetric));
default:
break;
}
}
else {
switch (anInputDataType) {
- vtkTemplateMacro3(Module2Scalars,
+ vtkTemplateMacro(Module2Scalars(
aFieldArray,
(VTK_TT *)(anOutputPtr),
- theNbOfTuples);
+ theNbOfTuples));
default:
break;
}
}
} else {
switch (anInputDataType) {
- vtkTemplateMacro5(Component2Scalars,
+ vtkTemplateMacro(Component2Scalars(
aFieldArray,
(VTK_TT *)(anInputPtr),
(VTK_TT *)(anOutputPtr),
theNbOfTuples,
- theScalarMode - 1);
+ theScalarMode - 1));
default:
break;
}
int aDecimals = std::abs( aResourceMgr->integerValue("VISU", "visual_data_precision", 6) );
switch(aDataType) {
- vtkTemplateMacro3(CutScalarsTempl,
+ vtkTemplateMacro(CutScalarsTempl(
(VTK_TT *)(aPtr),
theNbOfTuples,
- aDecimals);
+ aDecimals));
default:
break;
}
if(theFunction == &(VISU_FieldTransform::Ident)){
switch(anInputDataType){
- vtkTemplateMacro4(LinearTransformVectors,
+ vtkTemplateMacro(LinearTransformVectors(
(VTK_TT *)(anInputPtr),
(VTK_TT *)(anOutputPtr),
theNbOfTuples,
- aScale);
+ aScale));
default:
break;
}
}else{
switch(anInputDataType){
- vtkTemplateMacro9(NonLinearTransformVectors,
+ vtkTemplateMacro(NonLinearTransformVectors(
anInputVectors,
(VTK_TT *)(anInputPtr),
(VTK_TT *)(anOutputPtr),
theFunction,
aScalarRange[0],
aScalarDelta,
- theScalarRange[1]);
+ theScalarRange[1]));
default:
break;
}
void *anOutputPtr = anOutputScalars->GetVoidPointer(0);
switch(anInputDataType){
- vtkTemplateMacro6(NonLinearTransformScalars,
+ vtkTemplateMacro(NonLinearTransformScalars(
anInputScalars,
(VTK_TT *)(anInputPtr),
(VTK_TT *)(anOutputPtr),
theNbOfTuples,
theFunction,
- aScalarRange[0]);
+ aScalarRange[0]));
default:
break;
}
mySphereSource = vtkSphereSource::New();
mySphereSource->SetThetaResolution( 8 );
mySphereSource->SetPhiResolution( 8 );
- myGlyph->SetSource( mySphereSource->GetOutput() );
+ myGlyph->SetSourceConnection( mySphereSource->GetOutputPort() );
for(int i = 0; i < 3; i++)
myPassFilter.push_back(vtkPassThroughFilter::New());
myMergeFilter->SetGaussPtsIDMapper(GetGaussPtsIDMapper());
- myPassFilter[0]->SetInput(InsertCustomPL());
+ myPassFilter[0]->SetInputData(InsertCustomPL());
- myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput());
+ myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
// Geometrical Sphere
- myPassFilter[2]->SetInput(myPassFilter[1]->GetOutput());
+ myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
- GetPointSpriteMapper()->SetInput( myPassFilter[2]->GetPolyDataOutput() );
+ //GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetPolyDataOutput() );
+ GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetOutputPort() ); // OUV_PORTING: to check
// Update according the current state
SetIsDeformed(GetIsDeformed());
{
if(IsExternalGeometryUsed() || GetNumberOfGeometry() > 1 ){
myMergeFilter->Update();
- myPassFilter[0]->SetInput(myMergeFilter->GetOutput());
+ myPassFilter[0]->SetInputConnection(myMergeFilter->GetOutputPort());
}
else{
- myPassFilter[0]->SetInput(GetFieldTransformFilter()->GetOutput());
+ myPassFilter[0]->SetInputConnection(GetFieldTransformFilter()->GetOutputPort());
}
SetAverageCellSize( VISU_DeformedShapePL::GetScaleFactor( GetParentMesh() ) );
VISU_GaussPointsPL
::SetIsDeformed( bool theIsDeformed )
{
- if(theIsDeformed){
- myWarpVector->SetInput( myPassFilter[0]->GetPolyDataOutput() );
- myPassFilter[1]->SetInput(myWarpVector->GetOutput());
+ if(theIsDeformed){
+ //myWarpVector->SetInput( myPassFilter[0]->GetPolyDataOutput() );
+ myWarpVector->SetInputConnection( myPassFilter[0]->GetOutputPort() ); // OUV_PORTING: to check
+ myPassFilter[1]->SetInputConnection(myWarpVector->GetOutputPort());
}else
- myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput());
+ myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
}
//----------------------------------------------------------------------------
{
if( thePrimitiveType == VISU_OpenGLPointSpriteMapper::GeomSphere )
{
- myGlyph->SetInput( myPassFilter[1]->GetOutput() );
- myPassFilter[2]->SetInput(myGlyph->GetOutput());
+ myGlyph->SetInputConnection( myPassFilter[1]->GetOutputPort() );
+ myPassFilter[2]->SetInputConnection(myGlyph->GetOutputPort());
}
else
- myPassFilter[2]->SetInput(myPassFilter[1]->GetOutput());
+ myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
GetPointSpriteMapper()->SetPrimitiveType( thePrimitiveType );
int aNbCompositeComponents = 4;
aCompositeImageData->SetDimensions(aMainImageSize);
- aCompositeImageData->SetScalarTypeToUnsignedChar();
- aCompositeImageData->SetNumberOfScalarComponents(aNbCompositeComponents);
- aCompositeImageData->AllocateScalars();
+ aCompositeImageData->AllocateScalars( VTK_UNSIGNED_CHAR, aNbCompositeComponents );
unsigned char* aMainDataPtr = (unsigned char*)aMainImageData->GetScalarPointer();
unsigned char* anAlphaDataPtr = (unsigned char*)anAlphaImageData->GetScalarPointer();
}
aMainReader->Delete();
anAlphaReader->Delete();
- aCompositeImageData->Update();
+ //aCompositeImageData->Update(); // OUV_PORTING
return aCompositeImageData;
}
{
if(IsExternalGeometryUsed()){
ClearGeometry();
- myAppendFilter->AddInput(GetFieldTransformFilter()->GetOutput());
+ myAppendFilter->AddInputConnection(GetFieldTransformFilter()->GetOutputPort());
}
}
if(!IsExternalGeometryUsed())
ClearGeometry();
AddGeometryName(theGeomName);
- myAppendFilter->AddInput(theGeometry);
+ myAppendFilter->AddInputData(theGeometry);
return GetNumberOfGeometry();
}
#include <vtkCellData.h>
#include <vtkPoints.h>
#include <vtkIdList.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
vtkStandardNewMacro(VISU_MaskPointsFilter);
VISU_MaskPointsFilter::~VISU_MaskPointsFilter(){}
-void VISU_MaskPointsFilter::Execute(){
- vtkPointSet *anInput = this->GetInput(), *anOutput = this->GetOutput();
+int VISU_MaskPointsFilter::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
+{
+ // get the info objects
+ vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkPointSet *anInput = vtkPointSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkPointSet *anOutput = vtkPointSet::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
anOutput->GetPointData()->CopyAllOff();
anOutput->GetCellData()->CopyAllOff();
anOutput->CopyStructure(anInput);
anOutput->SetPoints(aNewPoints);
aNewPoints->Delete();
aPoints->Delete();
+ return 1;
}
#ifndef VISU_MaskPointsFilter_HeaderFile
#define VISU_MaskPointsFilter_HeaderFile
-#include <vtkPointSetToPointSetFilter.h>
+#include <vtkPointSetAlgorithm.h>
-class VISU_MaskPointsFilter : public vtkPointSetToPointSetFilter{
+class VISU_MaskPointsFilter : public vtkPointSetAlgorithm{
protected:
VISU_MaskPointsFilter();
VISU_MaskPointsFilter(const VISU_MaskPointsFilter&);
- virtual void Execute();
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
float PercentsOfUsedPoints;
public:
- vtkTypeMacro(VISU_MaskPointsFilter,vtkPointSetToPointSetFilter);
+ vtkTypeMacro(VISU_MaskPointsFilter,vtkPointSetAlgorithm);
static VISU_MaskPointsFilter* New();
virtual ~VISU_MaskPointsFilter();
VISU_MeshPL
::Build()
{
- GetDataSetMapper()->SetInput(GetClippedInput());
+ GetDataSetMapper()->SetInputData(GetClippedInput());
}
else
{
this->InvokeEvent(vtkCommand::StartEvent,NULL);
- input->Update();
+ //input->Update(); // OUV_PORTING: to check
+ this->Update();
this->InvokeEvent(vtkCommand::EndEvent,NULL);
numPts = input->GetNumberOfPoints();
//----------------------------------------------------------------------------
void VISU_OptionalDeformationPL::OnDeformation(){
- myCellDataToPointData->SetInput(myInputPassFilter->GetOutput());
- myWarpVector->SetInput(myCellDataToPointData->GetOutput());
- myOutputPassFiler->SetInput(myWarpVector->GetOutput());
+ myCellDataToPointData->SetInputConnection(myInputPassFilter->GetOutputPort());
+ myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort());
+ myOutputPassFiler->SetInputConnection(myWarpVector->GetOutputPort());
}
//----------------------------------------------------------------------------
void VISU_OptionalDeformationPL::OffDeformation(){
- myOutputPassFiler->SetInput(myInputPassFilter->GetOutput());
+ myOutputPassFiler->SetInputConnection(myInputPassFilter->GetOutputPort());
}
{
if(VISU::IsDataOnCells(theDataSet)){
- theCellDataToPointData->SetInput(theDataSet);
+ theCellDataToPointData->SetInputData(theDataSet);
theCellDataToPointData->PassCellDataOn();
- theOutputFilter->SetInput(theCellDataToPointData->GetUnstructuredGridOutput());
+ //theOutputFilter->SetInput(theCellDataToPointData->GetUnstructuredGridOutput());
+ theOutputFilter->SetInputConnection(theCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
}else
- theOutputFilter->SetInput(theDataSet);
+ theOutputFilter->SetInputData(theDataSet);
}
//----------------------------------------------------------------------------
myPlane2->SetOrigin(0,0,myDistance);
//
myImplicitFunction = vtkImplicitBoolean::New();
- myImplicitFunction->SetOperationType(VTK_UNION);
+ myImplicitFunction->SetOperationTypeToUnion();
//
myBox = vtkImageData::New();
myBox->SetDimensions(2,2,2);
myOutline = vtkOutlineFilter::New();
- myOutline->SetInput(myBox);
+ myOutline->SetInputData(myBox);
myOutlineMapper = vtkPolyDataMapper::New();
- myOutlineMapper->SetInput(myOutline->GetOutput());
+ myOutlineMapper->SetInputConnection(myOutline->GetOutputPort());
myOutlineActor = vtkActor::New();
this->myOutlineActor->SetMapper(this->myOutlineMapper);
this->myOutlineActor->PickableOff();
this->OutlineTranslation = 0;
this->myCutter1 = vtkEDFCutter::New();
- this->myCutter1->SetInput(myBox);
+ this->myCutter1->SetInputData(myBox);
this->myCutter1->SetCutFunction(myPlane1);
this->myCutMapper1 = vtkPolyDataMapper::New();
- this->myCutMapper1->SetInput(this->myCutter1->GetOutput());
+ this->myCutMapper1->SetInputConnection(this->myCutter1->GetOutputPort());
this->myCutActor1 = vtkActor::New();
this->myCutActor1->SetMapper(this->myCutMapper1);
this->myDrawPlane = 1;
this->myEdges1 = vtkFeatureEdges::New();
myEdges1->SetColoring(0);
- this->myEdges1->SetInput(this->myCutter1->GetOutput());
+ this->myEdges1->SetInputConnection(this->myCutter1->GetOutputPort());
this->myEdgesMapper1 = vtkPolyDataMapper::New();
- this->myEdgesMapper1->SetInput(this->myEdges1->GetOutput());
+ this->myEdgesMapper1->SetInputConnection(this->myEdges1->GetOutputPort());
this->myEdgesActor1 = vtkActor::New();
this->myEdgesActor1->SetMapper(this->myEdgesMapper1);
myEdgesActor1->GetProperty()->SetLineWidth(4.);
myEdgesActor1->GetProperty()->SetColor(0., .5, .7);
this->myCutter2 = vtkEDFCutter::New();
- this->myCutter2->SetInput(myBox);
+ this->myCutter2->SetInputData(myBox);
this->myCutter2->SetCutFunction(this->myPlane2);
this->myCutMapper2 = vtkPolyDataMapper::New();
- this->myCutMapper2->SetInput(this->myCutter2->GetOutput());
+ this->myCutMapper2->SetInputConnection(this->myCutter2->GetOutputPort());
this->myCutActor2 = vtkActor::New();
this->myCutActor2->SetMapper(this->myCutMapper2);
myEdges2 = vtkFeatureEdges::New();
myEdges2->SetColoring(0);
- myEdges2->SetInput(myCutter2->GetOutput());
+ myEdges2->SetInputConnection(myCutter2->GetOutputPort());
myEdgesMapper2 = vtkPolyDataMapper::New();
- myEdgesMapper2->SetInput(myEdges2->GetOutput());
+ myEdgesMapper2->SetInputConnection(myEdges2->GetOutputPort());
myEdgesActor2 = vtkActor::New();
myEdgesActor2->SetMapper(myEdgesMapper2);
myEdgesActor2->GetProperty()->SetLineWidth(4.);
this->LineSource = vtkLineSource::New();
this->LineSource->SetResolution(1);
this->LineMapper = vtkPolyDataMapper::New();
- this->LineMapper->SetInput(this->LineSource->GetOutput());
+ this->LineMapper->SetInputConnection(this->LineSource->GetOutputPort());
this->LineActor = vtkActor::New();
this->LineActor->SetMapper(this->LineMapper);
this->ConeSource->SetResolution(12);
this->ConeSource->SetAngle(20.);
this->ConeMapper = vtkPolyDataMapper::New();
- this->ConeMapper->SetInput(this->ConeSource->GetOutput());
+ this->ConeMapper->SetInputConnection(this->ConeSource->GetOutputPort());
this->ConeActor = VISU_UnScaledActor::New();
this->ConeActor->SetMapper(this->ConeMapper);
ConeActor->SetSize(36);
this->LineSource2 = vtkLineSource::New();
this->LineSource2->SetResolution(1);
this->LineMapper2 = vtkPolyDataMapper::New();
- this->LineMapper2->SetInput(this->LineSource2->GetOutput());
+ this->LineMapper2->SetInputConnection(this->LineSource2->GetOutputPort());
this->LineActor2 = vtkActor::New();
this->LineActor2->SetMapper(this->LineMapper2);
this->ConeSource2->SetResolution(12);
this->ConeSource2->SetAngle(20.);
this->ConeMapper2 = vtkPolyDataMapper::New();
- this->ConeMapper2->SetInput(this->ConeSource2->GetOutput());
+ this->ConeMapper2->SetInputConnection(this->ConeSource2->GetOutputPort());
this->ConeActor2 = VISU_UnScaledActor::New();
this->ConeActor2->SetMapper(this->ConeMapper2);
ConeActor2->SetSize(36);
this->Sphere->SetThetaResolution(16);
this->Sphere->SetPhiResolution(8);
this->SphereMapper = vtkPolyDataMapper::New();
- this->SphereMapper->SetInput(this->Sphere->GetOutput());
+ this->SphereMapper->SetInputConnection(this->Sphere->GetOutputPort());
this->SphereActor = VISU_UnScaledActor::New();
this->SphereActor->SetMapper(this->SphereMapper);
SphereActor->SetSize(36);
(bounds[5]-bounds[4]));
this->myOutline->Update();
- if (this->Input || this->Prop3D) {
+ if (this->GetInput() || this->Prop3D) {
this->LineSource->SetPoint1(myPlane1->GetOrigin());
if ( this->NormalToYAxis ) {
myPlane1->SetNormal(0,1,0);
this->Sphere->SetCenter(origin);
SphereActor->SetCenter(origin);
- this->myEdgesMapper1->SetInput(this->myEdges1->GetOutput());
+ this->myEdgesMapper1->SetInputConnection(this->myEdges1->GetOutputPort());
}
//==================================================================
VISU_Plot3DPL
::GetOrientation(vtkDataSet* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
double aBounds[6];
theDataSet->GetBounds(aBounds);
::GetScaleFactor( VISU_ColoredPL* theColoredPL,
vtkDataSet* theDataSet )
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
double aLength = theDataSet->GetLength(); // diagonal length
double aScalarRange[2];
if ( !IsPlanarInput() )
{
aCutPlane = vtkEDFCutter::New();
- aCutPlane->SetInput(aMergedInput);
+ aCutPlane->SetInputData(aMergedInput);
vtkPlane *aPlane = vtkPlane::New();
aPlane->SetOrigin(anOrigin);
aPlane->Delete();
aPolyData = aCutPlane->GetOutput();
- aPolyData->Update();
+ aCutPlane->Update();
}
if ( !aPolyData || aPolyData->GetNumberOfCells() == 0 ) {
- myGeometryFilter->SetInput(aMergedInput);
+ myGeometryFilter->SetInputData(aMergedInput);
aPolyData = myGeometryFilter->GetOutput();
- aPolyData->Update();
+ myGeometryFilter->Update();
}
if ( !myIsContour ) // surface prs
{
if(VISU::IsDataOnCells(aPolyData)) {
- myCellDataToPointData->SetInput(aPolyData);
+ myCellDataToPointData->SetInputData(aPolyData);
myCellDataToPointData->PassCellDataOn();
- myWarpScalar->SetInput(myCellDataToPointData->GetPolyDataOutput());
+ //myWarpScalar->SetInputConnection(myCellDataToPointData->GetPolyDataOutput()); // OUV_PORTING: to check
+ myWarpScalar->SetInputConnection(myCellDataToPointData->GetOutputPort());
}else
- myWarpScalar->SetInput(aPolyData);
+ myWarpScalar->SetInputData(aPolyData);
}
else // contour prs
{
if(VISU::IsDataOnCells(aPolyData)) {
- myCellDataToPointData->SetInput(aPolyData);
+ myCellDataToPointData->SetInputData(aPolyData);
myCellDataToPointData->PassCellDataOn();
- myContourFilter->SetInput(myCellDataToPointData->GetOutput());
+ myContourFilter->SetInputConnection(myCellDataToPointData->GetOutputPort());
}else
- myContourFilter->SetInput(aPolyData);
+ myContourFilter->SetInputData(aPolyData);
double aScalarRange[2];
GetSourceRange(aScalarRange);
myContourFilter->GenerateValues(GetNumberOfContours(),aScalarRange);
- myWarpScalar->SetInput(myContourFilter->GetOutput());
+ myWarpScalar->SetInputConnection(myContourFilter->GetOutputPort());
}
VISU_CutPlanesPL::ClearAppendPolyData(myAppendPolyData.GetPointer());
- myAppendPolyData->AddInput(myWarpScalar->GetPolyDataOutput());
+ //myAppendPolyData->AddInputConnection(myWarpScalar->GetPolyDataOutput()); // OUV_PORTING: to check
+ myAppendPolyData->AddInputConnection(myWarpScalar->GetOutputPort());
if ( aCutPlane )
aCutPlane->Delete();
VISU_PolyDataMapperHolder
::SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper)
{
- myExtractPolyDataGeometry->SetInput(theIDMapper->GetPolyDataOutput());
+ myExtractPolyDataGeometry->SetInputData(theIDMapper->GetPolyDataOutput());
myPolyDataIDMapper = theIDMapper;
SetIDMapper(theIDMapper);
}
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()->
myMergeFilter->AddField("VISU_POINTS_MAPPER", aDataSet);
myMergeFilter->AddField("ELNO_POINT_COORDS", aDataSet);
- myElnoAssembleFilter->SetInput( InsertCustomPL() );
+ myElnoAssembleFilter->SetInputData( InsertCustomPL() );
- GetDataSetMapper()->SetInput( myElnoAssembleFilter->GetOutput() );
+ GetDataSetMapper()->SetInputConnection( myElnoAssembleFilter->GetOutputPort() );
}
{
if(IsExternalGeometryUsed()){
ClearGeometry();
- myAppendFilter->AddInput(GetClippedInput());
+ myAppendFilter->AddInputData(GetClippedInput());
}
}
if(!IsExternalGeometryUsed())
ClearGeometry();
AddGeometryName(theGeomName);
- myAppendFilter->AddInput(theGeometry);
+ myAppendFilter->AddInputData(theGeometry);
return GetNumberOfGeometry();
}
mySphereSource->SetPhiResolution(15);
mySphereSource->LatLongTessellationOn();
mySphereMapper = vtkPolyDataMapper::New();
- mySphereMapper->SetInput(mySphereSource->GetOutput());
+ mySphereMapper->SetInputConnection(mySphereSource->GetOutputPort());
mySphereActor = vtkActor::New();
mySphereActor->SetMapper(mySphereMapper);
//
int theDirection)
{
vtkPointSet* aDataSet = theSource? theSource: GetMergedInput();
- aDataSet->Update();
+ //aDataSet->Update(); // OUV_PORTING
vtkIdType aNbOfPoints = aDataSet->GetNumberOfPoints();
vtkDataSet* aPointSet = GetExtractorFilter()->GetOutput();
thePropogationTime,
thePercents);
+ // OUV_PORTING: to do
+ /*
if (anIsAccepted) {
mySource = theSource;
myPercents = thePercents;
myStream->Modified();
Modified();
}
+ */
return anIsAccepted;
}
aPercents);
double aBasePropTime = GetBasePropagationTime(theDataSet);
VISU_MaskPointsFilter *aPointsFilter = VISU_MaskPointsFilter::New();
- aPointsFilter->SetInput(theDataSet);
+ aPointsFilter->SetInputData(theDataSet);
vtkDataSet* aDataSet = aPointsFilter->GetOutput();
- aDataSet->Update();
+ aPointsFilter->Update();
size_t aRes = FindPossibleParams(aDataSet,
aStepLength,
aBasePropTime,
if(!theDataSet)
return -1.0;
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
int degree = 0;
double aVolume = 1.0;
if(!theDataSet)
return -1.0;
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
double aLength = theDataSet->GetLength();
double* aBounds = theDataSet->GetBounds();
::GetBaseIntegrationStep(vtkDataSet* theDataSet,
double thePercents)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
double aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
double anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep;
vtkDataSet* theDataSet,
double thePercents)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
double aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents);
if(aMinIntegrationStep > theStep)
if(!theDataSet)
return -1.0;
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
double aPropagationTime = theDataSet->GetLength() / GetVelocityCoeff(theDataSet);
return aPropagationTime;
myCellDataToPointData,
GetMergedInput());
- myGeomFilter->SetInput(myStream->GetOutput());
+ myGeomFilter->SetInputConnection(myStream->GetOutputPort());
myGeomFilter->ExtentClippingOn();
}
VISU_UsedPointsFilter* theUsedPointsFilter )
{
if ( VISU::IsDataOnCells( theDataSet ) ) {
- theCellCenters->SetInput( theDataSet );
+ theCellCenters->SetInputData( theDataSet );
theCellCenters->VertexCellsOn();
- theOutputFilter->SetInput( theCellCenters->GetOutput() );
+ theOutputFilter->SetInputConnection( theCellCenters->GetOutputPort() );
}else {
- theUsedPointsFilter->SetInput( theDataSet );
- theOutputFilter->SetInput( theUsedPointsFilter->GetOutput() );
+ theUsedPointsFilter->SetInputData( theDataSet );
+ theOutputFilter->SetInputConnection( theUsedPointsFilter->GetOutputPort() );
}
}
GetMergedInput(),
myUsedPointsFilter );
- myGlyph->SetInput( myTransformFilter->GetOutput() );
+ myGlyph->SetInputConnection( myTransformFilter->GetOutputPort() );
myGlyph->SetVectorModeToUseVector();
myGlyph->SetScaleModeToScaleByVector();
myGlyph->SetColorModeToColorByScalar();
case CENTER:
myGlyphSource->SetCenter(0.0, 0.0, 0.0);
}
- myGlyph->SetSource(myGlyphSource->GetOutput());
+ myGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
}
break;
case CONE2:
case CENTER:
myConeSource->SetCenter(0.0, 0.0, 0.0);
}
- myGlyph->SetSource(myConeSource->GetOutput());
+ myGlyph->SetSourceConnection(myConeSource->GetOutputPort());
}
break;
case NONE:
default: {
- myGlyph->SetSource(myLineSource->GetOutput());
+ myGlyph->SetSourceConnection(myLineSource->GetOutputPort());
}
}
#include "vtkProperty2D.h"
#include "vtkTextMapper.h"
#include "vtkTextProperty.h"
+#include "vtkVersion.h"
#include "vtkViewport.h"
#include "vtkTransformPolyDataFilter.h" // RKV
#include "vtkTransform.h" // RKV
for (mtime=0, this->InputList->InitTraversal(dsit);
(ds = this->InputList->GetNextDataSet(dsit)); )
{
- ds->Update();
+ //ds->Update(); // OUV_PORTING
dsMtime = ds->GetMTime();
if ( dsMtime > mtime )
{
for (mtime=0, this->DataObjectInputList->InitTraversal(doit);
(dobj = this->DataObjectInputList->GetNextDataObject(doit)); )
{
- dobj->Update();
+ //dobj->Update(); // OUV_PORTING
dsMtime = dobj->GetMTime();
if ( dsMtime > mtime )
{
{
this->PlotData[i] = vtkPolyData::New();
this->PlotGlyph[i] = vtkGlyph2D::New();
- this->PlotGlyph[i]->SetInput(this->PlotData[i]);
+ this->PlotGlyph[i]->SetInputData(this->PlotData[i]);
this->PlotGlyph[i]->SetScaleModeToDataScalingOff();
this->PlotAppend[i] = vtkAppendPolyData::New();
- this->PlotAppend[i]->AddInput(this->PlotData[i]);
+ this->PlotAppend[i]->AddInputData(this->PlotData[i]);
if ( this->LegendActor->GetEntrySymbol(i) != NULL &&
this->LegendActor->GetEntrySymbol(i) != this->GlyphSource->GetOutput() )
{
- this->PlotGlyph[i]->SetSource(this->LegendActor->GetEntrySymbol(i));
+ this->PlotGlyph[i]->SetSourceData(this->LegendActor->GetEntrySymbol(i));
this->PlotGlyph[i]->SetScaleFactor(this->ComputeGlyphScale(i,pos,pos2));
- this->PlotAppend[i]->AddInput(this->PlotGlyph[i]->GetOutput());
+ this->PlotAppend[i]->AddInputConnection(this->PlotGlyph[i]->GetOutputPort());
}
this->PlotMapper[i] = vtkPolyDataMapper2D::New();
// Insert a transformation filter into the pipeline to
// take into account a plot location.
this->PlotTransform[i] = vtkTransformPolyDataFilter::New();
- this->PlotTransform[i]->SetInput(this->PlotAppend[i]->GetOutput());
+ this->PlotTransform[i]->SetInputConnection(this->PlotAppend[i]->GetOutputPort());
this->PlotTransform[i]->SetTransform(tf);
- this->PlotMapper[i]->SetInput(this->PlotTransform[i]->GetOutput());
+ this->PlotMapper[i]->SetInputConnection(this->PlotTransform[i]->GetOutputPort());
// RKV : End
-// RKV this->PlotMapper[i]->SetInput(this->PlotAppend[i]->GetOutput());
+// RKV this->PlotMapper[i]->SetInputConnection(this->PlotAppend[i]->GetOutputPort());
this->PlotMapper[i]->ScalarVisibilityOff();
this->PlotActor[i] = vtkActor2D::New();
this->PlotActor[i]->SetMapper(this->PlotMapper[i]);
double VISU_XYPlotActor::ComputeGlyphScale(int i, int *pos, int *pos2)
{
vtkPolyData *pd=this->LegendActor->GetEntrySymbol(i);
- pd->Update();
+ //pd->Update(); // OUV_PORTING
double length=pd->GetLength();
double sf = this->GlyphSize * sqrt((double)(pos[0]-pos2[0])*(pos[0]-pos2[0]) +
(pos[1]-pos2[1])*(pos[1]-pos2[1])) / length;
aReader->Update();
vtkXMLImageDataWriter* aWriter = vtkXMLImageDataWriter::New();
- aWriter->SetInput( aReader->GetOutput() );
+ aWriter->SetInputConnection( aReader->GetOutputPort() );
aWriter->SetFileName( argv[3] );
aWriter->Write();
// Create and display actor
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput(myPlaneSource->GetOutput());
+ myMapper->SetInputConnection(myPlaneSource->GetOutputPort());
myActor = SALOME_Actor::New();
myActor->VisibilityOff();
VISU_PipeLine* aPL = myPrs3d->GetPipeLine();
vtkMapper* aMapper = aPL->GetMapper();
vtkDataSet* aPrsData = aMapper->GetInput();
- aPrsData->Update();
+ aMapper->Update();
if (aPrsData->GetNumberOfCells() < 1) {
isFailed = true;
}
(aBound[5]-aBound[4]));
myCutter = vtkEDFCutter::New();
- myCutter->SetInput(myBox);
+ myCutter->SetInputData(myBox);
myCutter->SetCutFunction(myPlane);
myMapper = vtkPolyDataMapper::New();
- myMapper->SetInput(myCutter->GetOutput());
+ myMapper->SetInputConnection(myCutter->GetOutputPort());
myActor = vtkActor::New();
myActor->VisibilityOff();
myCutLines->GetPipeLine()->Update();
vtkAppendPolyData* aPolyData = myCutLines->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aPolyData->GetOutput());
+ aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
aPlaneMapper->ScalarVisibilityOff();
myPreviewActorGlyphs = SALOME_Actor::New();
vtkAppendPolyData* aPolyData = myCutLines->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aPolyData->GetOutput());
+ aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
double bounds[6];
aPlaneMapper->GetBounds(bounds);
glyphs->SetScaleFactor(0.25*max_bound);
glyphs->SetVectorModeToUseVector();
glyphs->SetScaleModeToScaleByVector();
- glyphs->SetInput(profile);
- glyphs->SetSource(source->GetOutput());
+ glyphs->SetInputData(profile);
+ glyphs->SetSourceConnection(source->GetOutputPort());
vtkPolyDataMapper* aGlyphsMapper = vtkPolyDataMapper::New();
aGlyphsMapper->ScalarVisibilityOff();
- aGlyphsMapper->SetInput(glyphs->GetOutput());
+ aGlyphsMapper->SetInputConnection(glyphs->GetOutputPort());
myPreviewActorGlyphs->SetMapper(aGlyphsMapper);
return;
}
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aDataSet);
+ aPlaneMapper->SetInputData(aDataSet);
aPlaneMapper->ScalarVisibilityOff();
myPreviewActor = SALOME_Actor::New();
myUseAbsoluteLengthCheck->setChecked( myCutSegment->IsUseAbsoluteLength() );
vtkDataSet* anInput = myCutSegment->GetPipeLine()->GetInput();
- anInput->Update();
+ myCutSegment->GetPipeLine()->Update();
double bounds[6];
anInput->GetBounds( bounds );
myCutSegment->GetPipeLine()->Update();
vtkAppendPolyData* aPolyData = myCutSegment->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aPolyData->GetOutput());
+ aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
aPlaneMapper->ScalarVisibilityOff();
myPreviewActorGlyphs = SALOME_Actor::New();
vtkAppendPolyData* aPolyData = myCutSegment->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aPolyData->GetOutput());
+ aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
double bounds[6];
aPlaneMapper->GetBounds(bounds);
glyphs->SetScaleFactor(0.25*max_bound);
glyphs->SetVectorModeToUseVector();
glyphs->SetScaleModeToScaleByVector();
- glyphs->SetInput(profile);
- glyphs->SetSource(source->GetOutput());
+ glyphs->SetInputData(profile);
+ glyphs->SetSourceConnection(source->GetOutputPort());
vtkPolyDataMapper* aGlyphsMapper = vtkPolyDataMapper::New();
aGlyphsMapper->ScalarVisibilityOff();
- aGlyphsMapper->SetInput(glyphs->GetOutput());
+ aGlyphsMapper->SetInputConnection(glyphs->GetOutputPort());
myPreviewActorGlyphs->SetMapper(aGlyphsMapper);
vtkPolyDataMapper* aPointsMapper = vtkPolyDataMapper::New();
aPointsMapper->ScalarVisibilityOff();
- aPointsMapper->SetInput( aProfile );
+ aPointsMapper->SetInputData( aProfile );
myPreviewActorPoints->SetMapper( aPointsMapper );
myPreviewActorPoints->GetProperty()->SetRepresentationToPoints();
VISU::PNamedIDMapper aMapper = aResult->GetInput()->GetMeshOnEntity( myEngine->getMeshName(), myEngine->getEntity() );
vtkDataSetMapper* aPreviewMapper = vtkDataSetMapper::New();
- aPreviewMapper->SetInput( aMapper->GetOutput() );
+ aPreviewMapper->SetInputData( aMapper->GetOutput() );
vtkProperty* aProperty = vtkProperty::New();
aProperty->SetColor( 1, 1, 1 );
void Init() {
myPlaneSource = vtkPlaneSource::New();
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput(myPlaneSource->GetOutput());
+ myMapper->SetInputConnection(myPlaneSource->GetOutputPort());
// actor methods
VisibilityOff();
PickableOff();
#include <vtkPointData.h>
#include <vtkCellData.h>
#include <vtkCell.h>
+#include <vtkDataArray.h>
// STL Includes
#include <map>
const double *aBoundPrjLn = myCutLinesBasePL->GetBoundPrjLn();
for(int iLine = 0, jLine = 0; iLine < iLineEnd; iLine++){
vtkDataSet *aDataSet = myCutLinesBasePL->GetAppendPolyData()->GetInput(iLine);
- aDataSet->Update();
+ myCutLinesBasePL->GetAppendPolyData()->Update();
int aNbPoints = aDataSet->GetNumberOfPoints();
if(!aNbPoints) continue;
vtkPointData *aPointData = aDataSet->GetPointData();
VISU_CellDataToPointData *aFilter = NULL;
if(!aScalars) {
aFilter = VISU_CellDataToPointData::New();
- aFilter->SetInput(aDataSet);
+ aFilter->SetInputData(aDataSet);
aFilter->PassCellDataOn();
aDataSet = aFilter->GetOutput();
- aDataSet->Update();
+ aFilter->Update();
}
aPointData = aDataSet->GetPointData();
aScalars = aPointData->GetScalars();
if (!aDataSet)
throw std::runtime_error("There is no input data !!!");
- aDataSet->Update();
+ aMapper->Update();
static float eps = VTK_LARGE_FLOAT * 0.1 ;
if (!aDataSet->GetNumberOfCells())
throw std::runtime_error("There are no visible elements");
myPrs3dServant = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(myPrs3d).in());
if(myPrs3dServant){
myAppendFilter->RemoveAllInputs();
- myAppendFilter->AddInput(myPrs3dServant->GetPipeLine()->GetMapper()->GetInput());
+ myAppendFilter->AddInputData(myPrs3dServant->GetPipeLine()->GetMapper()->GetInput());
aSource = myAppendFilter->GetOutput();
}
}