[vtkusers] How to use vtkCellDerivatives with unstructured grid image
Seth Gilchrist
seth at mech.ubc.ca
Mon Jun 13 16:43:17 EDT 2011
Hello,
I have the unstructured grid image printed at end of this email, with two
point data sets "Dispamcement" (vectors) and "Optimizer Value" (scalors). I
want to use vtkCellDerivatives to calculate the strain tensors from the
"Displacement" point data. I can't figure out how to input the data into
vtkCellDerivatives. I have tried:
vtkCellDerivatives *dCalc = vtkCellDerivatives::New();
dCalc->SetTensorModeToComputeStrain();
dCalc->SetInput( image->GetPointData()->GetArray("Displacement") );
dCalc->Update();
and
vtkCellDerivatives *dCalc = vtkCellDerivatives::New();
dCalc->SetTensorModeToComputeStrain();
dCalc->SetInput(image);
dCalc->SetInputArrayToProcess( [uh...I get lost here, I've tried a lot of
things] );
dCalc->Update();
I either can't get it to compile, or the output of the filter is the same as
the input.
Can anybody point me in the right direction?
Thanks,
Seth
The cells in the image are quadratic tets.
image->Print( std::cout )...
vtkUnstructuredGrid (0x10f1150)
Debug: Off
Modified Time: 268
Reference Count: 1
Registered Events: (none)
Source: (none)
Information: 0x10e6130
Data Released: False
Global Release Data: Off
UpdateTime: 269
Release Data: Off
UpdateExtent: Not Initialized
Update Number Of Pieces: 1
Update Piece: 0
Update Ghost Level: 0
MaximumNumberOfPieces: 1
RequestExactExtent: Off
Field Data:
Debug: Off
Modified Time: 252
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Number Of Points: 81
Number Of Cells: 30
Cell Data:
Debug: Off
Modified Time: 259
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Copy Tuple Flags: ( 1 1 1 1 1 0 1 )
Interpolate Flags: ( 1 1 1 1 1 0 0 )
Pass Through Flags: ( 1 1 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
GlobalIds: (none)
PedigreeIds: (none)
Point Data:
Debug: Off
Modified Time: 268
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 2
Array 0 name = Displacement
Array 1 name = Optimizer Value
Number Of Components: 4
Number Of Tuples: 81
Copy Tuple Flags: ( 1 1 1 1 1 0 1 )
Interpolate Flags: ( 1 1 1 1 1 0 0 )
Pass Through Flags: ( 1 1 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
GlobalIds: (none)
PedigreeIds: (none)
Bounds:
Xmin,Xmax: (57.5, 67.3)
Ymin,Ymax: (45.7, 56.7)
Zmin,Zmax: (41.7, 59.1)
Compute Time: 283
Number Of Points: 81
Point Coordinates: 0x10e7890
Locator: 0
Number Of Pieces: 1
Piece: 0
Ghost Level: 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110613/17aa3a74/attachment.htm>
More information about the vtkusers
mailing list