myGeomFilter = vtkGeometryFilter::New();
myWarpVector = vtkWarpVector::New();
- myCellDataToPointData = vtkCellDataToPointData::New();
- myCellDataToPointData->SetPassCellData(true);
myGlyph = vtkGlyph3D::New();
myGlyph->SetScaleModeToScaleByScalar();
myExtractor->SetInput( myExtractGeometry->GetOutput() );
myFieldTransform->SetInput( myExtractor->GetOutput() );
- myCellDataToPointData->SetInput( myFieldTransform->GetUnstructuredGridOutput() );
-
mySphereSource = vtkSphereSource::New();
mySphereSource->SetThetaResolution( 8 );
mySphereSource->SetPhiResolution( 8 );
for(int i = 0; i < 3; i++)
myPassFilter.push_back(VTKViewer_PassThroughFilter::New());
+
+ // Deformed Shape
+ myPassFilter[0]->SetInput(myFieldTransform->GetUnstructuredGridOutput());
+
+ myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput());
+
+ myGeomFilter->SetInput( myPassFilter[1]->GetOutput() );
+
+ // Geometrical Sphere
+ myPassFilter[2]->SetInput(myGeomFilter->GetOutput());
+
+ myPSMapper->SetInput( myPassFilter[2]->GetPolyDataOutput() );
}
myWarpVector->Delete();
- myCellDataToPointData->Delete();
-
myGlyph->Delete();
mySphereSource->Delete();
SetScale( aScaleFactor / aScalarRange[1] );
else
SetScale(0.0);
-
- // Deformed Shape
- myPassFilter[0]->SetInput(myFieldTransform->GetUnstructuredGridOutput());
-
- myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput());
-
- myGeomFilter->SetInput( myPassFilter[1]->GetOutput() );
-
- // Geometrical Sphere
- myPassFilter[2]->SetInput(myGeomFilter->GetOutput());
-
- myPSMapper->SetInput( myPassFilter[2]->GetPolyDataOutput() );
}
//----------------------------------------------------------------------------
vtkDataSet* aDataSet = myGeomFilter->GetOutput();
unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
- if(myCellDataToPointData->GetInput()){
- aDataSet = myCellDataToPointData->GetOutput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
- }
-
if(GetIsDeformed()){
aDataSet = myWarpVector->GetOutput();
aSize += aDataSet->GetActualMemorySize() * 1024;
if( theIsDeformed )
{
- myCellDataToPointData->SetInput( myPassFilter[0]->GetUnstructuredGridOutput() );
- myWarpVector->SetInput( myCellDataToPointData->GetUnstructuredGridOutput() );
+ myWarpVector->SetInput( myPassFilter[0]->GetUnstructuredGridOutput() );
myPassFilter[1]->SetInput(myWarpVector->GetOutput());
}
else