Fraxinus  18.10
An IGT application
cxImageParameters.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 #ifndef CXIMAGEPARAMETERS_H
12 #define CXIMAGEPARAMETERS_H
13 
14 #include "cxResourceExport.h"
15 #include "cxPrecompiledHeader.h"
16 
17 #include "cxVector3D.h"
18 #include "cxTransform3D.h"
19 
20 namespace cx
21 {
30 class cxResource_EXPORT ImageParameters
31 {
32 public:
34  ImageParameters(Eigen::Array3i dim, cx::Vector3D spacing, QString parent, cx::Transform3D rMd);
35 
37  QString mParentVolume;
38 
39  double getVolume();
40  unsigned long getNumVoxels() const { return mDim.prod(); }
41 
42  void setDimKeepBoundsAlignSpacing(Eigen::Array3d bounds);
43  void limitVoxelsKeepBounds(unsigned long maxVolumeSize);
44  void setSpacingKeepDim(Eigen::Array3d spacing);
45  void changeToUniformSpacing();
46 
47  Eigen::Array3i getDim() const;
48  Eigen::Array3d getSpacing() const;
49  Eigen::Array3d getBounds();
50 
51  void print(std::ostream& s, vtkIndent indent);
52 
53 private:
54  Eigen::Array3i mDim;
55  Eigen::Array3d mSpacing;
56 
57  void alignSpacingKeepDim(Eigen::Array3d bounds);
58  void setDimFromExtent(Eigen::Array3i extent);
59 };
60 
61 }// namespace cx
62 #endif // CXIMAGEPARAMETERS_H
63 
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
unsigned long getNumVoxels() const
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
void print(QString header, QRect r)
Namespace for all CustusX production code.