iRoCS Toolbox  1.1.0
SHSurfaceMarker.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 SHSURFACEMARKER_HH
26 #define SHSURFACEMARKER_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
32 #include "SphereMarker.hh"
33 
36 
38 {
39 
40  Q_OBJECT
41 
42 public:
43 
45  AnnotationChannelSpecs* channel, QWidget* parent = 0);
47 
48 };
49 
50 
52 {
53 
54  Q_OBJECT
55 
56 public:
57 
59  AnnotationChannelSpecs* channel, QWidget* parent = 0);
61 
62 public slots:
63 
64  virtual void setValues(const Marker* marker);
65 
66 protected slots:
67 
68  virtual void toggleReadOnly();
69 
70 protected:
71 
73 
74 };
75 
76 
78 {
79 
80  Q_OBJECT
81 
82 public:
83 
84  SHSurfaceMarker(AnnotationChannelSpecs *channel = NULL);
86  blitz::TinyVector<double,3> const& position,
87  double radius = 5.0,
88  segmentation::FrequencyArray const &coefficients =
90  AnnotationChannelSpecs *channel = NULL);
91  SHSurfaceMarker(const SHSurfaceMarker& marker);
92  virtual ~SHSurfaceMarker();
93 
94  SHSurfaceMarker &operator=(const SHSurfaceMarker& marker);
95 
96  virtual Marker::MarkerType markerType() const;
97  virtual bool inherits(Marker::MarkerType type) const;
98 
99  virtual MarkerRenderer *addRenderer(ViewWidget* view);
100 
101  int bw() const;
102  segmentation::FrequencyArray const &coefficients() const;
103  void setCoefficients(segmentation::FrequencyArray const &coefficients);
104 
105  atb::SurfaceGeometry const &geometry() const;
106  std::vector<atb::SurfaceGeometry::VertexT> const &vertices() const;
107  std::vector<atb::SurfaceGeometry::NormalT> const &normals() const;
108  std::vector<atb::SurfaceGeometry::IndexT> const &indices() const;
109 
110  static void save(
111  AnnotationChannelSpecs const *channel,
112  BlitzH5File &outFile, std::string const &group,
113  iRoCS::ProgressReporter *pr = NULL);
114  static void load(
115  AnnotationChannelSpecs *channel, BlitzH5File const &inFile,
116  std::string const &group, iRoCS::ProgressReporter *pr = NULL);
117 
118  virtual void writeCSVHeader(std::ofstream &out) const;
119  virtual void saveCSV(std::ofstream &out) const;
120  virtual void loadFromMap(std::map<std::string,std::string> const &values);
121 
122  virtual bool occupiesPositionUm(
123  blitz::TinyVector<double,3> const &positionUm) const;
124 
125  virtual void copyToATBNucleus(atb::Nucleus &nc) const;
126  virtual void copyFromATBNucleus(atb::Nucleus const &nc);
127 
128 private:
129 
130  void _updateTriangles() const;
131  void _updateBoundingBox() const;
132 
133  segmentation::FrequencyArray _coefficients;
134  mutable atb::SurfaceGeometry _surface;
135 
136 };
137 
138 #endif
SHSurfaceMarkerPresetWidget(AnnotationChannelSpecs *channel, QWidget *parent=0)
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)
blitz::Array< std::complex< double >, 1 > FrequencyArray
Definition: SH_tools.hh:38
The Marker class specifies the properties of an abstract Marker that can be contained in an Annotatio...
Definition: Marker.hh:56
Storage and rendering of Triangulated surfaces.
StringControlElement * p_coefficientsControl
virtual ~SHSurfaceMarkerPresetWidget()
The SurfaceGeometry struct provides data structures required for the storage of triangulated surface ...
MarkerType
Marker.hh "liblabelling_qt4/Marker.hh".
Definition: Marker.hh:73