iRoCS Toolbox  1.1.0
NucleusMarker.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 NUCLEUSMARKER_HH
26 #define NUCLEUSMARKER_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
32 #include "SHSurfaceMarker.hh"
33 
34 class BoolControlElement;
35 
37 {
38 
39  Q_OBJECT
40 
41 public:
42 
44  AnnotationChannelSpecs* channel, QWidget* parent = 0);
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 ~NucleusMarkerControlWidget();
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 
107 {
108 
109  Q_OBJECT
110 
111 public:
112 
113  NucleusMarker(AnnotationChannelSpecs* channel = NULL);
114  NucleusMarker(const blitz::TinyVector<double,3>& position,
115  double radius = 5.0,
116  segmentation::FrequencyArray const &coefficients =
118  AnnotationChannelSpecs* channel = NULL);
119  NucleusMarker(const NucleusMarker& marker);
120  virtual ~NucleusMarker();
121 
122  NucleusMarker &operator=(const NucleusMarker& marker);
123 
124  int subtype() const;
125  void setSubtype(const int subtype);
126 
127  int predictedSubtype() const;
128  void setPredictedSubtype(const int subtype);
129 
130  double value() const;
131  void setValue(const double value);
132 
133  double confidence() const;
134  void setConfidence(const double confidence);
135 
136  double sPhase() const;
137  void setSPhase(const double sPhase);
138 
139  bool mitotic() const;
140  void setMitotic(const bool mitotic);
141 
142  bool predictedMitotic() const;
143  void setPredictedMitotic(const bool mitotic);
144 
145  int continuity() const;
146  void setContinuity(const int continuity);
147 
148  int predictedContinuity() const;
149  void setPredictedContinuity(const int continuity);
150 
151  double borderDistanceUm() const;
152  void setBorderDistanceUm(const double borderDistanceUm);
153 
154  double volumeUm3() const;
155  void setVolumeUm3(const double volumeUm3);
156 
157  bool operator<(const NucleusMarker& rhs) const;
158 
159  static void save(
160  AnnotationChannelSpecs const *channel,
161  BlitzH5File &outFile, std::string const &group,
162  iRoCS::ProgressReporter *pr = NULL);
163  static void load(
164  AnnotationChannelSpecs *channel,
165  BlitzH5File const &inFile, std::string const &group,
166  iRoCS::ProgressReporter *pr = NULL);
167 
168  virtual void writeCSVHeader(std::ofstream &out) const;
169  virtual void saveCSV(std::ofstream &out) const;
170  virtual void loadFromMap(std::map<std::string,std::string> const &values);
171 
172  virtual Marker::MarkerType markerType() const;
173  virtual bool inherits(Marker::MarkerType type) const;
174 
175  virtual MarkerRenderer *addRenderer(ViewWidget* view);
176 
177  virtual void copyToATBNucleus(atb::Nucleus &nc) const;
178  virtual void copyFromATBNucleus(atb::Nucleus const &nc);
179 
180 private:
181 
182  double _value, _confidence, _sphase, _borderDistance, _volume;
183  bool _mitotic, _predictedMitotic;
184  int _subtype, _predictedSubtype, _continuity, _predictedContinuity;
185 
186 };
187 
188 #endif
The Nucleus class contains cell nucleus attributes and provides methods to load and save single nucle...
Definition: ATBNucleus.hh:59
BoolControlElement * p_mitoticControl
DoubleControlElement * p_borderDistanceUmControl
blitz::Array< std::complex< double >, 1 > FrequencyArray
Definition: SH_tools.hh:38
DoubleControlElement * p_valueControl
DoubleControlElement * p_volumeUm3Control
The Marker class specifies the properties of an abstract Marker that can be contained in an Annotatio...
Definition: Marker.hh:56
DoubleControlElement * p_confidenceControl
IntControlElement * p_predictedSubtypeControl
virtual ~NucleusMarkerPresetWidget()
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 void getValues(Marker *marker) const
IntControlElement * p_continuityControl
IntControlElement * p_subtypeControl
BoolControlElement * p_mitoticControl
IntControlElement * p_subtypeControl
IntControlElement * p_continuityControl
virtual void setValues(const Marker *marker)
NucleusMarkerPresetWidget(AnnotationChannelSpecs *channel, QWidget *parent=0)
IntControlElement * p_predictedContinuityControl
MarkerType
Marker.hh "liblabelling_qt4/Marker.hh".
Definition: Marker.hh:73
DoubleControlElement * p_sPhaseControl
BoolControlElement * p_predictedMitoticControl