iRoCS Toolbox  1.1.0
CylinderMarker.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * This file belongs to the iRoCS Toolbox.
4  *
5  * Copyright (C) 2015 Thorsten Falk
6  *
7  * Image Analysis Lab, University of Freiburg, Germany
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  **************************************************************************/
24 
25 #ifndef CYLINDERMARKER_HH
26 #define CYLINDERMARKER_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
32 #include "SphereMarker.hh"
33 
34 class OrthoViewWidget;
37 
39 {
40 
41  Q_OBJECT
42 
43 public:
44 
46  AnnotationChannelSpecs *channel, QWidget *parent = 0);
48 
49  virtual void getValues(Marker *marker) const;
50  virtual void setValues(Marker const *marker);
51 
52 protected:
53 
56 
57 };
58 
59 
61 {
62 
63  Q_OBJECT
64 
65 public:
66 
68  AnnotationChannelSpecs *channel, QWidget *parent = 0);
69  virtual ~CylinderMarkerControlWidget();
70 
71  virtual void getValues(Marker *marker) const;
72 
73 public slots:
74 
75  virtual void setValues(Marker const *marker);
76 
77 protected:
78 
81 
82 };
83 
84 
86 {
87 
88  Q_OBJECT
89 
90 public:
91 
92  CylinderMarker(blitz::TinyVector<double,3> const &positionUm = 0.0,
93  double radiusUm = 5.0, double lengthUm = 5.0,
94  double theta = 0.0, double phi = 0.0,
95  AnnotationChannelSpecs *channel = NULL);
96  CylinderMarker(CylinderMarker const &marker);
97  virtual ~CylinderMarker();
98 
99  double lengthUm() const;
100  void setLengthUm(double lengthUm);
101 
102  double theta() const;
103  void setTheta(double theta);
104 
105  double phi() const;
106  void setPhi(double phi);
107 
108  blitz::TinyVector<double,3> orientation() const;
109  void setOrientation(blitz::TinyVector<double,3> orientation);
110 
111  virtual Marker::MarkerType markerType() const;
112  virtual bool inherits(Marker::MarkerType type) const;
113 
114  virtual MarkerRenderer *addRenderer(ViewWidget* view);
115 
116  static void save(
117  AnnotationChannelSpecs const *channel,
118  BlitzH5File &outFile, std::string const &group,
119  iRoCS::ProgressReporter *pr = NULL);
120  static void load(
121  AnnotationChannelSpecs *channel,
122  BlitzH5File const &inFile, std::string const &group,
123  iRoCS::ProgressReporter *pr = NULL);
124 
125  virtual void writeCSVHeader(std::ofstream &out) const;
126  virtual void saveCSV(std::ofstream &out) const;
127  virtual void loadFromMap(std::map<std::string,std::string> const &values);
128 
129  virtual bool occupiesPositionUm(
130  blitz::TinyVector<double,3> const &positionUm) const;
131 
132 protected:
133 
134  virtual void _updateBoundingBox() const;
135 
136  double _lengthUm, _theta, _phi;
137 
138 };
139 
140 #endif
DoubleControlElement * p_lengthControl
virtual void getValues(Marker *marker) const
virtual void setValues(Marker const *marker)
The Marker class specifies the properties of an abstract Marker that can be contained in an Annotatio...
Definition: Marker.hh:56
virtual ~CylinderMarkerPresetWidget()
DoubleControlElement * p_phiControl
DoubleControlElement * p_lengthControl
CylinderMarkerPresetWidget(AnnotationChannelSpecs *channel, QWidget *parent=0)
DoubleControlElement * p_thetaControl
MarkerType
Marker.hh "liblabelling_qt4/Marker.hh".
Definition: Marker.hh:73
DoubleControlElement * p_thetaControl