iRoCS Toolbox  1.1.0
CellMarker.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 CELLMARKER_HH
26 #define CELLMARKER_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
32 #include "SurfaceMarker.hh"
33 
35 
37 {
38 
39  Q_OBJECT
40 
41 public:
42 
44  AnnotationChannelSpecs* channel, QWidget* parent = 0);
45  virtual ~CellMarkerPresetWidget();
46 
47  virtual void getValues(Marker* marker) const;
48  virtual void setValues(const Marker* marker);
49 
50 protected slots:
51 
52  void updateLabelSuffix();
53  void updateSubtypeSuffix();
54 
55 protected:
56 
60 
61 };
62 
63 
65 {
66 
67  Q_OBJECT
68 
69 public:
70 
72  AnnotationChannelSpecs* channel, QWidget* parent = 0);
73  virtual ~CellMarkerControlWidget();
74 
75  virtual void getValues(Marker* marker) const;
76 
77 public slots:
78 
79  virtual void setValues(const Marker* marker);
80 
81 protected slots:
82 
83  virtual void toggleReadOnly();
84  void updateLabelSuffix();
85  void updatePredictedLabelSuffix();
86  void updateSubtypeSuffix();
87  void updatePredictedSubtypeSuffix();
88 
89 protected:
90 
102 
103 };
104 
105 
106 class CellMarker : public SurfaceMarker
107 {
108 
109  Q_OBJECT
110 
111 public:
112 
113  CellMarker(
114  blitz::TinyVector<double,3> const& position = 0.0,
115  atb::SurfaceGeometry const * const surface = NULL,
116  AnnotationChannelSpecs *channel = NULL);
117  CellMarker(const CellMarker& marker);
118  virtual ~CellMarker();
119 
120  CellMarker &operator=(const CellMarker& marker);
121 
122  int subtype() const;
123  void setSubtype(const int subtype);
124 
125  int predictedSubtype() const;
126  void setPredictedSubtype(const int subtype);
127 
128  double value() const;
129  void setValue(const double value);
130 
131  double confidence() const;
132  void setConfidence(const double confidence);
133 
134  double sPhase() const;
135  void setSPhase(const double sPhase);
136 
137  bool mitotic() const;
138  void setMitotic(const bool mitotic);
139 
140  bool predictedMitotic() const;
141  void setPredictedMitotic(const bool mitotic);
142 
143  int continuity() const;
144  void setContinuity(const int continuity);
145 
146  int predictedContinuity() const;
147  void setPredictedContinuity(const int continuity);
148 
149  double borderDistanceUm() const;
150  void setBorderDistanceUm(const double borderDistanceUm);
151 
152  double volumeUm3() const;
153  void setVolumeUm3(const double volumeUm3);
154 
155  bool operator<(const CellMarker& rhs) const;
156 
157  static void save(
158  AnnotationChannelSpecs const *channel,
159  BlitzH5File &outFile, std::string const &group,
160  iRoCS::ProgressReporter *pr = NULL);
161  static void load(
162  AnnotationChannelSpecs *channel,
163  BlitzH5File const &inFile, std::string const &group,
164  iRoCS::ProgressReporter *pr = NULL);
165 
166  virtual void writeCSVHeader(std::ofstream &out) const;
167  virtual void saveCSV(std::ofstream &out) const;
168  virtual void loadFromMap(std::map<std::string,std::string> const &values);
169 
170  virtual Marker::MarkerType markerType() const;
171  virtual bool inherits(Marker::MarkerType type) const;
172 
173  virtual MarkerRenderer *addRenderer(ViewWidget* view);
174 
175 private:
176 
177  double _value, _confidence, _sphase, _borderDistance, _volume;
178  bool _mitotic, _predictedMitotic;
179  int _subtype, _predictedSubtype, _continuity, _predictedContinuity;
180 
181 };
182 
183 #endif
IntControlElement * p_continuityControl
Definition: CellMarker.hh:59
IntControlElement * p_predictedContinuityControl
Definition: CellMarker.hh:99
The Marker class specifies the properties of an abstract Marker that can be contained in an Annotatio...
Definition: Marker.hh:56
DoubleControlElement * p_borderDistanceUmControl
Definition: CellMarker.hh:100
DoubleControlElement * p_sPhaseControl
Definition: CellMarker.hh:95
DoubleControlElement * p_confidenceControl
Definition: CellMarker.hh:94
IntControlElement * p_predictedSubtypeControl
Definition: CellMarker.hh:92
TinyMatrix< bool, NRows, NColumns > operator<(TinyMatrix< DataT, NRows, NColumns > const &lhs, TinyMatrix< DataT, NRows, NColumns > const &rhs)
Elementwise comparison of two blitz::TinyMatrices using the less than operator.
virtual ~CellMarkerPresetWidget()
BoolControlElement * p_mitoticControl
Definition: CellMarker.hh:58
DoubleControlElement * p_volumeUm3Control
Definition: CellMarker.hh:101
DoubleControlElement * p_valueControl
Definition: CellMarker.hh:93
BoolControlElement * p_mitoticControl
Definition: CellMarker.hh:96
CellMarkerPresetWidget(AnnotationChannelSpecs *channel, QWidget *parent=0)
IntControlElement * p_continuityControl
Definition: CellMarker.hh:98
IntControlElement * p_subtypeControl
Definition: CellMarker.hh:91
The SurfaceGeometry struct provides data structures required for the storage of triangulated surface ...
virtual void setValues(const Marker *marker)
IntControlElement * p_subtypeControl
Definition: CellMarker.hh:57
virtual void getValues(Marker *marker) const
MarkerType
Marker.hh "liblabelling_qt4/Marker.hh".
Definition: Marker.hh:73
BoolControlElement * p_predictedMitoticControl
Definition: CellMarker.hh:97