GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackContainer.h
Go to the documentation of this file.
1 /*=========================================================================
2  Authors: The GoFigure Dev. Team.
3  at Megason Lab, Systems biology, Harvard Medical school, 2009-11
4 
5  Copyright (c) 2009-11, President and Fellows of Harvard College.
6  All rights reserved.
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are met:
10 
11  Redistributions of source code must retain the above copyright notice,
12  this list of conditions and the following disclaimer.
13  Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16  Neither the name of the President and Fellows of Harvard College
17  nor the names of its contributors may be used to endorse or promote
18  products derived from this software without specific prior written
19  permission.
20 
21  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
25  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 =========================================================================*/
34 
35 #ifndef __TrackContainer_h
36 #define __TrackContainer_h
37 
38 #include <QObject>
39 
40 #include "TrackStructure.h"
41 #include "StructureHelper.h"
42 
43 #include "TraceContainerBase.h"
44 
45 #include "boost/multi_index_container.hpp"
46 #include "boost/multi_index/member.hpp"
47 #include "boost/multi_index/hashed_index.hpp"
48 #include "boost/multi_index/ordered_index.hpp"
49 #include "boost/numeric/conversion/cast.hpp"
50 #include "boost/lexical_cast.hpp"
51 
52 #include "vtkProperty.h"
53 #include "vtkPolyData.h"
54 #include "vtkActor.h"
55 #include "vtkMapper.h"
56 #include "vtkPointData.h"
57 #include "vtkDoubleArray.h"
58 #include "QGoImageView3D.h"
59 #include "vtkLookupTableManager.h"
60 #include "QGoGUILibConfigure.h"
61 #include <QString>
62 
63 #include "vtkMutableDirectedGraph.h"
65 
71 //-----------------------------------------------------------------------------
73 {
74  change_visible_division(const bool& iVisible):visible(iVisible){}
75 
76  void operator()(TrackStructure& iStructure)
77  {
79  }
80 
81 private:
82  bool visible;
83 };
84 //-----------------------------------------------------------------------------
85 
86 //-----------------------------------------------------------------------------
93 {
94  change_highlighted_division(vtkProperty* iProperty, bool iHighlight):
95  property(iProperty),highlight(iHighlight){}
96 
97  void operator()(TrackStructure& iStructure)
98  {
100  }
101 
102 private:
103  vtkProperty* property;
104  bool highlight;
105 };
106 //-----------------------------------------------------------------------------
107 
108 //-----------------------------------------------------------------------------
115 {
116  change_data_color_division(const double* iColor):color(iColor){}
117 
118  void operator()(TrackStructure& iStructure)
119  {
120  iStructure.ModifyDivisionColorData(color);
121  }
122 
123 private:
124  const double* color;
125 };
126 //-----------------------------------------------------------------------------
127 
128 //-----------------------------------------------------------------------------
135 {
136  change_actor_color_division(const double* iColor):color(iColor){}
137 
138  void operator()(TrackStructure& iStructure)
139  {
140  iStructure.ModifyDivisionColorActor(color);
141  }
142 
143 private:
144  const double* color;
145 };
146 //-----------------------------------------------------------------------------
147 
148 //-----------------------------------------------------------------------------
156 {
157  add_array_division(vtkIntArray* iArray):array(iArray){}
158 
159  void operator()(TrackStructure& iStructure)
160  {
161  iStructure.AddDivisionArray(array);
162  }
163 
164 private:
165  vtkIntArray* array;
166 };
167 //-----------------------------------------------------------------------------
168 
169 //-----------------------------------------------------------------------------
177 {
178  create_node_division(vtkPolyData* iNode):node(iNode){}
179 
180  void operator()(TrackStructure& iStructure)
181  {
182  iStructure.CreateDivisionNode(node);
183  }
184 
185 private:
186  vtkPolyData* node;
187 };
188 //-----------------------------------------------------------------------------
189 
190 //-----------------------------------------------------------------------------
198 {
199  add_volume(const double& iVolume):volume(iVolume){}
200 
201  void operator()(TrackStructure& iStructure)
202  {
203  iStructure.AddVolume(volume);
204  }
205 
206 private:
207  double volume;
208 };
209 //-----------------------------------------------------------------------------
210 
211 //-----------------------------------------------------------------------------
212 
213 namespace boost
214 {
215 typedef multi_index::multi_index_container<
217  boost::multi_index::indexed_by<
218  boost::multi_index::ordered_unique<
219  boost::multi_index::tag< TraceID >,
220  BOOST_MULTI_INDEX_MEMBER(TraceStructure, unsigned int, TraceID)
221  >,
222  boost::multi_index::ordered_non_unique<
223  boost::multi_index::tag< CollectionID >,
224  BOOST_MULTI_INDEX_MEMBER(TraceStructure, unsigned int, CollectionID)
225  >,
226  boost::multi_index::ordered_non_unique<
227  boost::multi_index::tag< Highlighted >,
228  BOOST_MULTI_INDEX_MEMBER(TraceStructure, bool, Highlighted)
229  >,
230  boost::multi_index::ordered_non_unique<
231  boost::multi_index::tag< Visible >,
232  BOOST_MULTI_INDEX_MEMBER(TraceStructure, bool, Visible)
233  >
234  >
236 }
237 
245 class QGOGUILIB_EXPORT TrackContainer:
246  public TraceContainerBase< boost::MultiIndexTrackContainer >
247 {
248  Q_OBJECT
249 public:
250 
252 
255 
256  typedef TrackType::PointsMapType PointsMapType;
257  typedef TrackType::PointsMapIterator PointsMapIterator;
258  typedef TrackType::PointsMapConstIterator PointsMapConstIterator;
259 
260  //------------------------------------------------------------------------
261 
263  explicit TrackContainer( QObject *iParent,
264  QGoImageView3D *iView);
265 
267  virtual ~TrackContainer();
268 
269  //-------------------------------------------------------------------------
270 
281  bool DeleteElement(const unsigned int & iId);
282 
287 
291  std::list< unsigned int > DeleteAllHighlightedElements();
292 
299  bool UpdateTrackStructurePolyData(const TrackStructure& iTrackStructure);
300 
316  template< class TList >
317  void UpdateTracksStrings(const TList& iTrackList)
318  {
319  typename TList::const_iterator it = iTrackList.begin();
320  unsigned int temp = 0;
321 
322  while(it!=iTrackList.end())
323  {
324  temp = static_cast< unsigned int >(*it);
325  // update the current element
327 
328  // emit signal to get the meshes informations
329  emit NeedMeshesInfoForImportedTrack(temp);
330 
331  ++it;
332  }
333  }
334 
339  void ImportTrackInCurrentElement(std::map< unsigned int, double*>& iMeshes);
340 
347  void CreateTrackActors(TrackStructure& iStructure);
348 
349  /*
350  * \brief Remove the actors from the visualization if the track has less than 2 points.
351  * \param[in] iStructure Structure to be updated
352  * \note input paramter not cont sine it is modified in the method
353  */
354  void UpdateTrackActors(TrackStructure& iStructure);
355 
363  TrackStructure* UpdatePointsForATrack(const unsigned int& iTrackID,
364  std::list< double*>& iListCenterBoundingBoxes);
365 
373  void UpdateElementHighlighting(const unsigned int& TraceId)
374  {
375  Qt::CheckState state;
376  Superclass::UpdateElementHighlightingWithTraceID(TraceId,
377  state);
378  emit TracePicked(TraceId, state);
379  }
380 
381  /*
382  * \brief Update the full lineage after picking a division
383  * 1-Pick actor
384  * 2-Get track ID
385  * 3-Get root track ID
386  * 4-Modify highlight
387  * \param[in] iTraceId ID of the track which owns the picked division
388  */
389  void UpdateCollectionHighlighting(const unsigned int& iTraceId);
390 
391  /*
392  * \brief Convenience method to get an iterator to the root structure.
393  * Useful for the division picking.
394  */
395  void GetRootIterator(
396  MultiIndexContainerTraceIDIterator& iMotherIterator);
397 
404  void UpdateElementVisibility(const unsigned int& iTraceID, const bool& iState)
405  {
406  Superclass::UpdateElementVisibilityWithTraceID(iTraceID, iState);
407  if(iState)
408  {
409  emit TraceVisibilityChanged(iTraceID, Qt::Checked );
410  return;
411  }
412  emit TraceVisibilityChanged(iTraceID, Qt::Unchecked );
413  }
414 
415  /*
416  * \brief Merge given tracks
417  * \param[in] iId1 ID of the first track
418  * \param[in] iId2 ID of the second track
419  */
420  void MergeTrack(const unsigned int& iId1, const unsigned int& iId2);
421 
422  /*
423  * \brief Set time interval between each image.
424  * Useful to estimate the speed of a cell.
425  * \param[in] iTimeInterval time interval between 2 time points
426  */
427  void setTimeInterval(const int& iTimeInterval);
428 
429  /*
430  * \brief Get time interval between each image.
431  * Necessary to estimate the speed of a cell.
432  * \return time interval between 2 time points
433  */
434  int getTimeInterval();
435 
436  /*
437  * \brief Border type enum to define FIRST and LAST point for a better
438  * lisibility
439  */
440  enum BorderType { FIRST = 0, LAST = 1 };
441 
442  /*
443  * \brief Convenience to get the position (x,y,z) of a border of a track.
444  * (first or last point).
445  * Used to create the divisions actors.
446  * \param[in] iTrackID track of interest
447  * \param[in] iBorder FIRST or LAST
448  * \return position of the first point (double* pointing to a double[3])
449  */
450  double* GetBorderOfTheTrack(const unsigned int& iTrackID,
451  const BorderType& iBorder);
452 
453  /*
454  * \brief Create divisions from a list of track ids.
455  * the list has the following format:
456  * motherID daughter1ID daughter2ID motherID daughter1ID ...
457  * \param[in] iListOfDivisions list of the track ids to create the divisions
458  */
459  void SetListOfDivisions(std::list<unsigned int>& iListOfDivisions);
460 
461  /*
462  * \brief Create a division between 3 tracks.
463  * Assigns mother and child pointers. Create 4 actors (one for each view)
464  * for this division.
465  * \param[in] iMotherID ID of the mother of the division
466  * \param[in] iDaughter1ID ID of the daughter1 of the division
467  * \param[in] iDaughter2ID ID of the daughter2 of the division
468  * \param[in] iVisible visible = true
469  */
470  void AddDivision( const unsigned int& iMotherID,
471  const unsigned int& iDaughter1ID,
472  const unsigned int& iDaughter2ID,
473  const bool& iVisible = true);
474 
475  /*
476  * \brief Create 4 actors (one for each view)
477  * for this division.
478  * \param[in] iPolyData polydata representing the division
479  * \param[in] iVisible visibility of the polydata (defaut = true)
480  * \return vector of 4 actors (1 for each view) representing the division
481  */
482  std::vector<vtkActor* > CreateDivisionActor(vtkPolyData* iPolyData,
483  const bool& iVisible = true);
484 
485  /*
486  * \brief Create Create a division from 3 track IDs.
487  * Updates the node in the structure.
488  * \param[in] iMother ID of the mother
489  */
490  void CreateDivisionPolydata(const unsigned int& iMother);
491 
492  /*
493  * \brief get the tree below a given division
494  * \param[in] iTrackID division to start the search
495  * \return list containing all the track IDs
496  */
497  std::list<unsigned int> GetSubLineage(const unsigned int& iTrackID);
498  /*
499  * \brief Convenience method to go through the tree and get a SubLineage
500  *
501  * \param[in] it iterator to go through the lineage
502  * \param[in] iList list of tracks to be returned
503  */
504  void UpdateSubLineage(MultiIndexContainerTraceIDIterator it,
505  std::list<unsigned int>& iList);
506 
511  GoFigureLineageAttributes UpdateDivisionsForALineage( unsigned int iTrackIDRoot, double* color);
512  /*
513  * \brief Update the lineage's divisions scalars given the track root ID
514  * \param[in] iTrackID track root ID
515  */
516  GoFigureLineageAttributes UpdateCollectionScalars(const unsigned int& iTrackID);
517  /*
518  * \brief Update the lineage's divisions scalars given the track root ID
519  * \param[in] iMotherIterator iterator to go through the lineage
520  * \param[in] iDepth depth or the structure referenced by the iterator
521  */
522  void UpdateDivisionScalar(
523  MultiIndexContainerTraceIDIterator& iMotherIterator,
524  const unsigned int& iDepth);
525 
526  GoFigureLineageAttributes GetLineageAttributes(unsigned int iTrackRootID);
527 
528  /*
529  * \brief Update the lineage's divisions color given the track root ID and
530  * a color
531  * \param[in] iTrackID track root ID
532  * \param[in] color color of the divisions
533  */
534  void UpdateCollectionColors(const unsigned int& iTrackID,
535  const double* color);
536  /*
537  * \brief Update the lineage's divisions color given the track root ID and a color
538  * \param[in] iMotherIterator iterator to go through the lineage
539  * \param[in] color color of the divisions
540  */
541  void UpdateDivisionColor(
542  MultiIndexContainerTraceIDIterator& iMotherIterator,
543  const double* iColor);
544 
545  /*
546  * \brief Update the lineage's divisions data color given the track root ID and
547  * a color
548  * \param[in] iTrackID track root ID
549  * \param[in] color color of the divisions
550  */
551  void UpdateCollectionColorsData(const unsigned int& iTrackID,
552  const double* color);
553  /*
554  * \brief Update the lineage's divisions data color given the track root ID and a color
555  * \param[in] iMotherIterator iterator to go through the lineage
556  * \param[in] color color of the divisions
557  */
558  void UpdateDivisionColorData(
559  MultiIndexContainerTraceIDIterator& iMotherIterator,
560  const double* iColor);
561 
562  // compute statistics on the collection
563  /*
564  * \brief Get the max depth of the lineage
565  * \param[in] iTrackRootID id of the track root
566  * \return depth of the lineage
567  */
568  unsigned int GetCollectionMaxDepth(const unsigned int& iTrackRootID);
569  /*
570  * \brief Update the collection max depth
571  * \param[in] it iterator to go through the lineage
572  * \param[in] iDivisionDepth depth of the division
573  * \param[in] iLineageDepth depth of the lineage
574  * \note iLineageDepth should not be const
575  */
576  void UpdateCollectionMaxDepth(MultiIndexContainerTraceIDIterator& it,
577  const unsigned int& iDivisionDepth,
578  unsigned int& iLineageDepth);
579  /*
580  * \brief Get the min depth of the lineage
581  * \param[in] iTrackRootID id of the track root
582  * \return depth of the lineage
583  */
584  unsigned int GetCollectionMinDepth(const unsigned int& iTrackRootID );
585  /*
586  * \brief Update the collection min depth
587  * \param[in] it iterator to go through the lineage
588  * \param[in] iDivisionDepth depth of the division
589  * \param[in] iLineageDepth depth of the lineage
590  * \note iLineageDepth shouldnt be const
591  */
592  void UpdateCollectionMinDepth( MultiIndexContainerTraceIDIterator& it,
593  const unsigned int& iDivisionDepth,
594  unsigned int& iLineageDepth);
595  /*
596  * \brief Get the number of divisions of the lineage
597  * \param[in] iTrackRootID id of the track root
598  * \return depth of the lineage
599  */
600  unsigned int GetCollectionNumberOfDivisions(
601  const unsigned int& iTrackRootID);
602  /*
603  * \brief Update the collection number of divisions
604  * \param[in] it iterator to go through the lineage
605  * \param[in] iNumberOfDivisions number of divisions of the lineage
606  * \note iNumberOfDivisions shouldnt be const
607  */
608  void UpdateCollectionNumberOfDivisions(
609  MultiIndexContainerTraceIDIterator& it,
610  unsigned int& iNumberOfDivisions);
611  /*
612  * \brief Get the number of leaves of the lineage
613  * \param[in] iTrackRootID id of the track root
614  * \return depth of the lineage
615  */
616  unsigned int GetCollectionNumberOfLeaves(const unsigned int& iTrackRootID);
617  /*
618  * \brief Update the collection number of leaves
619  * \param[in] it iterator to go through the lineage
620  * \param[in] iNumberOfLeaves number of leaves of the lineage
621  * \note iNumberOfLeaves shouldnt be const
622  */
623  void UpdateCollectionNumberOfLeaves(MultiIndexContainerTraceIDIterator& it,
624  unsigned int& iNumberOfLeaves);
625 
626  /*
627  * \brief Export a vtkMutableDirectedGraph from a given trackID root.
628  * \param[in] iTrackID track root ID for the lineage export.
629  * \return pointer to vtkMutableDirectedGraph. IMPORTANT: has to be deleted.
630  */
631  vtkMutableDirectedGraph* ExportLineage(const unsigned int& iTrackID);
632 
633  /*
634  * \brief Color code lineages from the table widget
635  * \param[in] iColumnName selected column name
636  * \param[in] iValues pair track root id/value
637  */
638  void SetCollectionColorCode(const std::string& iColumnName,
639  const std::map< unsigned int,
640  std::string >& iValues);
641 
642  /*
643  * \brief Randomly color code lineages from the table widget
644  * \param[in] iColumnName selected column name
645  * \param[in] iValues pair track root id/value
646  */
647  void SetDivisionRandomColor(const std::string & iColumnName,
648  const std::map< unsigned int, std::string >& iValues);
649 
650  /*
651  * \brief Update whole tree for table widget color coding
652  * \param[in] it iterator to go through the lineage
653  * \param[in] iColumnName selected column name
654  * \param[in] iValue value of the current lineage
655  * \param[in|out] iMin to adjust the lookup table after modifying polydata scalars
656  * \param[in|out] iMax to adjust the lookup table after modifying polydata scalars
657  * \note iMin and iMax should not be constant
658  */
659  void UpdateDivisionScalarData(MultiIndexContainerTraceIDIterator& it,
660  const std::string& iColumnName,
661  const double& iValue,
662  double& iMin,
663  double& iMax);
664 
665  /*
666  * \brief Set the scalar range for all the divisions
667  * \param[in] iMin min scalar
668  * \param[in] iMax max value
669  */
670  void SetScalarRangeForAllDivisions(const double& iMin, const double& iMax);
671 
672  /*
673  * \brief Set the LUT for all the divisions
674  * \param[in] iLut the lookup table
675  */
676  void SetLookupTableForAllDivisionsColorCoding(const vtkLookupTable *iLut);
677 
678  /*
679  * \brief Render all the divisions of all the lineages with the original
680  * lineage color
681  */
682  void RenderAllDivisionsWithOriginalColors();
683 
684  /*
685  * \brief Go through the lineage and update the graph structure and
686  * informations.
687  * \param[in] it iterator to go through the lineage
688  * \param[in] iGraph graph to be modified
689  * \param[in] iPedrigree vertex ID - is unique
690  * \param[in] mother vertex ID of the mother - to create edges
691  * \param[in] iDepth depth of the node in the lineage - to compute stats
692  * \param[in] iDepthArray array to be modified to add information to the graph
693  * \param[in] iIDArray array to be modified to add information to the graph
694  */
695  void UpdateLineage(MultiIndexContainerTraceIDIterator& it,
696  vtkMutableDirectedGraph* iGraph,
697  unsigned int iPedrigree,
698  vtkIdType mother,
699  unsigned int iDepth,
700  vtkDoubleArray* iDepthArray,
701  vtkDoubleArray* iIDArray);
702 
703 signals:
705  void TracePicked(unsigned int, Qt::CheckState);
706 
708  void TraceVisibilityChanged(unsigned int, Qt::CheckState);
709 
711  void NeedMeshesInfoForImportedTrack(unsigned int);
712 
713  /*
714  * \brief Send signal to tell to the lineage container which lineage to highlight
715  */
716  void UpdateLineageHighlightingFromTrackRootID(unsigned int);
717 
718 public slots:
719 
725  virtual void UpdateElementHighlightingWithGivenTraceIDs(
726  const QStringList& iList, const Qt::CheckState& iCheck);
727 
733  virtual void UpdateElementVisibilityWithGivenTraceIDs(
734  const QStringList& iList, const Qt::CheckState& iCheck);
735 
739  void ChangeColorCode(const QString& iColorCode);
740 
744  void ChangeDivisionsColorCode(const QString& iColorCode);
745 
746  /*
747  * \brief Update the representation of a track (adding glyphs, tubes or updating
748  * the line width). If iRadius or iRadius2 are null then the line width gets updated.
749  * \param[in] iRadius radius of the glyph
750  * \param[in] iRadius2 radius of the tube
751  * \param[in] iWidth line width
752  */
753  void UpdateTracksRepresentation(const double& iRadius,
754  const double& iRadius2,
755  const double& iWidth);
756 
757  /*
758  * \brief Highlight a collection given the track root ID
759  * param[in] iRootTrackID trackID root
760  * param[in] iHighlighted true (highlight) or false (real color)
761  */
762  void HighlightCollection(const unsigned int& iRootTrackID,
763  const bool& iHighlighted);
764  /*
765  * \brief Update the collection highlight
766  * \param[in] it iterator to go through the lineage
767  * \param[in] iHighlighted highlight (true) or real color (false)
768  */
769  void UpdateCollectionHighlighted(MultiIndexContainerTraceIDIterator& it,
770  const bool& iHighlighted);
771 /*
772  * \brief Change the highlight of the division belonging to the given structure.
773  * Structure is modified through unary function.
774  * \param[in] it iterator to the structure to be modified
775  * \param[in] iHighlight highlight (true) or real color (false)
776  */
777  int ModifyDivisionHighlight(MultiIndexContainerTraceIDIterator& it,
778  const bool& iHighlight);
779 
780  /*
781  * \brief Show/hide a collection given the track root ID
782  * param[in] iRootTrackID trackID root
783  * param[in] iVisibility true (show) or false (hide)
784  */
785  void ShowCollection(const unsigned int&, const bool&);
786  /*
787  * \brief Update the collection visibility
788  * \param[in] it iterator to go through the lineage
789  * \param[in] iVisibility show (true) or hide (false)
790  */
791  void UpdateCollectionVisibility(MultiIndexContainerTraceIDIterator& it,
792  const bool& iVisibility);
793  /*
794  * \brief Delete a collection given the track root ID
795  * param[in] iRootTrackID trackID root
796  */
797  void DeleteCollection(unsigned int); /*
798  * \brief Update the collection delete
799  * \param[in] it iterator to go through the lineage
800  */
801  void UpdateCollectionDelete( MultiIndexContainerTraceIDIterator& it);
802 
803  /*
804  * \brief Change the visibility of the division belonging to the given structure.
805  * Structure is modified through unary function.
806  * \param[in] it iterator to the structure to be modified
807  * \param[in] iVisibility show (true) or hide (false)
808  */
809  int ModifyDivisionVisibility(MultiIndexContainerTraceIDIterator& it,
810  const bool& iVisibility );
811 
812  /*
813  * \brief Delete the division belonging to the given track
814  * \param[in] iMotherID ID of the track which owns the division
815  */
816  void DeleteADivision(const unsigned int& iMotherID);
817 
818  void AddVolume(const unsigned int& iTrackID, const double& iVolume);
819 
820 protected:
821  /*
822  \todo Nicolas why protected??
823  */
829  void RecomputeMap( TrackStructure* iStructure, std::list< double* >& iPoints);
830 
835  double* setTrackNodeScalars(const QString& iArrayName);
836 
841  double* setDivisionNodeScalars(const QString& iArrayName);
842 
843  void ComputeSpeed();
844 
845 private:
849 
850  Q_DISABLE_COPY(TrackContainer);
851 };
852 
853 #endif // TrackCONTAINER_H
MultiIndexContainerType::value_type MultiIndexContainerElementType
virtual std::list< unsigned int > DeleteAllHighlightedElements()=0
Delete all highlighted elements.
Add an array to a division with an unary function. Useful for the color coding.
void UpdateTracksStrings(const TList &iTrackList)
Update the points strings of the tracks for each element of the list { 1 -Add trackID to current elem...
change_data_color_division(const double *iColor)
void operator()(TrackStructure &iStructure)
QString m_ActiveTrackScalars
bool UpdateCurrentElementFromExistingOne(unsigned int iTraceID, bool iErase=true)
put the information of the existing element into m_CurrentElement and remove the existing element fro...
Superclass::MultiIndexContainerType MultiIndexContainerType
TrackType::PointsMapIterator PointsMapIterator
change_highlighted_division(vtkProperty *iProperty, bool iHighlight)
MultiIndexContainerType::template index< TraceID >::type::iterator MultiIndexContainerTraceIDIterator
void ModifyDivisionHighlight(vtkProperty *iProperty, const bool &iHighlight)
void AddVolume(const double &iVolume)
void operator()(TrackStructure &iStructure)
void operator()(TrackStructure &iStructure)
change_actor_color_division(const double *iColor)
Create a polydata for a division with an unary function. Useful for the color coding.
void CreateDivisionNode(vtkPolyData *iNode)
Change the visibility of a division with an unary function.
void operator()(TrackStructure &iStructure)
TrackType::PointsMapType PointsMapType
class for the visualization of 3D Image represented by one vtkImageData*.
Change the highlight of a division with an unary function.
multi_index::multi_index_container< TrackStructure, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< TraceID >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< CollectionID >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< Highlighted >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< Visible >, > >> MultiIndexTrackContainer
Structure which represent a track, and used for interaction between Visualization and TableWidget...
Generic interface for trace container. More specific container should inherit from this class and get...
QString m_ActiveDivisionScalars
void ModifyDivisionColorData(const double *iColor)
virtual bool DeleteElement(const unsigned int &iId)=0
Remove the element which TraceId = iId.
add_volume(const double &iVolume)
create_node_division(vtkPolyData *iNode)
void ModifyDivisionVisibility(const bool &iVisibility)
TrackType::PointsMapConstIterator PointsMapConstIterator
TraceContainerBase< boost::MultiIndexTrackContainer > Superclass
Superclass::MultiIndexContainerElementType TrackType
void AddDivisionArray(vtkIntArray *iArray)
void operator()(TrackStructure &iStructure)
void operator()(TrackStructure &iStructure)
Wraps a boost multi index container of TrackStructure. This class intends to synchronize Track repres...
void UpdateElementHighlighting(const unsigned int &TraceId)
Update highlighting property of one element given one actor.
void ModifyDivisionColorActor(const double *iColor)
add_array_division(vtkIntArray *iArray)
change_visible_division(const bool &iVisible)
vtkIntArray * array
void UpdateElementVisibility(const unsigned int &iTraceID, const bool &iState)
Update highlighting property of one element given one actor.
void operator()(TrackStructure &iStructure)
Structure which represent a trace (contour, mesh, track, lineage), and used for interaction between V...