NorMIT-nav  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
cxUsReconstructionService.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::Property::changed
void changed()
emit when the underlying data value is changed: The user interface will be updated.
cx::UsReconstructionServicePtr
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
Definition: cxAcquisitionImplService.h:24
cx::OutputVolumeParams::setSpacing
void setSpacing(double spacing)
Definition: cxReconstructedOutputVolumeParams.cpp:48
cx::DoublePropertyOutputValueParams::DoublePropertyOutputValueParams
DoublePropertyOutputValueParams(UsReconstructionServicePtr reconstructer)
Definition: cxReconstructOutputValueParamsInterfaces.cpp:19
cx::DoublePropertyOutputValueParams::setValue
virtual bool setValue(double val)
set the data value.
Definition: cxReconstructOutputValueParamsInterfaces.cpp:31
cx::DoublePropertyOutputValueParams::mReconstructer
UsReconstructionServicePtr mReconstructer
Definition: cxReconstructOutputValueParamsInterfaces.h:50
cx::DoublePropertyZDim::setValue
virtual void setValue(OutputVolumeParams *params, double val)
Definition: cxReconstructOutputValueParamsInterfaces.cpp:55
cx::DoublePropertyYDim::setValue
virtual void setValue(OutputVolumeParams *params, double val)
Definition: cxReconstructOutputValueParamsInterfaces.cpp:51
cx::OutputVolumeParams::setDim
void setDim(int index, int newDim)
Definition: cxReconstructedOutputVolumeParams.cpp:58
cx::DoublePropertySpacing::setValue
virtual void setValue(OutputVolumeParams *params, double val)
Definition: cxReconstructOutputValueParamsInterfaces.cpp:43
cx::OutputVolumeParams::getDim
Eigen::Array3i getDim() const
Definition: cxReconstructedOutputVolumeParams.cpp:63
cx::UsReconstructionService::paramsChanged
void paramsChanged()
cx::DoublePropertyXDim::setValue
virtual void setValue(OutputVolumeParams *params, double val)
Definition: cxReconstructOutputValueParamsInterfaces.cpp:47
cx::OutputVolumeParams::getSpacing
double getSpacing() const
Definition: cxReconstructedOutputVolumeParams.cpp:52
cx::DoublePropertyOutputValueParams::getValue
virtual double getValue() const
get the data value.
Definition: cxReconstructOutputValueParamsInterfaces.cpp:25
cx::OutputVolumeParams
Helper struct for sending and controlling output volume properties.
Definition: cxReconstructedOutputVolumeParams.h:39
cxReconstructedOutputVolumeParams.h
cx::similar
bool similar(const CameraInfo &lhs, const CameraInfo &rhs, double tol)
Definition: cxCameraStyleForView.cpp:506
cxReconstructOutputValueParamsInterfaces.h