GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ContourMeshStructure.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 __ContourMeshStructure_h
36 #define __ContourMeshStructure_h
37 
38 class vtkActor;
39 class vtkPolyData;
40 class vtkProperty;
41 
42 #include <ostream>
43 #include <vector>
44 
45 #include "QGoIOConfigure.h"
46 
47 #include "TraceStructure.h"
48 
49 #ifndef DOXYGEN_SHOULD_SKIP_THIS
50 #include "StructureHelper.h"
51 #endif
52 
67 class QGOIO_EXPORT ContourMeshStructure : public TraceStructure
68 {
69 public:
70  //unsigned int CollectionID;
71 
73  unsigned int TCoord;
74 
82  int GetDirection();
83 
89  bool IsAContour();
90 
93 
95  ContourMeshStructure(const unsigned int & iTraceID,
96  const unsigned int & iCollectionID,
97  std::vector< vtkActor * > iActors,
98  vtkPolyData *iNodes,
99  const unsigned int & iT,
100  const bool & iHighlighted,
101  const bool & iVisible,
102  const double & r,
103  const double & g,
104  const double & b,
105  const double & alpha);
106 
108  ContourMeshStructure(const unsigned int & iTraceID,
109  const unsigned int & iCollectionID,
110  std::vector< vtkActor * > iActors,
111  vtkPolyData *iNodes,
112  const unsigned int & iT,
113  const bool & iHighlighted,
114  const bool & iVisible,
115  double iRgba[4]);
116 
118  ContourMeshStructure(const unsigned int & iTraceID,
119  const unsigned int & iCollectionID,
120  vtkActor *iActorXY,
121  vtkActor *iActorYZ,
122  vtkActor *iActorXZ,
123  vtkActor *iActorXYZ,
124  vtkPolyData *iNodes,
125  const unsigned int & iT,
126  const bool & iHighlighted,
127  const bool & iVisible,
128  const double & r,
129  const double & g,
130  const double & b,
131  const double & alpha);
132 
135 
138 
139  void ModifyCollectionID(unsigned int iCollectionID);
140 
142  friend std::ostream & operator<<
143  (std::ostream & os, const ContourMeshStructure & c)
144  {
145  os << "TraceID " << c.TraceID << std::endl;
146  os << "ActorXY " << c.ActorXY << std::endl;
147  os << "ActorXZ " << c.ActorXZ << std::endl;
148  os << "ActorYZ " << c.ActorYZ << std::endl;
149  os << "ActorXYZ " << c.ActorXYZ << std::endl;
150  os << "Nodes " << c.Nodes << std::endl;
151  //os << "CollectionID " << c.CollectionID << std::endl;
152  os << "TCoord " << c.TCoord << std::endl;
153  os << "Highlighted " << c.Highlighted << std::endl;
154  os << "Visible " << c.Visible << std::endl;
155  os << "RGBA [" << c.rgba[0] << ", " << c.rgba[1] << ", " << c.rgba[2]
156  << ", " << c.rgba[3] << "]" << std::endl;
157 
158  return os;
159  }
160 };
161 #endif
Structure which represent a contour or a mesh, and used for interaction between Visualization and Tab...
Structure which represent a trace (contour, mesh, track, lineage), and used for interaction between V...