Debug.
vtkStandardNewMacro(VISU_CommonCellsFilter);
VISU_CommonCellsFilter
-::VISU_CommonCellsFilter()
+::VISU_CommonCellsFilter() :
+ myIsProfileSet( false ),
+ myIsCellsSet( false )
{}
VISU_CommonCellsFilter
void
VISU_CommonCellsFilter
-::SetProfileUG(vtkUnstructuredGrid *input)
+::SetProfileUG(vtkAlgorithmOutput *input)
{
- this->SetInputData(0, input);
-}
-
-vtkUnstructuredGrid*
-VISU_CommonCellsFilter
-::GetProfileUG()
-{
- return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(0));
+ myIsProfileSet = true;
+ this->SetInputConnection(0, input);
}
void
VISU_CommonCellsFilter
-::SetCellsUG(vtkUnstructuredGrid *input)
+::SetCellsUG(vtkAlgorithmOutput *input)
{
- this->SetInputData(1, input);
-}
-
-vtkUnstructuredGrid*
-VISU_CommonCellsFilter
-::GetCellsUG()
-{
- return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(1));
+ myIsCellsSet = true;
+ this->SetInputConnection(1, input);
}
int
{
VISU::TTimerLog aTimerLog(MYDEBUG,"VISU_CommonCellsFilter::Execute");
- // 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);
+ if( !myIsProfileSet )
+ return 0;
- // get the input and ouptut
+ vtkInformation *inInfo1 = inputVector[0]->GetInformationObject(0);
vtkUnstructuredGrid *anInputProfileUG = vtkUnstructuredGrid::SafeDownCast(
inInfo1->Get(vtkDataObject::DATA_OBJECT()));
- vtkUnstructuredGrid *anInputCellsUG = vtkUnstructuredGrid::SafeDownCast(
- inInfo2->Get(vtkDataObject::DATA_OBJECT()));
+
+ vtkUnstructuredGrid *anInputCellsUG = NULL;
+ if( myIsCellsSet )
+ {
+ vtkInformation *inInfo2 = inputVector[1]->GetInformationObject(0);
+ anInputCellsUG = vtkUnstructuredGrid::SafeDownCast(
+ inInfo2->Get(vtkDataObject::DATA_OBJECT()));
+ }
+
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
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);
}
// Description:
// Specify the Unstructured Grid which overview
// nodal profile.
- void SetProfileUG(vtkUnstructuredGrid *input);
- vtkUnstructuredGrid* GetProfileUG();
+ void SetProfileUG(vtkAlgorithmOutput *input);
// Description:
// Specify the Unstructured Grid which overview
// cells data on CELL_ENTITY.
- void SetCellsUG(vtkUnstructuredGrid *input);
- vtkUnstructuredGrid* GetCellsUG();
+ void SetCellsUG(vtkAlgorithmOutput *input);
protected:
VISU_CommonCellsFilter();
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data
+private:
+ bool myIsProfileSet;
+ bool myIsCellsSet;
+
private:
VISU_CommonCellsFilter(const VISU_CommonCellsFilter&); // Lock copy
void operator=(const VISU_CommonCellsFilter&); // Lock copy
bool
IsDataOnPoints(vtkDataSet* theDataSet)
{
- //theDataSet->Update(); // OUV_PORTING (see the same below)
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
}
}
anAppendFilter->Update(); // Fix on VTK
- //theMeshOnEntity->GetOutput()->Update(); // OUV_PORTING
-
vtkDataSet* aSource = anAppendFilter->GetOutput();
INITMSGA(MYDEBUG,0,"aNbPoints - "<<aSource->GetNumberOfPoints()<<endl);
BEGMSG(MYDEBUG,"aNbCells - "<<aSource->GetNumberOfCells()<<endl);
void
PrintMemorySize(vtkUnstructuredGrid* theDataSet)
{
- //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);
}
if(MYVTKDEBUG){
GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
- //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(); // OUV_PORTING
if(theEntity == VISU::NODE_ENTITY)
BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
else
}
//------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetGeometry(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetGeometryConnection(vtkAlgorithmOutput *input)
{
- this->Superclass::SetInputData(input);
+ this->Superclass::SetInputConnection(input);
}
//------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetGeometry()
+void VISU_GaussMergeFilter::SetGeometryData(vtkDataSet *input)
{
- if (this->GetNumberOfInputConnections(0) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(0, 0));
+ this->Superclass::SetInputData(input);
}
//------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetScalars(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetScalarsData(vtkDataSet *input)
{
this->SetInputData(1, input);
}
//------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetScalars()
+void VISU_GaussMergeFilter::SetScalarsConnection(vtkAlgorithmOutput *input)
{
- if (this->GetNumberOfInputConnections(1) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(1, 0));
+ this->SetInputConnection(1, input);
}
//------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetVectors(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetVectorsData(vtkDataSet *input)
{
this->SetInputData(2, input);
}
//------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetVectors()
-{
- if (this->GetNumberOfInputConnections(2) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(2, 0));
-}
-
-//------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetNormals(vtkDataSet *input)
-{
- this->SetInputData(3, input);
-}
-
-//------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetNormals()
+void VISU_GaussMergeFilter::SetVectorsConnection(vtkAlgorithmOutput *input)
{
- if (this->GetNumberOfInputConnections(3) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(3, 0));
+ this->SetInputConnection(2, input);
}
//------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetTCoords(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetNormals(vtkAlgorithmOutput *input)
{
- this->SetInputData(4, input);
+ this->SetInputConnection(3, input);
}
//------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetTCoords()
+void VISU_GaussMergeFilter::SetTCoords(vtkAlgorithmOutput *input)
{
- if (this->GetNumberOfInputConnections(4) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(4, 0));
+ this->SetInputConnection(4, input);
}
//------------------------------------------------------------------------------
-void VISU_GaussMergeFilter::SetTensors(vtkDataSet *input)
+void VISU_GaussMergeFilter::SetTensors(vtkAlgorithmOutput *input)
{
- this->SetInputData(5, input);
-}
-
-//------------------------------------------------------------------------------
-vtkDataSet *VISU_GaussMergeFilter::GetTensors()
-{
- if (this->GetNumberOfInputConnections(5) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(5, 0));
+ this->SetInputConnection(5, input);
}
//------------------------------------------------------------------------------
vtkInformationVector **theInputVector,
vtkInformationVector *theOutputVector)
{
- if(vtkUnstructuredGrid *anInput = dynamic_cast<vtkUnstructuredGrid*>(this->GetInput())){
- vtkPolyData *anOutput = dynamic_cast<vtkPolyData*>(this->GetOutput());
- return ExecuteGauss(anInput,
- anOutput);
+ vtkInformation *inInfo0 = theInputVector[0]->GetInformationObject(0);
+ vtkInformation *inInfo1 = theInputVector[1]->GetInformationObject(0);
+ vtkInformation *outInfo = theOutputVector->GetInformationObject(0);
+
+ // get the input and output
+ vtkDataSet *anInput = vtkDataSet::SafeDownCast(inInfo0->Get(vtkDataObject::DATA_OBJECT()));
+ vtkDataSet *aScalars = theInputVector[1]->GetNumberOfInformationObjects() > 0 ?
+ vtkDataSet::SafeDownCast(inInfo1->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+ vtkDataSet *anOutput = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
+ if(vtkUnstructuredGrid *anInputUG = dynamic_cast<vtkUnstructuredGrid*>(this->GetInput())){
+ vtkPolyData *anOutputPD = dynamic_cast<vtkPolyData*>(this->GetOutput());
+ return ExecuteGauss(anInputUG,
+ aScalars,
+ anOutputPD);
}
return Superclass::RequestData(theRequest,
bool
VISU_GaussMergeFilter
::ExecuteGauss(vtkUnstructuredGrid* theInput,
+ vtkDataSet* theScalarsDataSet,
vtkPolyData* theOutput)
{
if(IsMergingInputs()){
for(vtkIdType i = 0;i < anIntersection.size();i++)
aNbTuples += aDataCellId2TupleGaussIdMap[anIntersection[i].first].size();
- vtkPointSet* aScalarsDataSet = dynamic_cast<vtkPointSet*>(GetScalars());
+ vtkPointSet* aScalarsDataSet = dynamic_cast<vtkPointSet*>(theScalarsDataSet);
vtkPoints* aDataPoints = aScalarsDataSet->GetPoints();
vtkPoints* anOutputPoints = vtkPoints::New(aDataPoints->GetDataType());
for(vtkIdType i = 0; i < aCellIdArray.size();i++) {
vtkIdType aCellId = aCellIdArray[i];
- vtkCell *aCell = GetScalars()->GetCell(aCellId);
+ vtkCell *aCell = theScalarsDataSet->GetCell(aCellId);
aCellIds->Reset();
aCellIds->InsertNextId(aNewTupleId);
aNewTupleId++;
- vtkIdType aCellType = GetScalars()->GetCellType(aCellId);
+ vtkIdType aCellType = theScalarsDataSet->GetCellType(aCellId);
vtkIdType aNewCellId = theOutput->InsertNextCell(aCellType, aCellIds);
anOutputCellData->CopyData(anInputCellData, aCellId, aNewCellId);
// Description:
// Specify object from which to extract geometry information.
- void SetGeometry(vtkDataSet *input);
- vtkDataSet *GetGeometry();
+ void SetGeometryConnection(vtkAlgorithmOutput *input);
+ void SetGeometryData(vtkDataSet *);
// Description:
// Specify object from which to extract scalar information.
- void SetScalars(vtkDataSet *);
- vtkDataSet *GetScalars();
+ void SetScalarsConnection(vtkAlgorithmOutput *);
+ void SetScalarsData(vtkDataSet *);
// Description:
- // Set / get the object from which to extract vector information.
- void SetVectors(vtkDataSet *);
- vtkDataSet *GetVectors();
+ // Specify object from which to extract vector information.
+ void SetVectorsConnection(vtkAlgorithmOutput *);
+ void SetVectorsData(vtkDataSet *);
// Description:
- // Set / get the object from which to extract normal information.
- void SetNormals(vtkDataSet *);
- vtkDataSet *GetNormals();
+ // Specify object from which to extract normal information.
+ void SetNormals(vtkAlgorithmOutput *);
// Description:
- // Set / get the object from which to extract texture coordinates
+ // Specify object from which to extract texture coordinates
// information.
- void SetTCoords(vtkDataSet *);
- vtkDataSet *GetTCoords();
+ void SetTCoords(vtkAlgorithmOutput *);
// Description:
- // Set / get the object from which to extract tensor data.
- void SetTensors(vtkDataSet *);
- vtkDataSet *GetTensors();
+ // Specify object from which to extract tensor data.
+ void SetTensors(vtkAlgorithmOutput *);
// Description:
// Set the object from which to extract a field and the name
bool
ExecuteGauss(vtkUnstructuredGrid* theInput,
+ vtkDataSet* theScalarsDataSet,
vtkPolyData* theOutput);
private:
class vtkPolyData;
class vtkDataSet;
class vtkCell;
+class vtkAlgorithmOutput;
namespace VISU
{
virtual
vtkDataSet*
GetOutput();
+
+ //! Get VTK representation of mesh for corresponding MED entity as algorithm output
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort() = 0;
};
typedef MED::SharedPtr<TUnstructuredGridIDMapper> PUnstructuredGridIDMapper;
virtual
vtkDataSet*
GetOutput();
+
+ //! Get VTK representation of mesh for corresponding MED entity as algorithm output
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort() = 0;
};
typedef MED::SharedPtr<TPolyDataIDMapper> PPolyDataIDMapper;
}
//------------------------------------------------------------------------------
-void VISU_MergeFilter::SetGeometry(vtkDataSet *input)
+void VISU_MergeFilter::SetGeometryConnection(vtkAlgorithmOutput *input)
{
- this->Superclass::SetInputData(input);
+ this->Superclass::SetInputConnection(input);
}
//------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetGeometry()
+void VISU_MergeFilter::SetGeometryData(vtkDataSet *input)
{
- if (this->GetNumberOfInputConnections(0) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(0, 0));
+ this->Superclass::SetInputData(input);
}
//------------------------------------------------------------------------------
-void VISU_MergeFilter::SetScalars(vtkDataSet *input)
+void VISU_MergeFilter::SetScalarsData(vtkDataSet *input)
{
this->SetInputData(1, input);
}
//------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetScalars()
+void VISU_MergeFilter::SetScalarsConnection(vtkAlgorithmOutput *input)
{
- if (this->GetNumberOfInputConnections(1) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(1, 0));
+ this->SetInputConnection(1, input);
}
//------------------------------------------------------------------------------
-void VISU_MergeFilter::SetVectors(vtkDataSet *input)
+void VISU_MergeFilter::SetVectorsData(vtkDataSet *input)
{
this->SetInputData(2, input);
}
//------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetVectors()
-{
- if (this->GetNumberOfInputConnections(2) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(2, 0));
-}
-
-//------------------------------------------------------------------------------
-void VISU_MergeFilter::SetNormals(vtkDataSet *input)
-{
- this->SetInputData(3, input);
-}
-
-//------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetNormals()
+void VISU_MergeFilter::SetVectorsConnection(vtkAlgorithmOutput *input)
{
- if (this->GetNumberOfInputConnections(3) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(3, 0));
+ this->SetInputConnection(2, input);
}
//------------------------------------------------------------------------------
-void VISU_MergeFilter::SetTCoords(vtkDataSet *input)
+void VISU_MergeFilter::SetNormals(vtkAlgorithmOutput *input)
{
- this->SetInputData(4, input);
+ this->SetInputConnection(3, input);
}
//------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetTCoords()
+void VISU_MergeFilter::SetTCoords(vtkAlgorithmOutput *input)
{
- if (this->GetNumberOfInputConnections(4) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(4, 0));
+ this->SetInputConnection(4, input);
}
//------------------------------------------------------------------------------
-void VISU_MergeFilter::SetTensors(vtkDataSet *input)
+void VISU_MergeFilter::SetTensors(vtkAlgorithmOutput *input)
{
- this->SetInputData(5, input);
-}
-
-//------------------------------------------------------------------------------
-vtkDataSet *VISU_MergeFilter::GetTensors()
-{
- if (this->GetNumberOfInputConnections(5) < 1)
- {
- return NULL;
- }
- return vtkDataSet::SafeDownCast(
- this->GetExecutive()->GetInputData(5, 0));
+ this->SetInputConnection(5, input);
}
//------------------------------------------------------------------------------
vtkInformationVector **theInputVector,
vtkInformationVector *theOutputVector)
{
- if(vtkUnstructuredGrid *anInput = dynamic_cast<vtkUnstructuredGrid*>(this->GetInput())){
- vtkUnstructuredGrid *anOutput = dynamic_cast<vtkUnstructuredGrid*>(this->GetOutput());
- return VISU::Execute(anInput,
- anOutput,
- this->GetScalars(),
- this->GetVectors(),
- this->GetNormals(),
- this->GetTCoords(),
- this->GetTensors(),
+ vtkInformation *inInfo0 = theInputVector[0]->GetInformationObject(0);
+ vtkInformation *inInfo1 = theInputVector[1]->GetInformationObject(0);
+ vtkInformation *inInfo2 = theInputVector[2]->GetInformationObject(0);
+ vtkInformation *inInfo3 = theInputVector[3]->GetInformationObject(0);
+ vtkInformation *inInfo4 = theInputVector[4]->GetInformationObject(0);
+ vtkInformation *inInfo5 = theInputVector[5]->GetInformationObject(0);
+ vtkInformation *outInfo = theOutputVector->GetInformationObject(0);
+
+ // get the input and output
+ vtkDataSet *anInput = vtkDataSet::SafeDownCast(inInfo0->Get(vtkDataObject::DATA_OBJECT()));
+ vtkDataSet *aScalars = theInputVector[1]->GetNumberOfInformationObjects() > 0 ?
+ vtkDataSet::SafeDownCast(inInfo1->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+ vtkDataSet *aVectors = theInputVector[2]->GetNumberOfInformationObjects() > 0 ?
+ vtkDataSet::SafeDownCast(inInfo2->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+ vtkDataSet *aNormals = theInputVector[3]->GetNumberOfInformationObjects() > 0 ?
+ vtkDataSet::SafeDownCast(inInfo3->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+ vtkDataSet *aTCoords = theInputVector[4]->GetNumberOfInformationObjects() > 0 ?
+ vtkDataSet::SafeDownCast(inInfo4->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+ vtkDataSet *aTensors = theInputVector[5]->GetNumberOfInformationObjects() > 0 ?
+ vtkDataSet::SafeDownCast(inInfo5->Get(vtkDataObject::DATA_OBJECT())) : NULL;
+ vtkDataSet *anOutput = vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
+ if(vtkUnstructuredGrid *anInputUG = dynamic_cast<vtkUnstructuredGrid*>(anInput)){
+ vtkUnstructuredGrid *anOutputUG = dynamic_cast<vtkUnstructuredGrid*>(anOutput);
+ return VISU::Execute(anInputUG,
+ anOutputUG,
+ aScalars,
+ aVectors,
+ aNormals,
+ aTCoords,
+ aTensors,
this->FieldList,
IsMergingInputs());
- }else if(vtkPolyData *anInput = dynamic_cast<vtkPolyData*>(this->GetInput())){
- vtkPolyData *anOutput = dynamic_cast<vtkPolyData*>(this->GetOutput());
- return VISU::Execute(anInput,
- anOutput,
- this->GetScalars(),
- this->GetVectors(),
- this->GetNormals(),
- this->GetTCoords(),
- this->GetTensors(),
+ }else if(vtkPolyData *anInputPD = dynamic_cast<vtkPolyData*>(anInput)){
+ vtkPolyData *anOutputPD = dynamic_cast<vtkPolyData*>(anOutput);
+ return VISU::Execute(anInputPD,
+ anOutputPD,
+ aScalars,
+ aVectors,
+ aNormals,
+ aTCoords,
+ aTensors,
this->FieldList,
IsMergingInputs());
}
// Description:
// Specify object from which to extract geometry information.
- void SetGeometry(vtkDataSet *input);
- vtkDataSet *GetGeometry();
+ void SetGeometryConnection(vtkAlgorithmOutput *input);
+ void SetGeometryData(vtkDataSet *);
// Description:
// Specify object from which to extract scalar information.
- void SetScalars(vtkDataSet *);
- vtkDataSet *GetScalars();
+ void SetScalarsConnection(vtkAlgorithmOutput *);
+ void SetScalarsData(vtkDataSet *);
// Description:
- // Set / get the object from which to extract vector information.
- void SetVectors(vtkDataSet *);
- vtkDataSet *GetVectors();
+ // Specify object from which to extract vector information.
+ void SetVectorsConnection(vtkAlgorithmOutput *);
+ void SetVectorsData(vtkDataSet *);
// Description:
- // Set / get the object from which to extract normal information.
- void SetNormals(vtkDataSet *);
- vtkDataSet *GetNormals();
+ // Specify object from which to extract normal information.
+ void SetNormals(vtkAlgorithmOutput *);
// Description:
- // Set / get the object from which to extract texture coordinates
+ // Specify object from which to extract texture coordinates
// information.
- void SetTCoords(vtkDataSet *);
- vtkDataSet *GetTCoords();
+ void SetTCoords(vtkAlgorithmOutput *);
// Description:
- // Set / get the object from which to extract tensor data.
- void SetTensors(vtkDataSet *);
- vtkDataSet *GetTensors();
+ // Specify object from which to extract tensor data.
+ void SetTensors(vtkAlgorithmOutput *);
// Description:
// Set the object from which to extract a field and the name
VISU::TFieldList* theFieldList,
TDataSet *theOutput)
{
+ if(!theGeometryPointMapper || !theDataPointMapper)
+ return;
if(IsDifferent(theGeometryPointMapper, theDataPointMapper)){
TObjectId2TupleIdMap aDataObjectId2PointIdMap;
GetObjectId2TupleIdMap(theDataPointMapper, aDataObjectId2PointIdMap);
if(vtkDataArray *aCellMapper = aCellData->GetArray("VISU_CELLS_MAPPER")){
bool anIsDataOnCells = false;
if(vtkDataSet* aDataSet = theScalarsDataSet)
- if(vtkCellData* aCellData = aDataSet->GetCellData())
- anIsDataOnCells = (aCellData->GetArray("VISU_FIELD") != NULL);
+ if(vtkCellData* aCellData1 = aDataSet->GetCellData())
+ anIsDataOnCells = (aCellData1->GetArray("VISU_FIELD") != NULL);
if(anIsDataOnCells){
vtkIntArray *aGeometryCellMapper = dynamic_cast<vtkIntArray*>(aCellMapper);
vtkIntArray* aDataCellMapper = GetIDMapper(theFieldList,
::GetMemorySize()
{
if(vtkDataSet* anOutput = GetPolyDataOutput()){
- //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
if(myIsDone){
return GetSource().GetPointer();
}
+ vtkAlgorithmOutput*
+ TUnstructuredGridHolder
+ ::GetOutputPort()
+ {
+ return NULL;
+ }
+
unsigned long int
TUnstructuredGridHolder
::GetMemorySize()
{
if(vtkDataSet* anOutput = GetUnstructuredGridOutput()){
- //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
if(myIsDone){
{
if(myIsVTKDone){
if(vtkDataSet* anOutput = GetOutput()){
- //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
}
return GetFilter()->GetOutput();
}
+ vtkAlgorithmOutput*
+ TAppendFilterHolder
+ ::GetOutputPort()
+ {
+ return GetFilter()->GetOutputPort();
+ }
+
//---------------------------------------------------------------
TAppendPolyDataHolder
::TAppendPolyDataHolder()
return GetFilter()->GetOutput();
}
+ vtkAlgorithmOutput*
+ TAppendPolyDataHolder
+ ::GetOutputPort()
+ {
+ return GetFilter()->GetOutputPort();
+ }
+
//---------------------------------------------------------------
TMergeFilterHolder
return GetFilter()->GetOutput();
}
+ vtkAlgorithmOutput*
+ TMergeFilterHolder
+ ::GetOutputPort()
+ {
+ return GetFilter()->GetOutputPort();
+ }
+
//---------------------------------------------------------------
TMeshImpl
return anAppendFilter->GetOutput();
}
+ vtkAlgorithmOutput*
+ TProfileImpl
+ ::GetOutputPort()
+ {
+ const PAppendFilter& anAppendFilter = GetFilter();
+ return anAppendFilter->GetOutputPort();
+ }
+
unsigned long int
TProfileImpl
::GetMemorySize()
TUnstructuredGridIDMapperImpl
::SetReferencedMesh( const PNamedIDMapper& theNamedIDMapper )
{
- myCommonCellsFilter->SetCellsUG( theNamedIDMapper->GetUnstructuredGridOutput() );
+ myCommonCellsFilter->SetCellsUG( theNamedIDMapper->GetOutputPort() );
}
void
if ( !myFilter.GetPointer() ) {
const PAppendFilter& anAppendFilter = myIDMapper->GetFilter();
- vtkUnstructuredGrid* aGeometry = anAppendFilter->GetOutput();
+ vtkAlgorithmOutput* aGeometryConnection = anAppendFilter->GetOutputPort();
+ vtkUnstructuredGrid* aGeometryData = anAppendFilter->GetOutput();
+ anAppendFilter->Update();
+
const PUnstructuredGrid& aSource = mySource.GetSource();
vtkUnstructuredGrid* aDataSet = aSource.GetPointer();
- aDataSet->ShallowCopy( aGeometry );
+ aDataSet->ShallowCopy( aGeometryData );
const PMergeFilter& aFilter = GetFilter();
- aFilter->SetGeometry( aGeometry );
- aFilter->SetScalars( aDataSet );
- aFilter->SetVectors( aDataSet );
+ aFilter->SetGeometryConnection( aGeometryConnection );
+ aFilter->SetScalarsData( aDataSet );
+ aFilter->SetVectorsData( aDataSet );
aFilter->AddField( "VISU_FIELD", aDataSet );
aFilter->AddField( "VISU_FIELD_GAUSS_MIN", aDataSet );
aFilter->AddField( "VISU_FIELD_GAUSS_MAX", aDataSet );
aFilter->AddField( "ELNO_COMPONENT_MAPPER", aDataSet );
aFilter->AddField( "VISU_POINTS_MAPPER", aDataSet );
- myCommonCellsFilter->SetProfileUG( aFilter->GetUnstructuredGridOutput() );
+ myCommonCellsFilter->SetProfileUG( aFilter->GetOutputPort() );
}
}
::GetUnstructuredGridOutput()
{
Build();
- return myCommonCellsFilter->GetOutput();
+ vtkUnstructuredGrid* anOutput = myCommonCellsFilter->GetOutput();
+ myCommonCellsFilter->Update();
+ return anOutput;
}
vtkDataSet*
return GetUnstructuredGridOutput();
}
+ vtkAlgorithmOutput*
+ TUnstructuredGridIDMapperImpl
+ ::GetOutputPort()
+ {
+ return myCommonCellsFilter->GetOutputPort();
+ }
+
PUnstructuredGrid
TUnstructuredGridIDMapperImpl
::GetSource()
{
if ( !myFilter.GetPointer() ) {
const PAppendPolyData& anAppendFilter = myIDMapper->GetFilter();
- vtkPolyData* aGeometry = anAppendFilter->GetOutput();
+ vtkAlgorithmOutput* aGeometryConnection = anAppendFilter->GetOutputPort();
+ vtkPolyData* aGeometryData = anAppendFilter->GetOutput();
+ anAppendFilter->Update();
const PPolyData& aSource = mySource.GetSource();
vtkPolyData* aDataSet = aSource.GetPointer();
- aDataSet->ShallowCopy( aGeometry );
+ aDataSet->ShallowCopy( aGeometryData );
const PMergeFilter& aFilter = GetFilter();
- aFilter->SetGeometry( aGeometry );
- aFilter->SetScalars( aDataSet );
- aFilter->SetVectors( aDataSet );
+ aFilter->SetGeometryConnection( aGeometryConnection );
+ aFilter->SetScalarsData( aDataSet );
+ aFilter->SetVectorsData( aDataSet );
aFilter->AddField( "VISU_FIELD", aDataSet );
aFilter->AddField( "VISU_FIELD_GAUSS_MIN", aDataSet );
aFilter->AddField( "VISU_FIELD_GAUSS_MAX", aDataSet );
return GetPolyDataOutput();
}
+ vtkAlgorithmOutput*
+ TPolyDataIDMapperImpl
+ ::GetOutputPort()
+ {
+ return myFilter->GetOutputPort();
+ }
+
PPolyData
TPolyDataIDMapperImpl
::GetSource()
return TAppendPolyDataHolder::GetPolyDataOutput();
}
+ vtkAlgorithmOutput*
+ TGaussMeshImpl
+ ::GetOutputPort()
+ {
+ return TAppendPolyDataHolder::GetOutputPort();
+ }
+
unsigned long int
TGaussMeshImpl
::GetMemorySize()
return TAppendFilterHolder::GetUnstructuredGridOutput();
}
+ vtkAlgorithmOutput*
+ TMeshOnEntityImpl
+ ::GetOutputPort()
+ {
+ return TAppendFilterHolder::GetOutputPort();
+ }
+
unsigned long int
TMeshOnEntityImpl
::GetMemorySize()
return TUnstructuredGridHolder::GetUnstructuredGridOutput();
}
+ vtkAlgorithmOutput*
+ TFamilyImpl
+ ::GetOutputPort()
+ {
+ return TUnstructuredGridHolder::GetOutputPort();
+ }
+
unsigned long int
TFamilyImpl
::GetMemorySize()
return TAppendFilterHolder::GetUnstructuredGridOutput();
}
+ vtkAlgorithmOutput*
+ TGroupImpl
+ ::GetOutputPort()
+ {
+ return TAppendFilterHolder::GetOutputPort();
+ }
+
unsigned long int
TGroupImpl
::GetMemorySize()
vtkUnstructuredGrid*
GetUnstructuredGridOutput();
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
+
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
virtual
vtkUnstructuredGrid*
GetUnstructuredGridOutput();
+
+ //! Reimplement the TNamedIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
};
/*!
virtual
vtkPolyData*
GetPolyDataOutput();
+
+ //! Reimplement the TGaussPtsIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
};
virtual
vtkDataSet*
GetOutput();
+
+ //! Gets output port of the filter
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
};
vtkUnstructuredGrid*
GetUnstructuredGridOutput();
+ //! Reimplement the TNamedIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
+
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
vtkDataSet*
GetOutput();
+ //! Reimplement the TUnstructuredGridIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
+
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
vtkDataSet*
GetOutput();
+ //! Reimplement the TPolyDataIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
+
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
vtkPolyData*
GetPolyDataOutput();
+ //! Reimplement the TGaussPtsIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
+
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
vtkUnstructuredGrid*
GetUnstructuredGridOutput();
+ //! Reimplement the TNamedIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
+
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
vtkUnstructuredGrid*
GetUnstructuredGridOutput();
+ //! Reimplement the TUnstructuredGridIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
+
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
vtkUnstructuredGrid*
GetUnstructuredGridOutput();
+ //! Reimplement the TUnstructuredGridIDMapper::GetOutputPort
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort();
+
//! Gets memory size used by the instance (bytes).
virtual
unsigned long int
vtkPolyData*
GetPolyDataOutput();
+ virtual
+ vtkAlgorithmOutput*
+ GetOutputPort() { return NULL; }
+
virtual
long unsigned int
GetMemorySize();
#include "VISUConvertor.hxx"
-//class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkDataSetToUnstructuredGridFilter
-class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkUnstructuredGridAlgorithm // OUV_PORTING: to check
+class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkUnstructuredGridAlgorithm
{
public:
vtkTypeMacro(VISU_UsedPointsFilter,vtkUnstructuredGridAlgorithm);
myShrinkFilter->SetStoreMapping(true);
myAnnotationMapper->Delete();
- myAnnotationActor->vtkActor2D::SetMapper(myAnnotationMapper.GetPointer()); // OUV_PORTING: to check
+ myAnnotationActor->vtkActor2D::SetMapper(myAnnotationMapper.GetPointer());
myAnnotationActor->Delete();
myAnnotationActor->SetVisibility(0);
if ( !myIsFeatureEdgesAllowed || myIsFeatureEdgesEnabled == theIsFeatureEdgesEnabled )
return;
- //if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
- if ( vtkAlgorithmOutput* aPolyData = myPassFilter[ 2 ]->GetOutputPort() ) // OUV_PORTING: to check
+ if ( vtkAlgorithmOutput* aPolyData = myPassFilter[ 2 ]->GetOutputPort() )
{
if( theIsFeatureEdgesEnabled )
{
// myPolyDataExtractor->SetInput(myCurrentPL->GetPickableDataSet());
//myMapper->SetInput(myPolyDataExtractor->GetOutput());
- myMapper->SetInputData(myCurrentPL->GetPickableDataSet());
+ myMapper->SetInputConnection(myCurrentPL->GetPickableDataSet());
SetMapper(myMapper.GetPointer());
}
myCellDataToPointData->PassCellDataOn();
aCellsToWarp->Delete();
- //myWarpVector->SetInput(myCellDataToPointData->GetUnstructuredGridOutput());
- myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
+ myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort());
vtkUnstructuredGrid* aWarpedDataSet = myWarpVector->GetUnstructuredGridOutput();
myWarpVector->Update();
myCellSource->SetPoints(aWarpedDataSet->GetPoints());
VISU_GaussDeviceActorBase
::SetPointSpriteMapper(VISU_OpenGLPointSpriteMapper* theMapper)
{
- vtkPolyData* aDataSet = theMapper->GetInput();
+ vtkAlgorithmOutput* aDataSet = theMapper->GetInputConnection( 0, 0 );
myMapper = theMapper;
int anId = 0;
if (myPolyDataExtractor) {
- myPolyDataExtractor->SetInputData(aDataSet);
+ myPolyDataExtractor->SetInputConnection(aDataSet);
myPassFilter[ anId ]->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
} else {
- myPassFilter[ anId ]->SetInputData( aDataSet );
+ myPassFilter[ anId ]->SetInputConnection( aDataSet );
}
myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++;
- //myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
- myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
+ myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++;
myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
- //myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
- myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
+ myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
Superclass::SetMapper( theMapper );
}
{
Superclass::SetMapperInput(theDataSet);
- mySurfaceActor->SetInput(theDataSet);
- myEdgeActor->SetInput(theDataSet);
- myNodeActor->SetInput(theDataSet);
+ mySurfaceActor->SetInputData(theDataSet);
+ myEdgeActor->SetInputData(theDataSet);
+ myNodeActor->SetInputData(theDataSet);
}
//----------------------------------------------------------------------------
virtual
void
- SetInput(vtkDataSet* theDataSet)
+ SetInputData(vtkDataSet* theDataSet)
{
myGeomFilter->SetInputData( theDataSet );
}
+ //----------------------------------------------------------------------------
+ virtual
+ void
+ SetInputConnection(vtkAlgorithmOutput* theAlgorithmOutput)
+ {
+ myGeomFilter->SetInputConnection( theAlgorithmOutput );
+ }
+
+
//----------------------------------------------------------------------------
void
SetInteractor(vtkRenderWindowInteractor* theInteractor)
// myEdgeActor->SetInput( theDataSet );
if (theDataSet->IsA("vtkPolyData")) {
- myPointSpriteActor->SetInput( myPolyDataExtractor->GetOutput() );
- myPointsActor->SetInput( myPolyDataExtractor->GetOutput() );
- mySurfaceActor->SetInput( myPolyDataExtractor->GetOutput() );
- myEdgeActor->SetInput( myPolyDataExtractor->GetOutput() );
+ myPointSpriteActor->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
+ myPointsActor->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
+ mySurfaceActor->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
+ myEdgeActor->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
} else {
- myPointSpriteActor->SetInput( myExtractor->GetOutput() );
- myPointsActor->SetInput( myExtractor->GetOutput() );
- mySurfaceActor->SetInput( myExtractor->GetOutput() );
- myEdgeActor->SetInput( myExtractor->GetOutput() );
+ myPointSpriteActor->SetInputConnection( myExtractor->GetOutputPort() );
+ myPointsActor->SetInputConnection( myExtractor->GetOutputPort() );
+ mySurfaceActor->SetInputConnection( myExtractor->GetOutputPort() );
+ myEdgeActor->SetInputConnection( myExtractor->GetOutputPort() );
}
}
::SetMapper(vtkMapper* theMapper)
{
if(theMapper){
- myPassFilter[0]->SetInputData(theMapper->GetInput());
+ myPassFilter[0]->SetInputConnection(theMapper->GetInputConnection(0, 0));
- //myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput());
- myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort()); // OUV_PORTING: to check
-
- //myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput());
- myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort()); // OUV_PORTING: to check
-
- //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());
- */
+ myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
+
+ myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
+
+ myPassFilter[3]->SetInputConnection(myPassFilter[2]->GetOutputPort());
+
theMapper->SetInputConnection(myPassFilter[3]->GetOutputPort());
}
return myPassFilter->GetUnstructuredGridOutput();
}
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput*
+VISU_ColoredPL
+::GetClippedInputPort()
+{
+ return myPassFilter->GetOutputPort();
+}
+
//----------------------------------------------------------------------------
void
VISU_ColoredPL
::Build()
{
- myExtractor->SetInputData( Superclass::GetClippedInput() );
+ myExtractor->SetInputConnection( Superclass::GetClippedInputPort() );
myFieldTransform->SetInputConnection(myExtractor->GetOutputPort());
myThreshold->SetInputConnection( myFieldTransform->GetOutputPort() );
vtkPointSet*
GetClippedInput();
+ virtual
+ vtkAlgorithmOutput*
+ GetClippedInputPort();
+
//----------------------------------------------------------------------------
static
void
Modified();
}
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_CutLinesPL
::InsertCustomPL()
{
- return myAppendPolyData->GetOutput();
+ return myAppendPolyData->GetOutputPort();
}
//----------------------------------------------------------------------------
void
Init();
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_CutPlanesPL
::InsertCustomPL()
{
- return GetWarpVectorOutput();
+ return GetWarpVectorOutputPort();
}
~VISU_CutPlanesPL();
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
}
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_CutSegmentPL
::InsertCustomPL()
{
- return myAppendPolyData->GetOutput();
+ return myAppendPolyData->GetOutputPort();
}
//----------------------------------------------------------------------------
void
Init();
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
VISU_DataSetMapperHolder
::SetUnstructuredGridIDMapper(const VISU::PUnstructuredGridIDMapper& theIDMapper)
{
- myElnoDisassembleFilter->SetInputData( theIDMapper->GetUnstructuredGridOutput() );
+ myElnoDisassembleFilter->SetInputConnection( theIDMapper->GetOutputPort() );
myExtractGeometry->SetInputConnection( myElnoDisassembleFilter->GetOutputPort() );
myUnstructuredGridIDMapper = theIDMapper;
SetIDMapper( theIDMapper );
return myExtractGeometry->GetOutput();
}
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput*
+VISU_DataSetMapperHolder
+::GetClippedInputPort()
+{
+ return myExtractGeometry->GetOutputPort();
+}
+
//----------------------------------------------------------------------------
void
vtkPointSet*
GetClippedInput();
+ virtual
+ vtkAlgorithmOutput*
+ GetClippedInputPort();
+
private:
//----------------------------------------------------------------------------
VISU::PUnstructuredGridIDMapper myUnstructuredGridIDMapper;
//----------------------------------------------------------------------------
vtkDataSet* VISU_DeformationPL::GetWarpVectorOutput()
{
- return myOutputPassFiler->GetOutput();
+ vtkDataSet* aDataSet = myOutputPassFiler->GetOutput();
+ myOutputPassFiler->Update();
+ return aDataSet;
+}
+
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput* VISU_DeformationPL::GetWarpVectorOutputPort()
+{
+ return myOutputPassFiler->GetOutputPort();
}
//----------------------------------------------------------------------------
void VISU_DeformationPL::SetMergeFilterInput(vtkDataSet* ScalarInput,
vtkDataSet* VectorialInput)
{
- myVectorMergeFilter->SetScalars(ScalarInput);
+ myVectorMergeFilter->SetScalarsData(ScalarInput);
myVectorMergeFilter->AddField("VISU_CELLS_MAPPER",ScalarInput);
myVectorMergeFilter->AddField("VISU_POINTS_MAPPER",ScalarInput);
- myVectorMergeFilter->SetGeometry(VectorialInput);
- myVectorMergeFilter->SetVectors(VectorialInput);
+ myVectorMergeFilter->SetGeometryData(VectorialInput);
+ myVectorMergeFilter->SetVectorsData(VectorialInput);
}
//----------------------------------------------------------------------------
vtkDataSet* VISU_DeformationPL::GetMergeFilterOutput(){
- return myVectorMergeFilter->GetOutput();
+ vtkDataSet* aDataSet = myVectorMergeFilter->GetOutput();
+ myVectorMergeFilter->Update();
+ return aDataSet;
}
//----------------------------------------------------------------------------
void SetWarpVectorInput(vtkDataSet *theInput);
vtkDataSet* GetWarpVectorOutput();
+ vtkAlgorithmOutput* GetWarpVectorOutputPort();
//-----------------------------------------------------------
void SetMergeFilterInput(vtkDataSet* ScalarInput,
{
Superclass::Build();
- //myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
- myWarpScalar->SetInputConnection( GetFieldTransformFilter()->GetOutputPort() ); // OUV_PORTING: to check
- //GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
- GetPolyDataMapper()->SetInputConnection( myWarpScalar->GetOutputPort() ); // OUV_PORTING: to check
+ myWarpScalar->SetInputConnection( GetFieldTransformFilter()->GetOutputPort() );
+ GetPolyDataMapper()->SetInputConnection( myWarpScalar->GetOutputPort() );
}
VISU_DeformedGridPL
::Update()
{
- //vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
- vtkAlgorithmOutput* aPointSet = GetFieldTransformFilter()->GetOutputPort(); // OUV_PORTING: to check
+ vtkAlgorithmOutput* aPointSet = GetFieldTransformFilter()->GetOutputPort();
if ( !myIsContour ) // surface prs
{
myWarpScalar->SetInputConnection( aPointSet );
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_DeformedShapeAndScalarMapPL
::InsertCustomPL()
{
VISU::CellDataToPoint(myWarpVector,
myCellDataToPointData,
- GetMergedInput());
+ GetMergedInput(),
+ GetMergedInputPort());
myScalars = vtkUnstructuredGrid::SafeDownCast(GetMergedInput());
myScalarsFieldTransform->SetInputConnection(myScalarsExtractor->GetOutputPort());
// Sets geometry for merge filter
- myScalarsMergeFilter->SetGeometry(myWarpVector->GetUnstructuredGridOutput());
+ myScalarsMergeFilter->SetGeometryConnection(myWarpVector->GetOutputPort());
vtkDataSet* aScalarsDataSet = myScalarsFieldTransform->GetOutput();
- myScalarsMergeFilter->SetScalars(aScalarsDataSet);
+ myScalarsFieldTransform->Update();
+
+ vtkAlgorithmOutput* aScalarsConnection = myScalarsFieldTransform->GetOutputPort();
+ myScalarsMergeFilter->SetScalarsConnection(aScalarsConnection);
myScalarsMergeFilter->AddField("VISU_CELLS_MAPPER", aScalarsDataSet);
myScalarsMergeFilter->AddField("VISU_POINTS_MAPPER", aScalarsDataSet);
- return myScalarsMergeFilter->GetOutput();
+ return myScalarsMergeFilter->GetOutputPort();
}
myExtractGeometry->SetInputConnection(myScalarsElnoDisassembleFilter->GetOutputPort());
myScalarsExtractor->SetInputConnection(myExtractGeometry->GetOutputPort());
- if(VISU::IsDataOnCells(myScalarsElnoDisassembleFilter->GetOutput()))
+ vtkDataSet* aDataSet = myScalarsElnoDisassembleFilter->GetOutput();
+ myScalarsElnoDisassembleFilter->Update();
+ if(VISU::IsDataOnCells(aDataSet))
GetMapper()->SetScalarModeToUseCellData();
else
GetMapper()->SetScalarModeToUsePointData();
~VISU_DeformedShapeAndScalarMapPL();
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
if(!theDataSet)
return 0.0;
- //theDataSet->Update(); // OUV_PORTING
-
int aNbCells = theDataSet->GetNumberOfCells();
int aNbPoints = theDataSet->GetNumberOfPoints();
int aNbElem = aNbCells? aNbCells: aNbPoints;
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_DeformedShapePL
::InsertCustomPL()
{
VISU::CellDataToPoint(myWarpVector,
myCellDataToPointData,
- GetMergedInput());
+ GetMergedInput(),
+ GetMergedInputPort());
- return myWarpVector->GetOutput();
+ return myWarpVector->GetOutputPort();
}
~VISU_DeformedShapePL();
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
//----------------------------------------------------------------------------
-vtkPolyData*
+vtkAlgorithmOutput*
VISU_GaussPointsPL
::GetPickableDataSet()
{
- return myPassFilter[1]->GetPolyDataOutput();
+ return myPassFilter[1]->GetOutputPort();
}
SetSourceGeometry();
vtkDataSet* aDataSet = GetFieldTransformFilter()->GetOutput();
+ GetFieldTransformFilter()->Update();
+
+ vtkAlgorithmOutput* anAlgorithmOutput = GetFieldTransformFilter()->GetOutputPort();
+
+ myMergeFilter->SetGeometryConnection(myAppendFilter->GetOutputPort());
- myMergeFilter->SetGeometry(myAppendFilter->GetOutput());
-
- myMergeFilter->SetScalars(aDataSet);
- myMergeFilter->SetVectors(aDataSet);
+ myMergeFilter->SetScalarsConnection(anAlgorithmOutput);
+ myMergeFilter->SetVectorsConnection(anAlgorithmOutput);
myMergeFilter->RemoveFields();
myMergeFilter->AddField("VISU_FIELD", aDataSet);
myMergeFilter->AddField("VISU_CELLS_MAPPER", aDataSet);
myMergeFilter->SetGaussPtsIDMapper(GetGaussPtsIDMapper());
-
- myPassFilter[0]->SetInputData(InsertCustomPL());
+
+ myPassFilter[0]->SetInputConnection(InsertCustomPL());
myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
// Geometrical Sphere
myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
- //GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetPolyDataOutput() );
- GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetOutputPort() ); // OUV_PORTING: to check
+ GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetOutputPort() );
// Update according the current state
SetIsDeformed(GetIsDeformed());
::SetIsDeformed( bool theIsDeformed )
{
if(theIsDeformed){
- //myWarpVector->SetInput( myPassFilter[0]->GetPolyDataOutput() );
- myWarpVector->SetInputConnection( myPassFilter[0]->GetOutputPort() ); // OUV_PORTING: to check
+ myWarpVector->SetInputConnection( myPassFilter[0]->GetOutputPort() );
myPassFilter[1]->SetInputConnection(myWarpVector->GetOutputPort());
}else
myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
}
aMainReader->Delete();
anAlphaReader->Delete();
- //aCompositeImageData->Update(); // OUV_PORTING
return aCompositeImageData;
}
}
}
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_GaussPointsPL
::InsertCustomPL()
{
- return GetMergedInput();
+ return GetMergedInputPort();
}
int
myMergeFilter->Update();
return myMergeFilter->GetOutput();
}
+
+vtkAlgorithmOutput*
+VISU_GaussPointsPL
+::GetMergedInputPort()
+{
+ return myMergeFilter->GetOutputPort();
+}
GetParentMesh();
//! Get an intermediate dataset that can be picked
- vtkPolyData*
+ vtkAlgorithmOutput*
GetPickableDataSet();
//----------------------------------------------------------------------------
vtkPointSet*
GetMergedInput();
+ virtual
+ vtkAlgorithmOutput*
+ GetMergedInputPort();
+
protected:
//----------------------------------------------------------------------------
VISU_GaussPointsPL();
Build();
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
VISU::CellDataToPoint(myContourFilter,
myCellDataToPointData,
- GetMergedInput());
+ GetMergedInput(),
+ GetMergedInputPort());
}
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_IsoSurfacesPL
::InsertCustomPL()
{
- return myContourFilter->GetOutput();
+ return myContourFilter->GetOutputPort();
}
GetMemorySize();
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
vtkPointSet*
GetClippedInput() = 0;
+ virtual
+ vtkAlgorithmOutput*
+ GetClippedInputPort() = 0;
+
//----------------------------------------------------------------------------
virtual
void
#include "VISUPipeline.hxx"
#include "VISU_Structures.hxx"
+class vtkAlgorithmOutput;
class vtkDataSet;
class vtkPointSet;
class VISU_PipeLine;
vtkPointSet*
GetMergedInput() = 0;
+ virtual
+ vtkAlgorithmOutput*
+ GetMergedInputPort() = 0;
+
virtual
void
DoShallowCopy(VISU_PipeLine *thePipeLine,
VISU_MeshPL
::Build()
{
- GetDataSetMapper()->SetInputData(GetClippedInput());
+ GetDataSetMapper()->SetInputConnection(GetClippedInputPort());
}
else
{
this->InvokeEvent(vtkCommand::StartEvent,NULL);
- //input->Update(); // OUV_PORTING: to check
this->Update();
this->InvokeEvent(vtkCommand::EndEvent,NULL);
return GetMapperHolder()->GetClippedInput();
}
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput*
+VISU_PipeLine
+::GetClippedInputPort()
+{
+ return GetMapperHolder()->GetClippedInputPort();
+}
+
//----------------------------------------------------------------------------
void
vtkDataSet*
GetClippedInput();
+ vtkAlgorithmOutput*
+ GetClippedInputPort();
+
void
SetIsShrinkable(bool theIsShrinkable);
void
CellDataToPoint(TOutputFilter* theOutputFilter,
VISU_CellDataToPointData *theCellDataToPointData,
- vtkDataSet* theDataSet)
+ vtkDataSet* theDataSet,
+ vtkAlgorithmOutput* theAlgorithmOutput)
{
if(VISU::IsDataOnCells(theDataSet)){
- theCellDataToPointData->SetInputData(theDataSet);
+ theCellDataToPointData->SetInputConnection(theAlgorithmOutput);
theCellDataToPointData->PassCellDataOn();
- //theOutputFilter->SetInput(theCellDataToPointData->GetUnstructuredGridOutput());
- theOutputFilter->SetInputConnection(theCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
+ theOutputFilter->SetInputConnection(theCellDataToPointData->GetOutputPort());
}else
- theOutputFilter->SetInputData(theDataSet);
+ theOutputFilter->SetInputConnection(theAlgorithmOutput);
}
//----------------------------------------------------------------------------
VISU_Plot3DPL
::GetOrientation(vtkDataSet* theDataSet)
{
- //theDataSet->Update(); // OUV_PORTING
-
double aBounds[6];
theDataSet->GetBounds(aBounds);
double aDelta[3] = {aBounds[1] - aBounds[0], aBounds[3] - aBounds[2], aBounds[5] - aBounds[4]};
::GetScaleFactor( VISU_ColoredPL* theColoredPL,
vtkDataSet* theDataSet )
{
- //theDataSet->Update(); // OUV_PORTING
double aLength = theDataSet->GetLength(); // diagonal length
double aScalarRange[2];
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_Plot3DPL
::InsertCustomPL()
{
- return myAppendPolyData->GetOutput();
+ return myAppendPolyData->GetOutputPort();
}
if(VISU::IsDataOnCells(aPolyData)) {
myCellDataToPointData->SetInputData(aPolyData);
myCellDataToPointData->PassCellDataOn();
- //myWarpScalar->SetInputConnection(myCellDataToPointData->GetPolyDataOutput()); // OUV_PORTING: to check
myWarpScalar->SetInputConnection(myCellDataToPointData->GetOutputPort());
}else
myWarpScalar->SetInputData(aPolyData);
}
VISU_CutPlanesPL::ClearAppendPolyData(myAppendPolyData.GetPointer());
- //myAppendPolyData->AddInputConnection(myWarpScalar->GetPolyDataOutput()); // OUV_PORTING: to check
myAppendPolyData->AddInputConnection(myWarpScalar->GetOutputPort());
if ( aCutPlane )
~VISU_Plot3DPL();
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
VISU_PolyDataMapperHolder
::SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper)
{
- myExtractPolyDataGeometry->SetInputData(theIDMapper->GetPolyDataOutput());
+ myExtractPolyDataGeometry->SetInputConnection(theIDMapper->GetOutputPort());
myPolyDataIDMapper = theIDMapper;
SetIDMapper(theIDMapper);
}
return myExtractPolyDataGeometry->GetOutput();
}
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput*
+VISU_PolyDataMapperHolder
+::GetClippedInputPort()
+{
+ return myExtractPolyDataGeometry->GetOutputPort();
+}
+
//----------------------------------------------------------------------------
void
vtkPointSet*
GetClippedInput();
+ virtual
+ vtkAlgorithmOutput*
+ GetClippedInputPort();
+
private:
//----------------------------------------------------------------------------
VISU::PPolyDataIDMapper myPolyDataIDMapper;
SetSourceGeometry();
- myMergeFilter->SetGeometry(myAppendFilter->GetOutput());
+ myMergeFilter->SetGeometryConnection(myAppendFilter->GetOutputPort());
vtkDataSet* aDataSet = GetClippedInput();
- myMergeFilter->SetScalars(aDataSet);
- myMergeFilter->SetVectors(aDataSet);
+ vtkAlgorithmOutput* anAlgorithmOutput = GetClippedInputPort();
+ myMergeFilter->SetScalarsConnection(anAlgorithmOutput);
+ myMergeFilter->SetVectorsConnection(anAlgorithmOutput);
myMergeFilter->RemoveFields();
myMergeFilter->AddField("VISU_FIELD", aDataSet);
myMergeFilter->AddField("VISU_POINTS_MAPPER", aDataSet);
myMergeFilter->AddField("ELNO_POINT_COORDS", aDataSet);
- myElnoAssembleFilter->SetInputData( InsertCustomPL() );
+ myElnoAssembleFilter->SetInputConnection( InsertCustomPL() );
GetDataSetMapper()->SetInputConnection( myElnoAssembleFilter->GetOutputPort() );
}
{
if(IsExternalGeometryUsed()){
ClearGeometry();
- myAppendFilter->AddInputData(GetClippedInput());
+ myAppendFilter->AddInputConnection(GetClippedInputPort());
}
}
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_ScalarMapPL
::InsertCustomPL()
{
- return GetMergedInput();
+ return GetMergedInputPort();
}
}
+//----------------------------------------------------------------------------
+vtkAlgorithmOutput*
+VISU_ScalarMapPL
+::GetMergedInputPort()
+{
+ return myMergeFilter->GetOutputPort();
+}
+
+
//----------------------------------------------------------------------------
vtkPointSet*
GetMergedInput();
+ virtual
+ vtkAlgorithmOutput*
+ GetMergedInputPort();
+
protected:
//----------------------------------------------------------------------------
VISU_ScalarMapPL();
OnCreateMapperHolder();
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
int theDirection)
{
vtkPointSet* aDataSet = theSource? theSource: GetMergedInput();
- //aDataSet->Update(); // OUV_PORTING
vtkIdType aNbOfPoints = aDataSet->GetNumberOfPoints();
vtkDataSet* aPointSet = GetExtractorFilter()->GetOutput();
thePropogationTime,
thePercents);
- // OUV_PORTING: to do
- /*
if (anIsAccepted) {
mySource = theSource;
myPercents = thePercents;
if(VISU::IsDataOnCells(GetMergedInput())){
- myCenters->SetInput(aDataSet);
+ myCenters->SetInputData(aDataSet);
myCenters->VertexCellsOn();
aDataSet = myCenters->GetOutput();
+ myCenters->Update();
}
- myPointsFilter->SetInput(aDataSet);
+ myPointsFilter->SetInputData(aDataSet);
myPointsFilter->SetPercentsOfUsedPoints(thePercents);
aDataSet = myPointsFilter->GetOutput();
- myStream->SetSource(aDataSet);
+ myPointsFilter->Update();
+ myStream->SetSourceData(aDataSet);
myStream->SetIntegrationStepLength(theIntStep);
myStream->SetMaximumPropagationTime(thePropogationTime);
myStream->SetStepLength(theStepLength);
myStream->Modified();
Modified();
}
- */
return anIsAccepted;
}
if(!theDataSet)
return -1.0;
- //theDataSet->Update(); // OUV_PORTING
-
int degree = 0;
double aVolume = 1.0;
double* aBounds = theDataSet->GetBounds();
if(!theDataSet)
return -1.0;
- //theDataSet->Update(); // OUV_PORTING
-
double aLength = theDataSet->GetLength();
double* aBounds = theDataSet->GetBounds();
double aMaxSizeY = (aBounds[3]-aBounds[2])/aLength;
::GetBaseIntegrationStep(vtkDataSet* theDataSet,
double thePercents)
{
- //theDataSet->Update(); // OUV_PORTING
-
double aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
double anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep;
double aMinMax = theDataSet->GetLength() / theDataSet->GetNumberOfPoints();
vtkDataSet* theDataSet,
double thePercents)
{
- //theDataSet->Update(); // OUV_PORTING
-
double aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents);
if(aMinIntegrationStep > theStep)
theStep = aMinIntegrationStep;
if(!theDataSet)
return -1.0;
- //theDataSet->Update(); // OUV_PORTING
double aPropagationTime = theDataSet->GetLength() / GetVelocityCoeff(theDataSet);
return aPropagationTime;
VISU::CellDataToPoint(myStream,
myCellDataToPointData,
- GetMergedInput());
+ GetMergedInput(),
+ GetMergedInputPort());
myGeomFilter->SetInputConnection(myStream->GetOutputPort());
myGeomFilter->ExtentClippingOn();
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_StreamLinesPL
::InsertCustomPL()
{
- return myGeomFilter->GetOutput();
+ return myGeomFilter->GetOutputPort();
}
public:
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
//----------------------------------------------------------------------------
-vtkDataSet*
+vtkAlgorithmOutput*
VISU_VectorsPL
::InsertCustomPL()
{
- return myGlyph->GetOutput();
+ return myGlyph->GetOutputPort();
}
~VISU_VectorsPL();
virtual
- vtkDataSet*
+ vtkAlgorithmOutput*
InsertCustomPL();
virtual
for (mtime=0, this->InputList->InitTraversal(dsit);
(ds = this->InputList->GetNextDataSet(dsit)); )
{
- //ds->Update(); // OUV_PORTING
dsMtime = ds->GetMTime();
if ( dsMtime > mtime )
{
for (mtime=0, this->DataObjectInputList->InitTraversal(doit);
(dobj = this->DataObjectInputList->GetNextDataObject(doit)); )
{
- //dobj->Update(); // OUV_PORTING
dsMtime = dobj->GetMTime();
if ( dsMtime > mtime )
{
double VISU_XYPlotActor::ComputeGlyphScale(int i, int *pos, int *pos2)
{
vtkPolyData *pd=this->LegendActor->GetEntrySymbol(i);
- //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;
VISU::PNamedIDMapper aMapper = aResult->GetInput()->GetMeshOnEntity( myEngine->getMeshName(), myEngine->getEntity() );
vtkDataSetMapper* aPreviewMapper = vtkDataSetMapper::New();
- aPreviewMapper->SetInputData( aMapper->GetOutput() );
+ aPreviewMapper->SetInputConnection( aMapper->GetOutputPort() );
+ aPreviewMapper->Update();
vtkProperty* aProperty = vtkProperty::New();
aProperty->SetColor( 1, 1, 1 );