#include <vtkUnstructuredGridWriter.h>
#include <vtkTimerLog.h>
+#include <vtkUnstructuredGrid.h>
#ifdef _DEBUG_
static int MYDEBUG = 0;
#include "VISU_Convertor_impl.hxx"
#include "VISU_ConvertorUtils.hxx"
#include "VTKViewer_AppendFilter.h"
-#include "VISU_MergeFilter.hxx"
#include "VTKViewer_CellLocationsArray.h"
+#include "VISU_MergeFilter.hxx"
#include <vtkPoints.h>
#include <vtkUnstructuredGrid.h>
#include <vtkCellData.h>
#include <vtkCellLinks.h>
-
#include <qstring.h>
#include <qfileinfo.h>
static int MYVTKDEBUG = 0;
#ifdef _DEBUG_
-static int MYDEBUG = 1;
+static int MYDEBUG = 0;
static int MYDEBUGWITHFILES = 0;
//#define _DEXCEPT_
#else
const TVTKSource& aSource = mySource.GetSource();
TDataSet* aDataSet = aSource.GetPointer();
aDataSet->ShallowCopy(aGeometry);
-
const TVTKMergeFilter& aFilter = GetFilter();
aFilter->SetGeometry(aGeometry);
aFilter->SetScalars(aDataSet);
int aNbTuples = theField->myDataSize/theField->myNbComp;
std::string aFieldName = GenerateFieldName(theField,theValForTime);
- vtkDataSetAttributes* aDataSetAttributes;
- switch(theEntity){
- case VISU::NODE_ENTITY :
- aDataSetAttributes = theSource->GetPointData();
- break;
- default:
- aDataSetAttributes = theSource->GetCellData();
- }
-
int aNbComp = theField->myNbComp;
- vtkFloatArray *aFloatArray = vtkFloatArray::New();
- switch(aNbComp) {
+ vtkFloatArray *aFloatArray = vtkFloatArray::New();
+ switch(aNbComp){
case 1:
aFloatArray->SetNumberOfComponents(1);
- aDataSetAttributes->SetScalars(aFloatArray);
break;
default:
aFloatArray->SetNumberOfComponents(3);
- aDataSetAttributes->SetVectors(aFloatArray);
}
aFloatArray->SetNumberOfTuples(aNbTuples);
aFloatArray->SetName(aFieldName.c_str());
aDataArray->SetNumberOfComponents(aNbComp);
aDataArray->SetNumberOfTuples(aNbTuples);
aDataArray->SetName("VISU_FIELD");
- aDataSetAttributes->AddArray(aDataArray);
INITMSG(MYDEBUG,"GetTimeStampOnProfile "<<
"- theEntity = "<<theEntity<<
endl);
int aSize = max(3,aNbComp);
- TVector<float> aDataValues(aSize,0.0);
+ TVector<vtkFloatingPointType> aDataValues(aSize,0.0);
TGeom2Value& aGeom2Value = theValForTime->myGeom2Value;
TGeom2Value::const_iterator anIter = aGeom2Value.begin();
aDataArray->SetTuple(aTupleId,&aDataValues[0]);
}
}
+
+ vtkDataSetAttributes* aDataSetAttributes;
+ switch(theEntity){
+ case VISU::NODE_ENTITY :
+ aDataSetAttributes = theSource->GetPointData();
+ break;
+ default:
+ aDataSetAttributes = theSource->GetCellData();
+ }
+
+ switch(aNbComp) {
+ case 1:
+ aDataSetAttributes->SetScalars(aFloatArray);
+ break;
+ default:
+ aDataSetAttributes->SetVectors(aFloatArray);
+ }
+
+ aDataSetAttributes->AddArray(aDataArray);
+
aFloatArray->Delete();
aDataArray->Delete();
+
}
#include <vtkObjectFactory.h>
#include <vtkIdList.h>
#include <vtkCell.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
using namespace std;
}
}
-void VISU_ExtractUnstructuredGrid::Execute(){
- vtkUnstructuredGrid *anInput = this->GetInput(), *anOutput = this->GetOutput();
+int VISU_ExtractUnstructuredGrid::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
+ vtkUnstructuredGrid *anInput = vtkUnstructuredGrid::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
+
vtkIdType aNbCells = anInput->GetNumberOfCells();
anOutput->Allocate(aNbCells);
MSG(MYDEBUG,"Execute - anInput->GetNumberOfCells() = "<<anInput->GetNumberOfCells());
aCellIds->Delete();
anOutput->SetPoints(anInput->GetPoints());
MSG(MYDEBUG,"Execute - anOutput->GetNumberOfCells() = "<<anOutput->GetNumberOfCells());
+
+ return 1;
}
VISU_ExtractUnstructuredGrid();
~VISU_ExtractUnstructuredGrid();
- void Execute();
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
std::set<vtkIdType> myRemovedCellIds;
std::set<vtkIdType> myRemovedCellTypes;
using MED::EBooleen;
#ifdef _DEBUG_
-static int MYDEBUG = 1;
-static int MYVALUEDEBUG = 1;
-static int MY_FAMILY_DEBUG = 1;
-static int MY_GROUP_DEBUG = 1;
+static int MYDEBUG = 0;
+static int MYVALUEDEBUG = 0;
+static int MY_FAMILY_DEBUG = 0;
+static int MY_GROUP_DEBUG = 0;
//#define _DEXCEPT_
#else
static int MYDEBUG = 0;
#include "VISU_PipeLine.hxx"
#include "VTKViewer_ShrinkFilter.h"
#include "VTKViewer_GeometryFilter.h"
-#include "VTKViewer_PassThroughFilter.h"
#include <stdexcept>
#include <sstream>
#include <vtkDataSet.h>
#include <vtkPolyData.h>
#include <vtkUnstructuredGrid.h>
+#include <vtkPassThroughFilter.h>
#include <vtkShrinkFilter.h>
#include <vtkShrinkPolyData.h>
#include "VTKViewer_Transform.h"
#include "VTKViewer_TransformFilter.h"
-#include "VTKViewer_PassThroughFilter.h"
#include <vtkObjectFactory.h>
#include <vtkPolyData.h>
#include <vtkTextProperty.h>
#include <vtkProperty.h>
#include <vtkTexture.h>
+#include <vtkPassThroughFilter.h>
#include "utilities.h"
myTransformFilter->Delete();
for(int i = 0; i < 3; i++){
- PPassThroughFilter aFilter(VTKViewer_PassThroughFilter::New());
+ PPassThroughFilter aFilter(vtkPassThroughFilter::New());
myPassFilter.push_back(aFilter);
aFilter->Delete();
}
class VTKViewer_Transform;
class VTKViewer_TransformFilter;
-class VTKViewer_PassThroughFilter;
class VISU_OpenGLPointSpriteMapper;
class VISU_GaussPointsPL;
+class vtkPassThroughFilter;
//============================================================================
class VISU_GaussPtsDeviceActor: public vtkLODActor
vtkSmartPointer<VTKViewer_GeometryFilter> myGeomFilter;
vtkSmartPointer<VTKViewer_TransformFilter> myTransformFilter;
- typedef vtkSmartPointer<VTKViewer_PassThroughFilter> PPassThroughFilter;
+ typedef vtkSmartPointer<vtkPassThroughFilter> PPassThroughFilter;
std::vector<PPassThroughFilter> myPassFilter;
VISU_GaussPtsDeviceActor();
#include "VISU_VectorsAct.h"
#include "VISU_VectorsPL.hxx"
-#include "VTKViewer_PassThroughFilter.h"
// VTK Includes
#include <vtkObjectFactory.h>
#include <vtkDataSetMapper.h>
#include <vtkPolyDataMapper.h>
#include <vtkPolyData.h>
-
+#include <vtkPassThroughFilter.h>
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_VectorsAct);
$(GUI_LDFLAGS) \
$(MED_LDFLAGS)
-LDFLAGSFORBIN=$(LDFLAGS) -lOpUtil -lMEDWrapper -lMEDWrapper_V2_2 -lMEDWrapper_V2_1 -lMEDWrapperBase -lmed_V2_1 -lsuit -lqtx -lSALOMEBasics
+LDFLAGSFORBIN=$(LDFLAGS) -lOpUtil -lMEDWrapper -lMEDWrapper_V2_2 -lMEDWrapper_V2_1 -lMEDWrapperBase -lmed_V2_1 -lsuit -lqtx -lSALOMEBasics -lvtkWidgets
@CONCLUDE@
#include <vtkObjectFactory.h>
#include <vtkPointData.h>
#include <vtkUnstructuredGrid.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
#include <vtkImplicitBoolean.h>
#include <vtkImplicitFunctionCollection.h>
//----------------------------------------------------------------------------
-void
+int
SALOME_ExtractGeometry
-::Execute()
+::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
{
+ vtkInformation* aRequest;
+
+ // get the info objects
+ vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkDataSet *input = vtkDataSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *output = vtkUnstructuredGrid::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+ //cout << "SALOME_ExtractGeometry::input"<<endl;input->Print(cout);
myElemVTK2ObjIds.clear();
myNodeVTK2ObjIds.clear();
//
}
if(myIsDoneShallowCopy){
- GetOutput()->ShallowCopy(GetInput());
+ output->ShallowCopy(input);
Modified();
- return;
+ return 1;
}
- Execute2();
+ return RequestData2(aRequest,inputVector,outputVector);
}
-void
+int
SALOME_ExtractGeometry
-::Execute2()
+::RequestData2(
+ 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 *input = vtkDataSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *output = vtkUnstructuredGrid::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
vtkIdType ptId, numPts, numCells, i, cellId, newCellId, newId, *pointMap;
vtkIdList *cellPts;
vtkCell *cell;
vtkFloatingPointType multiplier;
vtkPoints *newPts;
vtkIdList *newCellPts;
- vtkDataSet *input = this->GetInput();
vtkPointData *pd = input->GetPointData();
vtkCellData *cd = input->GetCellData();
- vtkUnstructuredGrid *output = this->GetOutput();
vtkPointData *outputPD = output->GetPointData();
vtkCellData *outputCD = output->GetCellData();
int npts;
if ( ! this->ImplicitFunction )
{
vtkErrorMacro(<<"No implicit function specified");
- return;
+ return 0;
}
newCellPts = vtkIdList::New();
}
output->Squeeze();
+
+ return 1;
}
SALOME_ExtractGeometry();
~SALOME_ExtractGeometry();
- virtual void Execute();
- void Execute2();
+ // Usual data generation method
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+ virtual int RequestData2(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
private:
bool myStoreMapping;
#include "VISU_Convertor.hxx"
#include "VISU_MeshPL.hxx"
#include "VISU_ScalarMapPL.hxx"
+#include "VISU_PrsMergerPL.hxx"
#include "VISU_IsoSurfacesPL.hxx"
#include "VISU_CutPlanesPL.hxx"
#include "VISU_CutLinesPL.hxx"
#include "VISU_GaussPointsPL.hxx"
#include "VISU_Plot3DPL.hxx"
-typedef VISU_GaussPointsPL TPresent;
+typedef VISU_ScalarMapPL TPresent;
#include <vtkUnstructuredGrid.h>
#include <vtkDataSetMapper.h>
#include <vtkRenderer.h>
#include <vtkCamera.h>
#include <vtkActor.h>
+#include <vtk3DWidget.h>
#include <vtkProperty.h>
static int isOnlyMesh = false;
-int main(int argc, char** argv)
-{
- try {
- if(argc > 1)
- {
+int main(int argc, char** argv){
+ try{
+ if(argc > 1){
vtkRenderWindow *renWin = vtkRenderWindow::New();
vtkRenderer *ren = vtkRenderer::New();
renWin->AddRenderer(ren);
const VISU::PMesh aMesh = aMeshMapIter->second;
const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
VISU::TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter;
- if(isOnlyMesh)
- {
- const VISU::TEntity& anEntity = VISU::CELL_ENTITY;
- aMeshOnEntityMapIter = aMeshOnEntityMap.find(anEntity);
+ if(isOnlyMesh){
+ const VISU::TEntity& anEntity = VISU::CELL_ENTITY;
+ aMeshOnEntityMapIter = aMeshOnEntityMap.find(anEntity);
- VISU::PIDMapper anIDMapper =
- aConvertor->GetMeshOnEntity(aMeshName,anEntity);
- VISU::TVTKOutput* aDataSet = anIDMapper->GetVTKOutput();
+ VISU::PIDMapper anIDMapper =
+ aConvertor->GetMeshOnEntity(aMeshName,anEntity);
+ VISU::TVTKOutput* aDataSet = anIDMapper->GetVTKOutput();
- VISU_MeshPL* aPresent = VISU_MeshPL::New();
- aPresent->SetInput(aDataSet);
- aPresent->Build();
+ VISU_MeshPL* aPresent = VISU_MeshPL::New();
+ aPresent->SetInput(aDataSet);
+ aPresent->Build();
- vtkActor* aActor = vtkActor::New();
- aActor->SetMapper(aPresent->GetMapper());
- aActor->GetProperty()->SetRepresentation(VTK_WIREFRAME);
- //ren->ResetCameraClippingRange();
+ vtkActor* aActor = vtkActor::New();
+ aActor->SetMapper(aPresent->GetMapper());
+ aActor->GetProperty()->SetRepresentation(VTK_WIREFRAME);
+ //ren->ResetCameraClippingRange();
- ren->AddActor(aActor);
+ ren->AddActor(aActor);
- renWin->Render();
- iren->Start();
- return 0;
+ renWin->Render();
+ iren->Start();
+ return 0;
}
//Import fields
aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
+ cout << "Input iteration:";
+ int aIter;
+ cin >> aIter;
+ int aCount = 0;
for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++) {
const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
const VISU::PMeshOnEntity aMeshOnEntity = aMeshOnEntityMapIter->second;
const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
VISU::TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
- for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++){
+ for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++,aCount++){
const VISU::PField aField = aFieldMapIter->second;
- /*
- if(aField->myNbComp == 1)
+ if(aCount != aIter)
continue;
- */
+// if(aField->myNbComp == 1)
+// continue;
const string& aFieldName = aFieldMapIter->first;
const VISU::TValField& aValField = aField->myValField;
VISU::TValField::const_iterator aValFieldIter = aValField.begin();
int aTimeStamp = aValFieldIter->first;
TPresent* aPresent = TPresent::New();
- VISU::PIDMapper anIDMapper;
- if(anEntity != VISU::NODE_ENTITY){
- VISU::PGaussPtsIDMapper aGaussPtsIDMapper = aConvertor->GetTimeStampOnGaussPts(aMeshName,anEntity,aFieldName,aTimeStamp);
- aPresent->SetGaussPtsIDMapper(aGaussPtsIDMapper);
- }else{
- continue;
- VISU::PIDMapper anIDMapper = aConvertor->GetTimeStampOnMesh(aMeshName,anEntity,aFieldName,aTimeStamp);
- aPresent->SetIDMapper(anIDMapper);
- }
+ VISU::PIDMapper anIDMapper = aConvertor->GetTimeStampOnMesh(aMeshName,anEntity,aFieldName,aTimeStamp);
+ aPresent->SetIDMapper(anIDMapper);
aPresent->Build();
aPresent->Init();
strcat( anAlphaTexture, "/share/salome/resources/visu/sprite_alpha.vti" );
//cout << anAlphaTexture << endl;
- vtkSmartPointer<vtkImageData> aTextureValue = VISU_GaussPointsPL::MakeTexture( aMainTexture, anAlphaTexture );
- aPresent->SetImageData( aTextureValue.GetPointer() );
-
aPresent->Update();
-
+
vtkActor* anActor = vtkActor::New();
anActor->SetMapper(aPresent->GetMapper());
}
}
}
- }
- catch(std::exception& exc){
+ }catch(std::exception& exc){
MESSAGE("Follow exception was occured :\n"<<exc.what());
- }
- catch(...){
+ }catch(...){
MESSAGE("Unknown exception was occured in VISU_Convertor_impl");
}
return 1;
VISU_CutPlanesPL
::ClearAppendPolyData(vtkAppendPolyData *theAppendPolyData)
{
- int iEnd = theAppendPolyData->GetNumberOfInputs();
- for(int i = iEnd-1; i >= 0; i--)
- theAppendPolyData->RemoveInput(theAppendPolyData->GetInput(i));
+ theAppendPolyData->RemoveAllInputs();
}
vtkFloatingPointType*
VISU_DeformedShapePL
::~VISU_DeformedShapePL()
{
- myWarpVector->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myWarpVector->UnRegisterAllOutputs();
myWarpVector->Delete();
- myCellDataToPointData->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myCellDataToPointData->UnRegisterAllOutputs();
myCellDataToPointData->Delete();
}
#include <vtkPointData.h>
#include <vtkCellData.h>
#include <vector>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
+
using namespace std;
}
}
-template<typename TypeData> void
+template<typename TypeData> int
execute(int theNbElems,
int theScalarMode,
TypeData* theInputData,
TypeData* theOutputData)
{
if(theNbElems < 1 )
- return;
- vtkDataArray* aFieldArray = theInputData->GetArray("VISU_FIELD");
+ return 0;
+
+ if(theInputData->GetNumberOfArrays() < 1)
+ return 1; // no fields output
+
+ string aFieldName = "VISU_FIELD";
+ vtkDataArray* aFieldArray = theInputData->GetArray(aFieldName.c_str());
if(vtkFloatArray *aFloatArray = dynamic_cast<vtkFloatArray*>(aFieldArray)){
int aNbComp = aFloatArray->GetNumberOfComponents();
std::vector<vtkFloatingPointType> anArray(aNbComp < 3? 3: aNbComp);
theOutputData->SetScalars(aScalars);
aScalars->Delete();
}
+ return 1;
}
-void VISU_Extractor::Execute(){
- vtkDataSet *input = this->GetInput(), *output = this->GetOutput();
+// waiting for porting vtkSource to the new executive-based pipeline architecture.
+// int VISU_Extractor::RequestData(
+// vtkInformation *vtkNotUsed(request),
+// vtkInformationVector **inputVector,
+// vtkInformationVector *outputVector)
+void VISU_Extractor::Execute()
+{
+ int aRet = 1;
+// waiting for porting vtkSource to the new executive-based pipeline architecture.
+// // get the info objects
+// vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+// vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+// // get the input and ouptut
+// vtkDataSet *input = vtkDataSet::SafeDownCast(
+// inInfo->Get(vtkDataObject::DATA_OBJECT()));
+// vtkDataSet *output = vtkDataSet::SafeDownCast(
+// outInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkDataSet *input = this->GetInput();
+ vtkDataSet *output = this->GetOutput();
output->CopyStructure(input);
output->GetPointData()->CopyAllOff();
output->GetCellData()->CopyAllOff();
int aNbElems = input->GetNumberOfPoints();
vtkPointData *inData = input->GetPointData(), *outData = output->GetPointData();
if(!inData->GetAttribute(vtkDataSetAttributes::SCALARS))
- execute(aNbElems,myScalarMode,inData,outData);
+ aRet = execute(aNbElems,myScalarMode,inData,outData);
else
output->GetPointData()->CopyScalarsOn();
outData->PassData(inData);
int aNbElems = input->GetNumberOfCells();
vtkCellData *inData = input->GetCellData(), *outData = output->GetCellData();
if(inData->GetAttribute(vtkDataSetAttributes::VECTORS))
- execute(aNbElems,myScalarMode,inData,outData);
+ aRet = execute(aNbElems,myScalarMode,inData,outData);
else
output->GetCellData()->CopyScalarsOn();
outData->PassData(inData);
outData->AddArray(inData->GetArray("VISU_FIELD"));
}
+
+ // return aRet;
}
VISU_Extractor(const VISU_Extractor&);
~VISU_Extractor();
+ // waiting for porting vtkSource to the new executive-based pipeline architecture.
+ //virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
virtual void Execute();
int myScalarMode;
#include <vtkCellData.h>
#include <vtkDataSet.h>
#include <vtkMath.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
static vtkFloatingPointType Tolerance = 1.0 / VTK_LARGE_FLOAT;
}
-void
-VISU_FieldTransform
-::Update()
-{
- vtkSource::Update();
-}
-
unsigned long
VISU_FieldTransform
::GetMTime()
aNewScalars->Delete();
}
-void
+// waiting for porting vtkSource to the new executive-based pipeline architecture.
+int
VISU_FieldTransform
-::Execute()
+::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
+// void VISU_FieldTransform::Execute()
{
- vtkDataSet *input = this->GetInput(), *output = this->GetOutput();
+ // get the info objects
+ vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkDataSet *input = vtkDataSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkDataSet *output = vtkDataSet::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+// vtkDataSet *input = this->GetInput();
+// vtkDataSet *output = this->GetOutput();
+
output->CopyStructure(input);
if(myFunction != &Ident || (myTransform && !myTransform->IsIdentity())){
output->GetPointData()->CopyAllOff();
output->GetPointData()->PassData(input->GetPointData());
output->GetCellData()->PassData(input->GetCellData());
}
+
+ return 1;
}
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
-// File : VISU_Extractor.hxx
+// File : VISU_FieldTransform.hxx
// Author : Alexey PETROV
// Module : VISU
#ifndef VISU_FieldTransform_HeaderFile
#define VISU_FieldTransform_HeaderFile
-#include <vtkDataSetToDataSetFilter.h>
+#include <vtkDataSetAlgorithm.h>
#include "VTKViewer.h"
class VTKViewer_Transform;
-class VTK_EXPORT VISU_FieldTransform : public vtkDataSetToDataSetFilter
+class VTK_EXPORT VISU_FieldTransform : public vtkDataSetAlgorithm
{
public:
- vtkTypeMacro(VISU_FieldTransform,vtkDataSetToDataSetFilter);
+ vtkTypeMacro(VISU_FieldTransform,vtkDataSetAlgorithm);
static VISU_FieldTransform *New();
- virtual void Update();
virtual unsigned long GetMTime();
static double Ident(double theArg);
protected:
VISU_FieldTransform();
virtual ~VISU_FieldTransform();
+
+ // waiting for porting vtkSource to the new executive-based pipeline architecture.
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+ // virtual void Execute();
+
VISU_FieldTransform(const VISU_FieldTransform&) {};
void operator=(const VISU_FieldTransform&) {};
- void Execute();
+
VTKViewer_Transform *myTransform;
TTransformFun myFunction;
#include "SALOME_ExtractGeometry.h"
#include "VISU_DeformedShapePL.hxx"
#include "VISU_OpenGLPointSpriteMapper.hxx"
-#include "VTKViewer_PassThroughFilter.h"
#include <vtkPointSource.h>
#include <vtkElevationFilter.h>
#include <vtkWarpVector.h>
#include <vtkGlyph3D.h>
#include <vtkSphereSource.h>
+#include <vtkPassThroughFilter.h>
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_GaussPointsPL);
myGlyph->SetSource( mySphereSource->GetOutput() );
for(int i = 0; i < 2; i++)
- myPassFilter.push_back(VTKViewer_PassThroughFilter::New());
+ myPassFilter.push_back(vtkPassThroughFilter::New());
}
::GetNodeCoord(int theObjID)
{
vtkIdType anID = GetNodeVTKID(theObjID);
- vtkDataSet* aDataSet = myGeomFilter->GetInput();
+ vtkDataSet* aDataSet = myGeomFilter->GetPolyDataInput(0);
return aDataSet->GetPoint(anID);
}
#include <vector>
-class VTKViewer_PassThroughFilter;
class VISU_OpenGLPointSpriteMapper;
class vtkGeometryFilter;
class vtkDataArray;
class vtkImageData;
class vtkPointSet;
+class vtkPassThroughFilter;
class vtkCellDataToPointData;
class vtkWarpVector;
vtkFloatingPointType myScaleFactor;
vtkWarpVector *myWarpVector;
vtkCellDataToPointData* myCellDataToPointData;
- std::vector<VTKViewer_PassThroughFilter*> myPassFilter;
+ std::vector<vtkPassThroughFilter*> myPassFilter;
vtkGlyph3D* myGlyph;
vtkSphereSource* mySphereSource;
VISU_IsoSurfacesPL
::~VISU_IsoSurfacesPL()
{
- myContourFilter->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myContourFilter->UnRegisterAllOutputs();
myContourFilter->Delete();
- myCellDataToPointData->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myCellDataToPointData->UnRegisterAllOutputs();
myCellDataToPointData->Delete();
}
#include "VISU_OpenGLPointSpriteMapper.hxx"
-#include <SVTK_Extension.h>
+#include "SVTK_Extension.h"
#include <vtkCamera.h>
#include <vtkCellArray.h>
{
if(theInput)
theInput->Update();
-
myExtractGeometry->SetInput(theInput);
myInput = theInput;
#include "VISU_PrsMergerPL.hxx"
#include "VISU_MeshPL.hxx"
#include "VISU_ScalarMapPL.hxx"
-#include "VISU_MergeFilter.hxx"
#include "VISU_IDMapper.hxx"
#include "VTKViewer_AppendFilter.h"
{
myScalars = NULL;
- //myMergeFilter->Delete();
myMeshGeometryList.clear();
}
#include <vtkLookupTable.h>
#include <vtkTextProperty.h>
#include <vtkScalarBarActor.h>
-#include <vtkIdType.h>
+#include <vtkType.h>
#include <string.h>
#include "VISU_PipeLineUtils.hxx"
#include "VTKViewer_TransformFilter.h"
#include "VTKViewer_Transform.h"
+#include "VISU_MergeFilter.hxx"
#include <vtkWarpVector.h>
-#include <vtkMergeFilter.h>
+
#include <vtkUnstructuredGrid.h>
#include <vtkCellDataToPointData.h>
#include <vtkPointDataToCellData.h>
::VISU_ScalarMapOnDeformedShapePL()
{
myDeformVectors = vtkWarpVector::New();
- myMergeFilter = vtkMergeFilter::New();
+ myMergeFilter = VISU_MergeFilter::New();
myExtractorScalars = VISU_Extractor::New();
myCellDataToPointData = vtkCellDataToPointData::New();
}
VISU_ScalarMapOnDeformedShapePL
::~VISU_ScalarMapOnDeformedShapePL()
{
- myDeformVectors->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myDeformVectors->UnRegisterAllOutputs();
myDeformVectors->Delete();
- myMergeFilter->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myMergeFilter->UnRegisterAllOutputs();
myMergeFilter->Delete();
- myExtractorScalars->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myExtractorScalars->UnRegisterAllOutputs();
myExtractorScalars->Delete();
- myCellDataToPointData->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myCellDataToPointData->UnRegisterAllOutputs();
myCellDataToPointData->Delete();
}
#include "VISUPipeline.hxx"
#include "VISU_PrsMergerPL.hxx"
-class vtkMergeFilter;
+class VISU_MergeFilter;
class vtkWarpVector;
class vtkUnstructuredGrid;
class vtkCellDataToPointData;
protected:
vtkFloatingPointType myScaleFactor;
vtkWarpVector *myDeformVectors;
- vtkMergeFilter *myMergeFilter;
+ VISU_MergeFilter *myMergeFilter;
vtkSmartPointer<vtkUnstructuredGrid> myScalars;
VISU_Extractor* myExtractorScalars;
vtkCellDataToPointData* myCellDataToPointData;
}
VISU_StreamLinesPL::~VISU_StreamLinesPL(){
- myPointsFilter->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myPointsFilter->UnRegisterAllOutputs();
myPointsFilter->Delete();
- myCenters->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myCenters->UnRegisterAllOutputs();
myCenters->Delete();
- myGeomFilter->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myGeomFilter->UnRegisterAllOutputs();
myGeomFilter->Delete();
- myStream->UnRegisterAllOutputs();
+ // commented: porting to vtk5.0
+ // myStream->UnRegisterAllOutputs();
myStream->Delete();
}
myMapper->RemoveAllInputs();
myMapper->Delete();
- myPlaneSource->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ //myPlaneSource->UnRegisterAllOutputs();
myPlaneSource->Delete();
}
~TPlane() {
myMapper->RemoveAllInputs();
myMapper->Delete();
- myPlaneSource->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ //myPlaneSource->UnRegisterAllOutputs();
myPlaneSource->Delete();
};
// Not implemented.
aTitle = aTitle.simplifyWhiteSpace();
aTableOfReal->SetTitle(aTitle.latin1());
- int iLineEnd = myCutLinesPL->GetAppendPolyData()->GetNumberOfInputs();
+ int iLineEnd = myCutLinesPL->GetAppendPolyData()->GetNumberOfInputConnections(0);
if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal iLineEnd = "<<iLineEnd);
TXCont aXCont;
TXYMapCont aXYMapCont;
aXYMap[aDist] = aScalars->GetTuple1(i);
}
if(aFilter){
- aFilter->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ //aFilter->UnRegisterAllOutputs();
aFilter->Delete();
}
}
VISU::StreamLines_i::~StreamLines_i(){
if(MYDEBUG) MESSAGE("StreamLines_i::~StreamLines_i()");
- myAppendFilter->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ //myAppendFilter->UnRegisterAllOutputs();
myAppendFilter->Delete();
}
vtkPointSet* aSource = NULL;
if(!thePrs3d->_is_nil())
if((aPrs3di = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(thePrs3d).in()))){
- for(int i = myAppendFilter->GetNumberOfInputs()-1; i >= 0; i--)
+ for(int i = myAppendFilter->GetNumberOfInputConnections(0)-1; i >= 0; i--)
myAppendFilter->RemoveInput(myAppendFilter->GetInput(i));
myAppendFilter->AddInput(aPrs3di->GetPL()->GetMapper()->GetInput());
aSource = myAppendFilter->GetOutput();