iRoCS Toolbox  1.1.0
SphereMarker.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 SPHEREMARKER_HH
26 #define SPHEREMARKER_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
32 #include "PointMarker.hh"
33 
34 class OrthoViewWidget;
37 
39 {
40 
41  Q_OBJECT
42 
43 public:
44 
46  AnnotationChannelSpecs* channel, QWidget* parent = 0);
47  virtual ~SphereMarkerPresetWidget();
48 
49  virtual void getValues(Marker* marker) const;
50  virtual void setValues(const Marker* marker);
51 
52 protected:
53 
55 
56 };
57 
58 
60 {
61 
62  Q_OBJECT
63 
64 public:
65 
67  AnnotationChannelSpecs* channel, QWidget* parent = 0);
68  virtual ~SphereMarkerControlWidget();
69 
70  virtual void getValues(Marker* marker) const;
71 
72 public slots:
73 
74  virtual void setValues(const Marker* marker);
75 
76 protected:
77 
79 
80 };
81 
82 
83 class SphereMarker : public PointMarker
84 {
85 
86  Q_OBJECT
87 
88 public:
89 
90  SphereMarker(AnnotationChannelSpecs* channel = NULL);
91  SphereMarker(const blitz::TinyVector<double,3>& position,
92  const double radius = 5.0,
93  AnnotationChannelSpecs* channel = NULL);
94  SphereMarker(const SphereMarker& marker);
95  virtual ~SphereMarker();
96 
97  SphereMarker &operator=(const SphereMarker& marker);
98 
99  double radiusUm() const;
100  void setRadiusUm(const double radius);
101 
102  virtual Marker::MarkerType markerType() const;
103  virtual bool inherits(Marker::MarkerType type) const;
104 
105  virtual MarkerRenderer *addRenderer(ViewWidget* view);
106 
107  static void save(
108  AnnotationChannelSpecs const *channel,
109  BlitzH5File &outFile, std::string const &group,
110  iRoCS::ProgressReporter *pr = NULL);
111  static void load(
112  AnnotationChannelSpecs *channel,
113  BlitzH5File const &inFile, std::string const &group,
114  iRoCS::ProgressReporter *pr = NULL);
115 
116  virtual void writeCSVHeader(std::ofstream &out) const;
117  virtual void saveCSV(std::ofstream &out) const;
118  virtual void loadFromMap(std::map<std::string,std::string> const &values);
119 
120  virtual bool occupiesPositionUm(
121  blitz::TinyVector<double,3> const &positionUm) const;
122 
123  virtual void copyToATBNucleus(atb::Nucleus &nc) const;
124  virtual void copyFromATBNucleus(atb::Nucleus const &nc);
125 
126 protected:
127 
128  virtual void _updateBoundingBox() const;
129 
130  double _radiusUm;
131 
132 };
133 
134 #endif
The Nucleus class contains cell nucleus attributes and provides methods to load and save single nucle...
Definition: ATBNucleus.hh:59
virtual void setValues(const Marker *marker)
DoubleControlElement * p_radiusControl
Definition: SphereMarker.hh:54
The Marker class specifies the properties of an abstract Marker that can be contained in an Annotatio...
Definition: Marker.hh:56
double _radiusUm
virtual void getValues(Marker *marker) const
DoubleControlElement * p_radiusControl
Definition: SphereMarker.hh:78
virtual ~SphereMarkerPresetWidget()
MarkerType
Marker.hh "liblabelling_qt4/Marker.hh".
Definition: Marker.hh:73
SphereMarkerPresetWidget(AnnotationChannelSpecs *channel, QWidget *parent=0)