Fraxinus  22.04
An IGT application
cxVolumeHelpers.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 #ifndef CXVOLUMEHELPERS_H_
13 #define CXVOLUMEHELPERS_H_
14 
15 #include "cxResourceExport.h"
16 
17 #include <map>
18 #include "cxVector3D.h"
19 #include "vtkForwardDeclarations.h"
20 #include "cxBoundingBox3D.h"
21 #include "cxTransform3D.h"
22 #include "cxForwardDeclarations.h"
23 
24 namespace cx
25 {
26 typedef boost::shared_ptr<class Image> ImagePtr;
27 typedef boost::shared_ptr<class Data> DataPtr;
28 
34 cxResource_EXPORT vtkImageDataPtr generateVtkImageData(Eigen::Array3i dim, Vector3D spacing, const unsigned char initValue, int components = 1);
35 cxResource_EXPORT vtkImageDataPtr generateVtkImageDataUnsignedShort(Eigen::Array3i dim,
36  Vector3D spacing,
37  const unsigned short initValue,
38  int components = 1);
39 cxResource_EXPORT vtkImageDataPtr generateVtkImageDataSignedShort(Eigen::Array3i dim,
40  Vector3D spacing,
41  const short initValue,
42  int components = 1);
43 cxResource_EXPORT vtkImageDataPtr generateVtkImageDataDouble(Eigen::Array3i dim, Vector3D spacing, double initValue);
44 cxResource_EXPORT void fillShortImageDataWithGradient(vtkImageDataPtr data, int maxValue);
45 cxResource_EXPORT ImagePtr createDerivedImage(PatientModelServicePtr dataManager, QString uid, QString name, vtkImageDataPtr raw, ImagePtr parent);
46 
47 
57 cxResource_EXPORT ImagePtr convertImageToUnsigned(PatientModelServicePtr dataManager, ImagePtr image, vtkImageDataPtr suggestedConvertedVolume = vtkImageDataPtr(), bool verbose = true);
58 
59 cxResource_EXPORT std::map<std::string, std::string> getDisplayFriendlyInfo(ImagePtr image);
60 cxResource_EXPORT std::map<std::string, std::string> getDisplayFriendlyInfo(vtkImageDataPtr image);
61 cxResource_EXPORT void printDisplayFriendlyInfo(std::map<std::string, std::string> map);
62 
63 cxResource_EXPORT int calculateNumVoxelsWithMaxValue(ImagePtr image);
64 cxResource_EXPORT int calculateNumVoxelsWithMinValue(ImagePtr image);
65 
66 cxResource_EXPORT DoubleBoundingBox3D findEnclosingBoundingBox(std::vector<DataPtr> data, Transform3D qMr = Transform3D::Identity());
67 cxResource_EXPORT DoubleBoundingBox3D findEnclosingBoundingBox(std::vector<ImagePtr> data, Transform3D qMr = Transform3D::Identity());
68 
69 
72 
73 cxResource_EXPORT vtkImageDataPtr convertImageDataTo8Bit(vtkImageDataPtr image, double windowWidth, double windowLevel);
74 
81 cxResource_EXPORT void setDeepModified(vtkImageDataPtr image);
82 
83 
88 }
89 
90 
91 #endif /* CXVOLUMEHELPERS_H_ */
std::map< std::string, std::string > getDisplayFriendlyInfo(MeshPtr mesh)
vtkImageDataPtr generateVtkImageDataUnsignedShort(Eigen::Array3i dim, Vector3D spacing, const unsigned short initValue, int components)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
int calculateNumVoxelsWithMinValue(ImagePtr image)
Find number of voxels containing min scalar value.
DoubleBoundingBox3D findEnclosingBoundingBox(std::vector< DataPtr > data, Transform3D qMr)
vtkImageDataPtr generateVtkImageDataSignedShort(Eigen::Array3i dim, Vector3D spacing, const short initValue, int components)
ImagePtr convertImageToUnsigned(PatientModelServicePtr dataManager, ImagePtr image, vtkImageDataPtr suggestedConvertedVolume, bool verbose)
boost::shared_ptr< class Data > DataPtr
ImagePtr createDerivedImage(PatientModelServicePtr dataManager, QString uid, QString name, vtkImageDataPtr raw, ImagePtr parent)
vtkImageDataPtr convertImageDataTo8Bit(vtkImageDataPtr image, double windowWidth, double windowLevel)
Have never been used or tested. Create a test for it.
vtkImageDataPtr convertFrom4To3Components(vtkImageDataPtr image)
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
void fillShortImageDataWithGradient(vtkImageDataPtr data, int maxValue)
int calculateNumVoxelsWithMaxValue(ImagePtr image)
Find number of voxels containing max scalar value.
vtkImageDataPtr generateVtkImageData(Eigen::Array3i dim, Vector3D spacing, const unsigned char initValue, int components)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
vtkImageDataPtr convertImageDataToGrayScale(vtkImageDataPtr image)
void setDeepModified(vtkImageDataPtr image)
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
void printDisplayFriendlyInfo(std::map< std::string, std::string > map)
vtkImageDataPtr generateVtkImageDataDouble(Eigen::Array3i dim, Vector3D spacing, double initValue)
Namespace for all CustusX production code.