Fraxinus  16.5.0-fx-rc7
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cxReconstructOutputValueParamsInterfaces.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) 2008-2014, SINTEF Department of Medical Technology
5 All rights reserved.
6 
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9 
10 1. Redistributions of source code must retain the above copyright notice,
11  this list of conditions and the following disclaimer.
12 
13 2. Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16 
17 3. Neither the name of the copyright holder nor the names of its contributors
18  may be used to endorse or promote products derived from this software
19  without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 =========================================================================*/
32 #ifndef CXRECONSTRUCTOUTPUTVALUEPARAMSINTERFACES_H_
33 #define CXRECONSTRUCTOUTPUTVALUEPARAMSINTERFACES_H_
34 
35 #include "org_custusx_usreconstruction_Export.h"
36 
37 #include "cxDoublePropertyBase.h"
38 
39 namespace cx
40 {
41 //typedef boost::shared_ptr<class ReconstructionManager> ReconstructManagerPtr;
42 typedef boost::shared_ptr<class UsReconstructionService> UsReconstructionServicePtr;
43 class OutputVolumeParams;
44 
55 class org_custusx_usreconstruction_EXPORT DoublePropertyOutputValueParams : public DoublePropertyBase
56 {
57  Q_OBJECT
58 public:
61  virtual double getValue() const;
62  virtual bool setValue(double val);
63  virtual void connectValueSignals(bool on) {}
64 
65 private slots:
66 
67 protected:
68  virtual double getValue(OutputVolumeParams* params) const = 0;
69  virtual void setValue(OutputVolumeParams* params, double val) = 0;
70 
72 };
73 
76 class org_custusx_usreconstruction_EXPORT DoublePropertySpacing : public DoublePropertyOutputValueParams
77 {
78  Q_OBJECT
79 public:
82  virtual QString getDisplayName() const { return "Spacing Out"; }
83  virtual QString getHelp() const { return "Output Volume Spacing (mm)"; }
84  DoubleRange getValueRange() const { return DoubleRange(0.001,10,0.001); }
85  virtual int getValueDecimals() const { return 3; }
86 
87 protected:
88  virtual double getValue(OutputVolumeParams* params) const;
89  virtual void setValue(OutputVolumeParams* params, double val);
90 };
91 
94 class org_custusx_usreconstruction_EXPORT DoublePropertyXDim : public DoublePropertyOutputValueParams
95 {
96  Q_OBJECT
97 public:
99  virtual ~DoublePropertyXDim() {}
100  virtual QString getDisplayName() const { return "X"; }
101  virtual QString getHelp() const { return "X dimension"; }
102  DoubleRange getValueRange() const { return DoubleRange(1,1000,1); }
103 protected:
104  virtual double getValue(OutputVolumeParams* params) const;
105  virtual void setValue(OutputVolumeParams* params, double val);
106 };
109 class org_custusx_usreconstruction_EXPORT DoublePropertyYDim : public DoublePropertyOutputValueParams
110 {
111  Q_OBJECT
112 public:
114  virtual ~DoublePropertyYDim() {}
115  virtual QString getDisplayName() const { return "Y"; }
116  virtual QString getHelp() const { return "Y dimension"; }
117  DoubleRange getValueRange() const { return DoubleRange(1,1000,1); }
118 protected:
119  virtual double getValue(OutputVolumeParams* params) const;
120  virtual void setValue(OutputVolumeParams* params, double val);
121 };
124 class org_custusx_usreconstruction_EXPORT DoublePropertyZDim : public DoublePropertyOutputValueParams
125 {
126  Q_OBJECT
127 public:
129  virtual ~DoublePropertyZDim() {}
130  virtual QString getDisplayName() const { return "Z"; }
131  virtual QString getHelp() const { return "Z dimension"; }
132  DoubleRange getValueRange() const { return DoubleRange(1,1000,1); }
133 protected:
134  virtual double getValue(OutputVolumeParams* params) const;
135  virtual void setValue(OutputVolumeParams* params, double val);
136 };
137 
141 } // namespace cx
142 
143 #endif /* CXRECONSTRUCTOUTPUTVALUEPARAMSINTERFACES_H_ */
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
virtual QString getDisplayName() const
name of data entity. Used for display to user.
virtual QString getDisplayName() const
name of data entity. Used for display to user.
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
Utility class for describing a bounded numeric range.
Definition: cxDoubleRange.h:53
virtual QString getDisplayName() const
name of data entity. Used for display to user.
Helper struct for sending and controlling output volume properties.
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
DoublePropertyXDim(UsReconstructionServicePtr reconstructer)
DoublePropertyZDim(UsReconstructionServicePtr reconstructer)
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
virtual QString getDisplayName() const
name of data entity. Used for display to user.
DoublePropertySpacing(UsReconstructionServicePtr reconstructer)
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
DoublePropertyYDim(UsReconstructionServicePtr reconstructer)
virtual int getValueDecimals() const
number of relevant decimals in value