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] )
309 this->
TreeNode.Visible = iVisibility;
310 this->
TreeNode.SetActorVisibility( iVisibility );
319 this->
TreeNode.SetActorProperties(iProperty);
320 this->
TreeNode.Highlighted = iHighlight;
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));
370 this->
TreeNode.Nodes->GetPointData()->AddArray(iArray);
382 this->
TreeNode.Nodes = vtkPolyData::New();
384 this->
TreeNode.Nodes->DeepCopy( iNode );
virtual void ReleaseData() const
bool DeleteElement(const unsigned int &iTime)
Delete the point at the current time point.
GoFigureTrackAttributes ComputeAttributes() const
PointsMapType::const_iterator PointsMapConstIterator
void ModifyDivisionHighlight(vtkProperty *iProperty, const bool &iHighlight)
void UpdateTracksRepresentation(const double &iRadius, const double &iRadius2) const
void AddVolume(const double &iVolume)
const bool IsLeaf() const
void CreateDivisionNode(vtkPolyData *iNode)
TreeNodeStructure< Self > TreeNode
Structure which represent a track, and used for interaction between Visualization and TableWidget...
void ModifyDivisionColorData(const double *iColor)
PointsMapType::iterator PointsMapIterator
void ModifyDivisionVisibility(const bool &iVisibility)
bool InsertElement(const unsigned int &iTime, double *iPoint)
Insert a point at the current time point.
void UpdateLineWidth(const double &iWidth) const
void AddDivisionArray(vtkIntArray *iArray)
void ModifyDivisionColorActor(const double *iColor)
const bool IsRoot() const
Structure which represent a trace (contour, mesh, track, lineage), and used for interaction between V...