Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxReconstructOutputValueParamsInterfaces.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
12 
15 
16 namespace cx
17 {
18 
20  mReconstructer(reconstructer)
21 {
23 }
24 
26 {
27  OutputVolumeParams par = mReconstructer->getOutputVolumeParams();
28  return this->getValue(&par);
29 }
30 
32 {
33  OutputVolumeParams par = mReconstructer->getOutputVolumeParams();
34  if (similar(val, this->getValue(&par)))
35  return false;
36  this->setValue(&par, val);
37  mReconstructer->setOutputVolumeParams(par);
38  return true;
39 }
40 
41 double DoublePropertySpacing::getValue(OutputVolumeParams *params) const { return params->getSpacing(); }
42 
43 void DoublePropertySpacing::setValue(OutputVolumeParams *params, double val) { params->setSpacing(val); }
44 
45 double DoublePropertyXDim::getValue(OutputVolumeParams *params) const { return params->getDim()[0]; }
46 
47 void DoublePropertyXDim::setValue(OutputVolumeParams *params, double val) { params->setDim(0, val); }
48 
49 double DoublePropertyYDim::getValue(OutputVolumeParams *params) const { return params->getDim()[1]; }
50 
51 void DoublePropertyYDim::setValue(OutputVolumeParams *params, double val) { params->setDim(1, val); }
52 
53 double DoublePropertyZDim::getValue(OutputVolumeParams *params) const { return params->getDim()[2]; }
54 
55 void DoublePropertyZDim::setValue(OutputVolumeParams *params, double val) { params->setDim(2, val); }
56 
57 } // namespace cx
virtual double getValue() const
get the data value.
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
virtual void setValue(OutputVolumeParams *params, double val)
Helper struct for sending and controlling output volume properties.
virtual void setValue(OutputVolumeParams *params, double val)
virtual void setValue(OutputVolumeParams *params, double val)
virtual void setValue(OutputVolumeParams *params, double val)
virtual bool setValue(double val)
set the data value.
void changed()
emit when the underlying data value is changed: The user interface will be updated.
bool similar(const CameraInfo &lhs, const CameraInfo &rhs, double tol)
DoublePropertyOutputValueParams(UsReconstructionServicePtr reconstructer)
Namespace for all CustusX production code.