38 #include "vtkPolyData.h"
41 #include "vtkDoubleArray.h"
42 #include "vtkPointData.h"
44 #include "vtkProperty.h"
46 #include "vtkSphereSource.h"
47 #include "vtkGlyph3D.h"
48 #include "vtkTubeFilter.h"
49 #include "vtkAppendPolyData.h"
61 TraceStructure(iE), TreeNode(iE.TreeNode), PointsMap(iE.PointsMap),
62 m_AverageVolume(iE.m_AverageVolume)
83 std::pair< unsigned int, double * >(iTime, iPoint) );
98 if ( pointsMapIterator != this->
PointsMap.end() )
101 delete[] pointsMapIterator->second;
103 this->
PointsMap.erase(pointsMapIterator);
122 while ( begin != end )
124 delete[] begin->second;
140 vtkProperty*
property = this->
ActorXY->GetProperty();
144 property->SetLineWidth( iWidth );
149 vtkProperty*
property = this->
ActorXZ->GetProperty();
153 property->SetLineWidth( iWidth );
158 vtkProperty*
property = this->
ActorYZ->GetProperty();
162 property->SetLineWidth( iWidth );
167 vtkProperty*
property = this->
ActorXYZ->GetProperty();
171 property->SetLineWidth( iWidth );
181 const double& iRadius2)
const
183 vtkSmartPointer< vtkAppendPolyData > apd =
184 vtkSmartPointer< vtkAppendPolyData >::New();
185 apd->AddInput(this->
Nodes);
189 vtkSmartPointer< vtkSphereSource > sphere =
190 vtkSmartPointer< vtkSphereSource >::New();
191 sphere->SetThetaResolution(8);
192 sphere->SetPhiResolution(8);
193 sphere->SetRadius(iRadius);
195 vtkSmartPointer< vtkGlyph3D > glyph =
196 vtkSmartPointer< vtkGlyph3D >::New();
197 glyph->SetInput(this->
Nodes);
198 glyph->SetSource( sphere->GetOutput() );
201 apd->AddInput( glyph->GetOutput() );
206 vtkSmartPointer< vtkTubeFilter > tube =
207 vtkSmartPointer< vtkTubeFilter >::New();
208 tube->SetNumberOfSides(8);
209 tube->SetInput(this->
Nodes);
210 tube->SetRadius(iRadius2);
213 apd->AddInput( tube->GetOutput() );
218 this->
Nodes->DeepCopy( apd->GetOutput() );
237 unsigned int tmin = it->first;
238 unsigned int t0 = tmin;
239 unsigned int t1 = tmin;
240 double *org = it->second;
241 double *p = it->second;
242 double *q = it->second;
247 vtkDoubleArray *newArray =
248 dynamic_cast< vtkDoubleArray *
>( this->
Nodes->GetPointData()->GetArray(
"SpeedInformation") );
250 newArray->InsertNextValue(0.0);
256 oAttributes.
distance = sqrt( vtkMath::Distance2BetweenPoints(p, q) );
259 oAttributes.
distance / ( static_cast< double >( t1 - t0 ) ) );
261 double speed = oAttributes.
distance / (
static_cast< double >( t1 - t0 ) );
262 newArray->InsertNextValue(speed);
277 /
static_cast< double >( t1 - tmin );
280 oAttributes.
distance = sqrt( vtkMath::Distance2BetweenPoints(org, q) );
284 oAttributes.
theta = vtkMath::DegreesFromRadians( atan2( ( q[1] - org[1] ),
285 ( q[0] - org[0] ) ) );
286 oAttributes.
phi = vtkMath::DegreesFromRadians( acos( ( q[2] - org[2] )
343 this->
TreeNode.
ActorXY->GetProperty()->SetColor(const_cast<double*>(iColor));
347 this->
TreeNode.
ActorXZ->GetProperty()->SetColor(const_cast<double*>(iColor));
351 this->
TreeNode.
ActorYZ->GetProperty()->SetColor(const_cast<double*>(iColor));
355 this->
TreeNode.
ActorXYZ->GetProperty()->SetColor(const_cast<double*>(iColor));