Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxReconstructedOutputVolumeParams.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) 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 =========================================================================*/
11 
12 
13 #ifndef CXRECONSTRUCTEDOUTPUTVOLUMEPARAMS_H_
14 #define CXRECONSTRUCTEDOUTPUTVOLUMEPARAMS_H_
15 
16 #include "org_custusx_usreconstruction_Export.h"
17 
18 #include "cxTransform3D.h"
19 
20 #include "cxXmlOptionItem.h"
21 #include "cxTypeConversions.h"
22 #include "cxImageParameters.h"
23 #include "cxBoundingBox3D.h"
24 
25 namespace cx
26 {
27 
39 class org_custusx_usreconstruction_EXPORT OutputVolumeParams
40 {
41 public:
43  OutputVolumeParams(DoubleBoundingBox3D extent, double inputSpacing, double maxVolumeSize);
44 
45  bool isValid() {return mValid;}
46 
47  unsigned long getVolumeSize() const;
48 
51  void setSpacing(double spacing);
52  double getSpacing() const;
55  void setDim(int index, int newDim);
56  Eigen::Array3i getDim() const;
59  void constrainVolumeSize();
60 
61  void setMaxVolumeSize(double maxSize);
62  unsigned long getMaxVolumeSize();
63 
64  void set_rMd(Transform3D rMd);
65  Transform3D get_rMd();
66 
67  DoubleBoundingBox3D getExtent();
68  double getInputSpacing();
69 
70 private:
71  // controllable data, set only using the setters
72  double mMaxVolumeSize;
73 
74  // constants, set only based on input data
75  double mInputSpacing;
76 
77  ImageParameters mImage;
78  bool mValid;
79 
80  void suggestSpacingKeepBounds(double spacing);
81 };
82 
87 } // namespace cx
88 
89 
90 #endif /* CXRECONSTRUCTEDOUTPUTVOLUMEPARAMS_H_ */
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Helper struct for sending and controlling output volume properties.
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Namespace for all CustusX production code.