40 #include "vtkPointData.h"
41 #include "vtkPolyLine.h"
42 #include "vtkCellArray.h"
45 #include "vtkGlyph3D.h"
46 #include "vtkSphereSource.h"
47 #include "vtkTubeFilter.h"
48 #include "vtkAppendPolyData.h"
56 #include "vtkLookupTable.h"
58 #include "vtkStringArray.h"
80 MultiIndexContainerType::iterator it =
m_Container.begin();
109 assert ( iIter !=
m_Container.get< TraceID >().end() );
112 if ( iIter->ActorXY )
116 if ( iIter->ActorXZ )
120 if ( iIter->ActorYZ )
124 if ( iIter->ActorXYZ )
129 iIter->ReleaseData();
140 std::list< unsigned int >
148 boost::tuples::tie(it0, it1) =
149 m_Container.get< Highlighted >().equal_range(
true);
151 std::list< unsigned int > oList;
155 oList.push_back(it0->TraceID);
195 qDebug() <<
"No points in the map, reset nodes";
203 vtkSmartPointer< vtkPoints > newPoints = vtkSmartPointer< vtkPoints >::New();
204 vtkSmartPointer< vtkIntArray > newArray = vtkSmartPointer< vtkIntArray >::New();
205 newArray->SetNumberOfComponents(1);
206 newArray->SetName(
"TemporalInformation");
209 vtkSmartPointer< vtkPolyLine > polyLine = vtkSmartPointer< vtkPolyLine >::New();
210 polyLine->GetPointIds()->SetNumberOfIds( iTrackStructure.
PointsMap.size() );
212 std::map< unsigned int, double * >::const_iterator it =
217 while ( it != iTrackStructure.
PointsMap.end() )
219 newArray->InsertNextValue(it->first);
220 newPoints->InsertNextPoint(it->second);
222 polyLine->GetPointIds()->SetId(i, i);
229 vtkSmartPointer< vtkCellArray > cells =
230 vtkSmartPointer< vtkCellArray >::New();
231 cells->InsertNextCell(polyLine);
234 vtkSmartPointer< vtkPolyData > polyData = vtkSmartPointer< vtkPolyData >::New();
237 polyData->SetPoints(newPoints);
239 polyData->SetLines(cells);
241 polyData->GetPointData()->AddArray(newArray);
243 vtkSmartPointer< vtkDoubleArray > speedArray =
244 vtkSmartPointer< vtkDoubleArray >::New();
245 speedArray->SetNumberOfComponents(1);
246 speedArray->SetName(
"SpeedInformation");
247 polyData->GetPointData()->AddArray(speedArray);
249 vtkSmartPointer<vtkIntArray> trackIDArray = vtkSmartPointer<vtkIntArray>::New();
250 trackIDArray->SetNumberOfComponents(1);
251 trackIDArray->SetNumberOfValues(1);
252 trackIDArray->SetName(
"TRACK");
253 trackIDArray->SetValue(0,iTrackStructure.
TraceID);
255 polyData->GetFieldData()->AddArray(trackIDArray);
257 iTrackStructure.
Nodes->DeepCopy(polyData);
261 iTrackStructure.
Nodes->GetPointData()->SetActiveScalars(NULL);
272 std::map< unsigned int, double * >::iterator beginMesh = iMeshes.begin();
273 std::map< unsigned int, double * >::iterator endMesh = iMeshes.end();
275 while ( beginMesh != endMesh )
301 vtkProperty *trace_property = vtkProperty::New();
302 double r = iStructure.
rgba[0];
303 double g = iStructure.
rgba[1];
304 double b = iStructure.
rgba[2];
305 double a = iStructure.
rgba[3];
307 trace_property->SetColor(r,
310 trace_property->SetOpacity(a);
313 std::vector< vtkActor * > trackActors =
317 assert(trackActors[0]);
320 iStructure.
ActorXY = trackActors[0];
321 iStructure.
ActorXZ = trackActors[1];
322 iStructure.
ActorYZ = trackActors[2];
323 iStructure.
ActorXYZ = trackActors[3];
327 trace_property->Delete();
336 if(iStructure.
Nodes->GetNumberOfPoints() < 2 )
351 std::list< double * >& iListCenterBoundingBoxes)
353 assert( iTrackID != 0 );
362 if ( motherIt !=
m_Container.get< TraceID >().end() )
373 if ( ! mother->
Nodes )
376 mother->
Nodes = vtkPolyData::New();
411 while ( begin != end )
414 delete[] begin->second;
421 std::list< double * >::iterator beginList = iPoints.begin();
422 std::list< double * >::iterator endList = iPoints.end();
424 while ( beginList != endList )
427 static_cast< int >( ( *beginList )[0] ),
428 static_cast< int >( ( *beginList )[1] ),
429 static_cast< int >( ( *beginList )[2] )
432 unsigned int time =
static_cast< unsigned int >( ( *beginList )[3] );
440 (void) insertElement;
442 assert ( insertElement );
454 const Qt::CheckState & iCheck)
467 const Qt::CheckState & iCheck)
486 vtkSmartPointer< vtkLookupTable > LUT = vtkSmartPointer< vtkLookupTable >::New();
487 LUT->SetTableRange(range);
488 LUT->SetNumberOfTableValues(1024);
489 LUT->SetHueRange(0, 0.7);
490 LUT->SetSaturationRange(1, 1);
491 LUT->SetValueRange(1, 1);
520 vtkSmartPointer< vtkLookupTable > LUT =
521 vtkSmartPointer< vtkLookupTable >::New();
522 LUT->SetTableRange(range);
523 LUT->SetNumberOfTableValues(1024);
524 LUT->SetHueRange(0, 0.7);
525 LUT->SetSaturationRange(1, 1);
526 LUT->SetValueRange(1, 1);
554 it->TreeNode.SetScalarRange(iMin, iMax);
573 it->TreeNode.SetLookupTable(iLut);
592 it->TreeNode.RenderWithOriginalColors();
605 double *range =
new double[2];
607 range[0] = std::numeric_limits< double >::max();
608 range[1] = std::numeric_limits< double >::min();
620 it->Nodes->GetPointData()->GetArray(
622 range[0] = std::min(range[0], realTime[0]);
623 range[1] = std::max(range[1], realTime[1]);
627 it->Nodes->GetPointData()->SetActiveScalars(
643 double *range =
new double[2];
645 range[0] = std::numeric_limits< double >::max();
646 range[1] = std::numeric_limits< double >::min();
658 it->TreeNode.Nodes->GetPointData()->GetArray(
660 range[0] = std::min(range[0], realTime[0]);
661 range[1] = std::max(range[1], realTime[1]);
665 it->TreeNode.Nodes->GetPointData()->SetActiveScalars(
701 const double& iRadius2,
702 const double& iWidth )
704 MultiIndexContainerType::iterator it =
m_Container.begin();
705 bool IsThereNonNullRadius = ( iRadius > 0 || iRadius2 > 0 );
713 if( pointsInPolydata )
715 if ( IsThereNonNullRadius )
717 it->UpdateTracksRepresentation(iRadius, iRadius2);
721 it->UpdateLineWidth( iWidth );
748 vtkPolyData* nodes = it->Nodes;
752 vtkPoints* points = nodes->GetPoints();
758 return points->GetPoint(0);
762 vtkIdType nbOfPoints = points->GetNumberOfPoints();
763 return points->GetPoint(nbOfPoints-1);
779 std::list<unsigned int>::iterator it = iListOfDivisions.begin();
781 while( it != iListOfDivisions.end() )
784 unsigned int mother = *it;
786 unsigned int daughter1 = *it;
788 unsigned int daughter2 = *it;
799 AddDivision(
const unsigned int& iMotherID,
const unsigned int& iDaughter1ID,
800 const unsigned int& iDaughter2ID,
const bool& iVisible)
807 if( motherIt !=
m_Container.get< TraceID >().end() )
812 if( daughter1It !=
m_Container.get< TraceID >().end() )
817 if( daughter2It !=
m_Container.get< TraceID >().end() )
826 const_cast<TrackStructure*>(&(*daughter1It)));
828 const_cast<TrackStructure*>(&(*daughter2It)));
837 std::vector< vtkActor * > actors =
839 mother->
TreeNode.ActorXY = actors[0];
840 mother->
TreeNode.ActorXZ = actors[1];
841 mother->
TreeNode.ActorYZ = actors[2];
842 mother->
TreeNode.ActorXYZ = actors[3];
843 mother->
TreeNode.Visible = iVisible;
871 if( motherIt !=
m_Container.get< TraceID >().end() )
885 std::cout <<
"iMother : " << iMother << std::endl;
890 motherIt->TreeNode.m_Child[0]->TraceID,
FIRST);
894 std::cout <<
"iMother : " << iMother << std::endl;
895 std::cout <<
"daughter1: " << motherIt->TreeNode.m_Child[0]->TraceID << std::endl;
900 motherIt->TreeNode.m_Child[1]->TraceID,
FIRST);
904 std::cout <<
"iMother : " << iMother << std::endl;
905 std::cout <<
"daughter2: " << motherIt->TreeNode.m_Child[1]->TraceID << std::endl;
910 vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
911 points->InsertNextPoint ( daughter1[0], daughter1[1], daughter1[2] );
912 points->InsertNextPoint ( mother[0], mother[1], mother[2] );
913 points->InsertNextPoint ( daughter2[0], daughter2[1], daughter2[2] );
916 vtkSmartPointer<vtkCellArray> lines = vtkSmartPointer<vtkCellArray>::New();
917 for(
int i=0; i<2; ++i)
920 vtkSmartPointer<vtkLine> line =
921 vtkSmartPointer<vtkLine>::New();
922 line->GetPointIds()->SetId(0,i);
923 line->GetPointIds()->SetId(1,i+1);
924 lines->InsertNextCell(line);
928 vtkSmartPointer<vtkPolyData> division = vtkSmartPointer<vtkPolyData>::New();
929 division->SetPoints(points);
930 division->SetLines(lines);
936 vtkSmartPointer<vtkIntArray> trackIDArray = vtkSmartPointer<vtkIntArray>::New();
937 trackIDArray->SetNumberOfComponents(1);
938 trackIDArray->SetNumberOfValues(1);
939 trackIDArray->SetName(
"DIVISION");
940 trackIDArray->SetValue(0,iMother);
942 division->GetFieldData()->AddArray(trackIDArray);
952 std::vector<vtkActor* >
959 vtkSmartPointer<vtkProperty> trace_property =
960 vtkSmartPointer<vtkProperty>::New();
966 trace_property->SetColor(r,
969 trace_property->SetOpacity(a);
971 std::vector< vtkActor * > divisionActors =
991 return divisionActors;
1001 =
m_Container.get< TraceID >().find(iRootTrackID);
1003 if( motherIt !=
m_Container.get< TraceID >().end() )
1018 =
m_Container.get< TraceID >().find(iRootTrackID);
1020 if( motherIt !=
m_Container.get< TraceID >().end() )
1033 const bool& iVisible)
1040 std::vector<TrackStructure*>::const_iterator itDivision =
1041 it->TreeNode.m_Child.begin();
1043 while(itDivision != it->TreeNode.m_Child.end())
1047 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1049 if( childIt !=
m_Container.get< TraceID >().end() )
1063 =
m_Container.get< TraceID >().find(iRootTrackID);
1065 if( motherIt !=
m_Container.get< TraceID >().end() )
1079 std::vector<TrackStructure*>::const_iterator itDivision =
1080 it->TreeNode.m_Child.begin();
1082 while(itDivision != it->TreeNode.m_Child.end())
1086 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1088 if( childIt !=
m_Container.get< TraceID >().end() )
1106 const bool& iHighlighted)
1113 std::vector<TrackStructure*>::const_iterator itDivision =
1114 it->TreeNode.m_Child.begin();
1116 while(itDivision != it->TreeNode.m_Child.end())
1120 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1122 if( childIt !=
m_Container.get< TraceID >().end() )
1135 const bool& iVisible)
1139 typedef void (
QGoImageView3D::*ImageViewMember )(
const int &, vtkActor *);
1165 const bool& iHighlight )
1167 vtkProperty* temp_property = vtkProperty::New();
1170 temp_property->SetColor(it->TreeNode.rgba[0],
1171 it->TreeNode.rgba[1],
1172 it->TreeNode.rgba[2]);
1173 temp_property->SetOpacity(it->TreeNode.rgba[3]);
1184 temp_property->Delete();
1216 mother->
TreeNode.m_Child[0]->TreeNode.m_Mother = NULL;
1217 mother->
TreeNode.m_Child[1]->TreeNode.m_Mother = NULL;
1220 mother->
TreeNode.m_Child.resize(0);
1226 std::list<unsigned int>
1230 std::list<unsigned int> listOfIDs;
1236 if( motherIt !=
m_Container.get< TraceID >().end() )
1249 std::list<unsigned int>& iList)
1251 iList.push_back( it->TraceID );
1253 std::vector<TrackStructure*>::const_iterator itDivision =
1254 it->TreeNode.m_Child.begin();
1256 while(itDivision != it->TreeNode.m_Child.end())
1260 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1261 if( childIt !=
m_Container.get< TraceID >().end() )
1282 bool highlight = !motherIt->TreeNode.Highlighted;
1299 if( iMotherIterator->IsRoot() )
1305 =
m_Container.get< TraceID >().find( iMotherIterator->TreeNode.m_Mother->TraceID );
1316 =
m_Container.get< TraceID >().find(iTrackIDRoot);
1338 if( motherIt !=
m_Container.get< TraceID >().end() )
1352 const unsigned int& iDepth)
1357 vtkSmartPointer< vtkIntArray > depthArray =
1358 vtkSmartPointer< vtkIntArray >::New();
1359 depthArray->SetNumberOfComponents(1);
1360 depthArray->SetName(
"DepthInformation");
1361 depthArray->InsertNextValue(iDepth);
1362 depthArray->InsertNextValue(iDepth);
1363 depthArray->InsertNextValue(iDepth);
1367 std::vector<TrackStructure*>::const_iterator itDivision =
1368 it->TreeNode.m_Child.begin();
1370 while(itDivision != it->TreeNode.m_Child.end())
1374 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1375 if( childIt !=
m_Container.get< TraceID >().end() )
1377 unsigned int depth = iDepth+1;
1393 if(motherIt !=
m_Container.get< TraceID >().end())
1406 const double* iColor)
1414 std::vector<TrackStructure*>::const_iterator itDivision =
1415 it->TreeNode.m_Child.begin();
1417 while(itDivision != it->TreeNode.m_Child.end())
1421 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1422 if( childIt !=
m_Container.get< TraceID >().end() )
1439 if( motherIt !=
m_Container.get< TraceID >().end() )
1452 const double* iColor)
1459 std::vector<TrackStructure*>::const_iterator itDivision =
1460 it->TreeNode.m_Child.begin();
1462 while(itDivision != it->TreeNode.m_Child.end())
1466 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1467 if( childIt !=
m_Container.get< TraceID >().end() )
1482 =
m_Container.get< TraceID >().find(iTrackRootID);
1484 if( motherIt !=
m_Container.get< TraceID >().end() )
1486 unsigned int depth = 0;
1502 const unsigned int& iDivisionDepth,
1503 unsigned int& iLineageDepth)
1507 if( iDivisionDepth > iLineageDepth )
1509 iLineageDepth = iDivisionDepth;
1512 std::vector<TrackStructure*>::const_iterator itDivision =
1513 it->TreeNode.m_Child.begin();
1515 while(itDivision != it->TreeNode.m_Child.end())
1519 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1520 if( childIt !=
m_Container.get< TraceID >().end() )
1522 unsigned int depth = iDivisionDepth+1;
1536 =
m_Container.get< TraceID >().find(iTrackRootID);
1538 if( motherIt !=
m_Container.get< TraceID >().end() )
1540 unsigned int depth = std::numeric_limits<unsigned int>::max();
1556 const unsigned int& iDivisionDepth,
1557 unsigned int& iLineageDepth)
1561 if( iDivisionDepth < iLineageDepth )
1563 iLineageDepth = iDivisionDepth;
1567 std::vector<TrackStructure*>::const_iterator itDivision =
1568 it->TreeNode.m_Child.begin();
1570 while(itDivision != it->TreeNode.m_Child.end())
1574 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1575 if( childIt !=
m_Container.get< TraceID >().end() )
1577 unsigned int depth = iDivisionDepth+1;
1591 =
m_Container.get< TraceID >().find(iTrackRootID);
1593 if( motherIt !=
m_Container.get< TraceID >().end() )
1595 unsigned int numberOfDivisions = 0;
1598 return numberOfDivisions;
1611 unsigned int& iNumberOfDivisions)
1615 ++iNumberOfDivisions;
1618 std::vector<TrackStructure*>::const_iterator itDivision =
1619 it->TreeNode.m_Child.begin();
1621 while(itDivision != it->TreeNode.m_Child.end())
1625 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1626 if( childIt !=
m_Container.get< TraceID >().end() )
1641 =
m_Container.get< TraceID >().find(iTrackRootID);
1643 if(motherIt !=
m_Container.get< TraceID >().end())
1645 unsigned int numberOfLeaves = 1;
1648 return numberOfLeaves;
1670 return LineageAttributes;
1678 unsigned int& iNumberOfLeaves)
1685 std::vector<TrackStructure*>::const_iterator itDivision =
1686 it->TreeNode.m_Child.begin();
1688 while(itDivision != it->TreeNode.m_Child.end())
1692 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1693 if( childIt !=
m_Container.get< TraceID >().end() )
1703 vtkMutableDirectedGraph*
1711 vtkMutableDirectedGraph* graph = vtkMutableDirectedGraph::New();
1712 unsigned int pedigree = graph->AddVertex();
1715 vtkDoubleArray*
id = vtkDoubleArray::New();
1716 id->SetName(
"Track ID");
1719 vtkDoubleArray* depth = vtkDoubleArray::New();
1720 depth->SetName(
"Lineage Depth");
1722 vtkStringArray* cellType = vtkStringArray::New();
1723 depth->SetName(
"Cell Type");
1732 graph->GetVertexData()->AddArray(
id);
1733 graph->GetVertexData()->AddArray(depth);
1748 vtkMutableDirectedGraph* iGraph,
unsigned int iPedrigree,
1749 vtkIdType mother,
unsigned int iDepth,
1750 vtkDoubleArray* iDepthArray, vtkDoubleArray* iIDArray)
1753 vtkIdType motherPedigree = iPedrigree;
1756 iIDArray->InsertValue(iPedrigree, it->TraceID);
1758 iDepthArray->InsertValue(iPedrigree, iDepth);
1765 std::vector<TrackStructure*>::const_iterator itDivision =
1766 it->TreeNode.m_Child.begin();
1768 while(itDivision != it->TreeNode.m_Child.end())
1772 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1774 iPedrigree = iGraph->AddChild(motherPedigree);
1776 UpdateLineage(childIt,iGraph, iPedrigree, motherPedigree, iDepth+1, iDepthArray,iIDArray);
1786 const std::map< unsigned int, std::string >& iValues)
1788 typedef std::map< unsigned int, std::string > MapType;
1789 typedef MapType::const_iterator MapConstIterator;
1791 std::map< std::string, double > stringmap;
1793 if ( iColumnName.empty() || iValues.empty() )
1801 MapConstIterator it = iValues.begin();
1806 temp = boost::lexical_cast<
double >(it->second);
1808 catch(boost::bad_lexical_cast &)
1810 if ( stringmap.empty() )
1812 stringmap[it->second] = 0.;
1816 std::map< std::string, double >::iterator m_it = stringmap.find(it->second);
1818 if ( m_it != stringmap.end() )
1820 temp = m_it->second;
1824 std::map< std::string, double >::reverse_iterator r_it = stringmap.rbegin();
1825 temp = r_it->second;
1831 double min_value = temp;
1832 double max_value = temp;
1834 while ( it != iValues.end() )
1838 trace_it = this->
m_Container.get< TraceID >().find(it->first);
1844 temp = boost::lexical_cast<
double >(it->second);
1846 catch(boost::bad_lexical_cast &)
1849 std::map< std::string, double >::iterator m_it = stringmap.find(it->second);
1851 if ( m_it != stringmap.end() )
1853 temp = m_it->second;
1857 std::map< std::string, double >::reverse_iterator r_it = stringmap.rbegin();
1858 temp = r_it->second;
1878 const std::string& iColumnName,
const double& iValue,
1879 double& iMin,
double& iMax)
1884 if ( iValue > iMax )
1888 if ( iValue < iMin )
1893 it->TreeNode.SetScalarData(iColumnName, iValue);
1896 std::vector<TrackStructure*>::const_iterator itDivision =
1897 it->TreeNode.m_Child.begin();
1899 while( itDivision != it->TreeNode.m_Child.end())
1903 =
m_Container.get< TraceID >().find((*itDivision)->TraceID);
1904 if( childIt !=
m_Container.get< TraceID >().end() )
1917 const std::map< unsigned int, std::string > & iValues)
1919 typedef std::map< unsigned int, std::string > MapType;
1920 typedef MapType::const_iterator MapConstIterator;
1922 std::map< std::string, double > stringmap;
1924 if ( iColumnName.empty() || iValues.empty() )
1930 MapConstIterator it = iValues.begin();
1935 temp = boost::lexical_cast<
double >(it->second);
1937 catch(boost::bad_lexical_cast &)
1939 if ( stringmap.empty() )
1941 stringmap[it->second] = 0.;
1945 std::map< std::string, double >::iterator m_it = stringmap.find(it->second);
1947 if ( m_it != stringmap.end() )
1949 temp = m_it->second;
1953 std::map< std::string, double >::reverse_iterator r_it = stringmap.rbegin();
1954 temp = r_it->second;
1960 unsigned int val =
static_cast< unsigned int >(temp);
1961 unsigned int modulo = val % 30;
1963 temp =
static_cast< double >(modulo);
1965 double min_value = temp;
1966 double max_value = temp;
1968 using boost::multi_index:: get;
1970 while ( it != iValues.end() )
1973 trace_it = this->
m_Container.get< TraceID >().find(it->first);
1975 if ( trace_it != this->
m_Container.get< TraceID >().end() )
1977 if ( trace_it->TreeNode.Nodes )
1982 temp = boost::lexical_cast<
double >(it->second);
1984 catch(boost::bad_lexical_cast &)
1987 std::map< std::string, double >::iterator m_it = stringmap.find(it->second);
1989 if ( m_it != stringmap.end() )
1991 temp = m_it->second;
1995 std::map< std::string, double >::reverse_iterator r_it = stringmap.rbegin();
1996 temp = r_it->second;
2001 val =
static_cast< unsigned int >(temp);
2004 temp =
static_cast< double >(modulo);
2022 AddVolume(
const unsigned int& iTrackID,
const double& iVolume)
2025 trace_it = this->
m_Container.get< TraceID >().find(iTrackID);
2027 if ( trace_it !=
m_Container.get< TraceID >().end() )
QString & append(QChar ch)
double * setTrackNodeScalars(const QString &iArrayName)
Changes the scalars to be displayed and return the new range.
unsigned int GetCollectionNumberOfLeaves(const unsigned int &iTrackRootID)
virtual double * GetWorldCoordinatesFromImageCoordinates(int indices[3])
Convert an indices coordinate point (image coordinates) into a world coordinate point.
Add an array to a division with an unary function. Useful for the color coding.
virtual ~TrackContainer()
Destructor.
void UpdateRenderWindows()
Update only the visualization.
void CreateTrackActors(TrackStructure &iStructure)
Create new actors for the current polydata and update and visualize the current actors.
GoFigureTrackAttributes ComputeAttributes() const
QString m_ActiveTrackScalars
void UpdateCollectionHighlighted(MultiIndexContainerTraceIDIterator &it, const bool &iHighlighted)
int ModifyDivisionHighlight(MultiIndexContainerTraceIDIterator &it, const bool &iHighlight)
MultiIndexContainerType::template index< TraceID >::type::iterator MultiIndexContainerTraceIDIterator
void SetCollectionColorCode(const std::string &iColumnName, const std::map< unsigned int, std::string > &iValues)
MultiIndexContainerType m_Container
Trace Contaienr.
virtual void UpdateElementHighlightingWithGivenTraceIDsBase(const QStringList &iList, const Qt::CheckState &iCheck)
Change elements highlighting property given a list of TraceIDs and the new status.
void HighlightCollection(const unsigned int &iRootTrackID, const bool &iHighlighted)
void SetScalarRangeForAllElements(const double &iMin, const double &iMax)
Set the scalar range.
void UpdateDivisionColorData(MultiIndexContainerTraceIDIterator &iMotherIterator, const double *iColor)
std::vector< vtkActor * > AddContour(vtkPolyData *iDataset, vtkProperty *iProperty=NULL)
Add contour with given property into the visualization.
vtkMutableDirectedGraph * ExportLineage(const unsigned int &iTrackID)
void SetLookupTableForAllDivisionsColorCoding(const vtkLookupTable *iLut)
int ModifyDivisionVisibility(MultiIndexContainerTraceIDIterator &it, const bool &iVisibility)
void setTimeInterval(const int &iTimeInterval)
void UpdateCollectionMaxDepth(MultiIndexContainerTraceIDIterator &it, const unsigned int &iDivisionDepth, unsigned int &iLineageDepth)
void DeleteADivision(const unsigned int &iMotherID)
vtkProperty * m_HighlightedProperty
vtkViewImage2D * GetImageViewer(const int &iId)
Create a polydata for a division with an unary function. Useful for the color coding.
Change the visibility of a division with an unary function.
void DeleteCollection(unsigned int)
unsigned int GetCollectionNumberOfDivisions(const unsigned int &iTrackRootID)
void SetScalarRangeForAllDivisions(const double &iMin, const double &iMax)
MultiIndexContainerType::template index< Highlighted >::type::iterator MultiIndexContainerHighlightedIterator
void ChangeColorCode(const QString &iColorCode)
Color code the track by an array.
TreeNodeStructure< Self > TreeNode
void UpdateLineageHighlightingFromTrackRootID(unsigned int)
class for the visualization of 3D Image represented by one vtkImageData*.
unsigned int GetCollectionMinDepth(const unsigned int &iTrackRootID)
GoFigureLineageAttributes GetLineageAttributes(unsigned int iTrackRootID)
unsigned int GetCollectionMaxDepth(const unsigned int &iTrackRootID)
void UpdateCollectionColors(const unsigned int &iTrackID, const double *color)
virtual void RemoveActor(const int &iId, vtkActor *iActor)
Change the highlight of a division with an unary function.
void UpdateSubLineage(MultiIndexContainerTraceIDIterator it, std::list< unsigned int > &iList)
void ImportTrackInCurrentElement(std::map< unsigned int, double * > &iMeshes)
Update the current element map then polydata.
Structure which represent a track, and used for interaction between Visualization and TableWidget...
bool UpdateTrackStructurePolyData(const TrackStructure &iTrackStructure)
Update the TrackStructure polydata according to the current map.
void UpdateLineage(MultiIndexContainerTraceIDIterator &it, vtkMutableDirectedGraph *iGraph, unsigned int iPedrigree, vtkIdType mother, unsigned int iDepth, vtkDoubleArray *iDepthArray, vtkDoubleArray *iIDArray)
QString m_ActiveDivisionScalars
double * GetBorderOfTheTrack(const unsigned int &iTrackID, const BorderType &iBorder)
void ChangeDivisionsColorCode(const QString &iColorCode)
Color code the lineage by an array.
void UpdateCollectionMinDepth(MultiIndexContainerTraceIDIterator &it, const unsigned int &iDivisionDepth, unsigned int &iLineageDepth)
virtual void UpdateElementVisibilityWithGivenTraceIDsBase(const QStringList &iList, const Qt::CheckState &iCheck)
Change elements visibility property given a list of TraceIDs and the new status.
TrackContainer(QObject *iParent, QGoImageView3D *iView)
Constructor.
TrackType::PointsMapConstIterator PointsMapConstIterator
bool InsertElement(const unsigned int &iTime, double *iPoint)
Insert a point at the current time point.
QByteArray toLocal8Bit() const
void UpdateTracksRepresentation(const double &iRadius, const double &iRadius2, const double &iWidth)
void SetListOfDivisions(std::list< unsigned int > &iListOfDivisions)
std::list< unsigned int > GetSubLineage(const unsigned int &iTrackID)
virtual void AddActor(const int &iId, vtkActor *iActor)
GoFigureLineageAttributes UpdateDivisionsForALineage(unsigned int iTrackIDRoot, double *color)
update the color and the divisions scalars of an all lineage which has iTrackIDRoot as track root ...
void RecomputeMap(TrackStructure *iStructure, std::list< double * > &iPoints)
Recompute a polydata from a list of point (coordinates) for the current element. If the current eleme...
void UpdateCollectionDelete(MultiIndexContainerTraceIDIterator &it)
void UpdateCollectionColorsData(const unsigned int &iTrackID, const double *color)
QGoImageView3D * m_ImageView
Link to the visualization.
void UpdateDivisionColor(MultiIndexContainerTraceIDIterator &iMotherIterator, const double *iColor)
void UpdateDivisionScalarData(MultiIndexContainerTraceIDIterator &it, const std::string &iColumnName, const double &iValue, double &iMin, double &iMax)
MultiIndexContainerElementType m_CurrentElement
Current Element of the trace type.
void UpdateTrackActors(TrackStructure &iStructure)
void UpdateDivisionScalar(MultiIndexContainerTraceIDIterator &iMotherIterator, const unsigned int &iDepth)
void RenderAllDivisionsWithOriginalColors()
void ShowCollection(const unsigned int &, const bool &)
std::vector< vtkActor * > CreateDivisionActor(vtkPolyData *iPolyData, const bool &iVisible=true)
void UpdateCollectionNumberOfLeaves(MultiIndexContainerTraceIDIterator &it, unsigned int &iNumberOfLeaves)
void SetDivisionRandomColor(const std::string &iColumnName, const std::map< unsigned int, std::string > &iValues)
TrackStructure * UpdatePointsForATrack(const unsigned int &iTrackID, std::list< double * > &iListCenterBoundingBoxes)
get the element with iTrackID into the current element, remove it from the container, recalculate the points from the iListCenterBoundingBox and emit a signal for the current element to be saved into the database
void CreateDivisionPolydata(const unsigned int &iMother)
void UpdateCollectionNumberOfDivisions(MultiIndexContainerTraceIDIterator &it, unsigned int &iNumberOfDivisions)
float m_IntersectionLineWidth
void AddDivision(const unsigned int &iMotherID, const unsigned int &iDaughter1ID, const unsigned int &iDaughter2ID, const bool &iVisible=true)
void AddVolume(const unsigned int &iTrackID, const double &iVolume)
GoFigureLineageAttributes UpdateCollectionScalars(const unsigned int &iTrackID)
double * setDivisionNodeScalars(const QString &iArrayName)
Changes the divisions scalars to be displayed and return the new range.
void SetLookupTableForColorCoding(vtkLookupTable *iLut)
Apply the given lookup table to all traces in the container.
std::list< unsigned int > DeleteAllHighlightedElements()
Delete all highlighted elements.
void UpdateCollectionHighlighting(const unsigned int &iTraceId)
void UpdateCollectionVisibility(MultiIndexContainerTraceIDIterator &it, const bool &iVisibility)
virtual void UpdateElementVisibilityWithGivenTraceIDs(const QStringList &iList, const Qt::CheckState &iCheck)
Change elements visibility property given a list of TraceIDs and the new status.
int compare(const QString &other) const
void RenderAllElementsWithOriginalColors()
Render with original colors.
void GetRootIterator(MultiIndexContainerTraceIDIterator &iMotherIterator)
virtual void UpdateElementHighlightingWithGivenTraceIDs(const QStringList &iList, const Qt::CheckState &iCheck)
Change elements highlighting property given a list of TraceIDs and the new status.
bool DeleteElement(const unsigned int &iId)
Remove the element which TraceId = iId.