iRoCS Toolbox  1.1.0
SurfaceMarkerOrthoViewRenderer.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 SURFACEMARKERORTHOVIEWRENDERER_HH
26 #define SURFACEMARKERORTHOVIEWRENDERER_HH
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.hh>
30 #endif
31 
33 
34 #include <vector>
35 
36 class SurfaceMarker;
37 class OrthoViewWidget;
38 
39 /*======================================================================*/
45 /*======================================================================*/
48 {
49 
50 public:
51 
56 
57 /*======================================================================*/
63 /*======================================================================*/
64  virtual MarkerOrthoViewRendererCache *clone() const;
65 
66 /*======================================================================*/
77 /*======================================================================*/
78  virtual void render(QPainter *painter) const;
79 
80 /*======================================================================*/
86 /*======================================================================*/
87  std::vector< blitz::TinyVector<QPointF,2> > const &lines() const;
88 
89 /*======================================================================*/
95 /*======================================================================*/
96  std::vector< blitz::TinyVector<QPointF,2> > &lines();
97 
98 protected:
99 
100  std::vector< blitz::TinyVector<QPointF,2> > _lines;
101 
102 };
103 
104 
106 {
107 
108 Q_OBJECT
109 
110 public:
111 
113  SurfaceMarker* marker, OrthoViewWidget* view);
115  SurfaceMarkerOrthoViewRenderer const &renderer);
117 
118  virtual MarkerRenderer *clone() const;
119 
120  virtual void render(
121  QXmlStreamWriter &svgStream,
122  blitz::TinyVector<double,3> const &shapePx,
123  blitz::TinyVector<double,3> const &lowerBoundUm,
124  blitz::TinyVector<double,3> const &upperBoundUm,
125  std::string const &font, double fontSizePt,
126  iRoCS::ProgressReporter *pr = NULL) const;
127 
128  virtual void userInteractionEvent(UserInteractionEvent *event);
129 
130 /*======================================================================*/
144 /*======================================================================*/
145  static blitz::TinyVector<double,2> intersectLineNPlane(
146  const blitz::TinyVector<double,3>& p1,
147  const blitz::TinyVector<double,3>& p2,
148  int sliceDim, double slicePosition);
149 
150 public slots:
151 
152 /*======================================================================*/
169 /*======================================================================*/
170  virtual void updateCache(int direction) const;
171 
172 };
173 
174 #endif
virtual void render(QPainter *painter) const
Render the content of the cache into the given painter.
The MarkerOrthoViewRendererCache class specifies the interface to store and replay marker geometry in...
The SurfaceMarkerOrthoViewRendererCache class stores and replays marker geometry information using a ...
The PointMarkerOrthoViewRendererCache class stores and replays point marker geometry information usin...
virtual MarkerOrthoViewRendererCache * clone() const
Get a new copy of this cache.
std::vector< blitz::TinyVector< QPointF, 2 > > const & lines() const
Get read-only access to the lines vector.
std::vector< blitz::TinyVector< QPointF, 2 > > _lines