CustusX  22.04-rc5
An IGT application

In-house algorithms and adapters around external ones. More...

Classes

class  cx::AlgorithmHelper
 Class with helper functions for algorithms. More...
 
class  cx::CompositeTimedAlgorithm
 
class  cx::CompositeSerialTimedAlgorithm
 
class  cx::CompositeParallelTimedAlgorithm
 
class  cx::ThreadedTimedAlgorithm< T >
 Base class for algorithms that wants to thread and time their execution. T is the return type of the calculated data in the thread. More...
 
class  cx::TimedBaseAlgorithm
 Base class for algorithms that wants to time their execution. More...
 

Functions

ImagePtr cx::resampleImage (PatientModelServicePtr dataManager, ImagePtr image, const Vector3D spacing, QString uid, QString name)
 
ImagePtr cx::resampleImage (PatientModelServicePtr dataManager, ImagePtr image, Transform3D qMd)
 
vtkImageDataPtr cx::cropImage (vtkImageDataPtr input, IntBoundingBox3D cropbox)
 
ImagePtr cx::cropImage (PatientModelServicePtr dataManager, ImagePtr image)
 
ImagePtr cx::duplicateImage (PatientModelServicePtr dataManager, ImagePtr image)
 
QImage cx::vtkImageDataToQImage (vtkImageDataPtr imageData, bool overlay, QColor overlayColor)
 
QRgb cx::convertToQColor (unsigned char *colorsPtr, bool overlay, QColor overlayColor)
 
bool cx::isDark (unsigned char *colorsPtr)
 
QRgb cx::modifyOverlayColor (unsigned char *colorsPtr, QColor overlayColor)
 
vtkImageDataPtr cx::createSlice (ImagePtr image, PLANE_TYPE planeType, Vector3D outputSpacing, Eigen::Array3i outputDimensions, ToolPtr sliceTool, PatientModelServicePtr patientModel, bool applyLUT)
 createSlice Creates a 2D slice through a 3D volume. Result slice will be oriented for radiological view. More...
 
vtkImageDataPtr cx::createSlice (ImagePtr image, PLANE_TYPE planeType, Vector3D position_r, Vector3D target_r, double offset, bool applyLUT)
 
std::vector< int > cx::getSliceVoxelFrom3Dposition (ImagePtr image, PLANE_TYPE planeType, Vector3D position_r)
 
int cx::getSliceNumberFrom3Dposition (ImagePtr image, PLANE_TYPE planeType, Vector3D position_r)
 
Vector3D cx::get3DpositionFromSliceVoxel (ImagePtr image, PLANE_TYPE planeType, std::vector< int > voxel, int sliceNumber)
 
QDateTime cx::extractTimestamp (QString text)
 
template<class T >
std::vector< T > cx::sortOnAcquisitionTime (std::map< QString, T > input)
 
template<class T >
std::vector< T > cx::sortOnGroupsAndAcquisitionTime (std::map< QString, T > input)
 

Detailed Description

In-house algorithms and adapters around external ones.

Function Documentation

cxResource_EXPORT QRgb cx::convertToQColor ( unsigned char *  colorsPtr,
bool  overlay,
QColor  overlayColor 
)

Definition at line 194 of file cxImageAlgorithms.cpp.

cxResource_EXPORT vtkImageDataPtr cx::createSlice ( ImagePtr  image,
PLANE_TYPE  planeType,
Vector3D  outputSpacing,
Eigen::Array3i  outputDimensions,
ToolPtr  sliceTool,
PatientModelServicePtr  patientModel,
bool  applyLUT 
)

createSlice Creates a 2D slice through a 3D volume. Result slice will be oriented for radiological view.

Parameters
imageInput 3D volume
planeTypeOutput 2D slice plane type
outputSpacingOutput slice image spacing
outputDimensionsOutput slice image dimanesions
sliceToolSlicing is performed at this tools position
patientModelCustusX Patient Model. Needed by slicing code
applyLUTApply color 3D lookup table values to 2D output slice
Returns
2D slice as vtkImageData

Definition at line 226 of file cxImageAlgorithms.cpp.

cxResource_EXPORT vtkImageDataPtr cx::createSlice ( ImagePtr  image,
PLANE_TYPE  planeType,
Vector3D  position_r,
Vector3D  target_r,
double  offset,
bool  applyLUT 
)

Definition at line 268 of file cxImageAlgorithms.cpp.

cxResource_EXPORT vtkImageDataPtr cx::cropImage ( vtkImageDataPtr  input,
IntBoundingBox3D  cropbox 
)

Return an image that is cropped using its own croppingBox. The image is not added to the data manager nor saved.

Definition at line 113 of file cxImageAlgorithms.cpp.

cxResource_EXPORT ImagePtr cx::cropImage ( PatientModelServicePtr  dataManager,
ImagePtr  image 
)

Return an image that is cropped using its own croppingBox. The image is not added to the data manager nor saved.

Definition at line 131 of file cxImageAlgorithms.cpp.

cxResource_EXPORT ImagePtr cx::duplicateImage ( PatientModelServicePtr  dataManager,
ImagePtr  image 
)

Return an image that is cropped using its own croppingBox. The image is not added to the data manager nor saved.

Definition at line 104 of file cxImageAlgorithms.cpp.

cxResource_EXPORT QDateTime cx::extractTimestamp ( QString  text)

Definition at line 153 of file cxImageAlgorithms.cpp.

cxResource_EXPORT Vector3D cx::get3DpositionFromSliceVoxel ( ImagePtr  image,
PLANE_TYPE  planeType,
std::vector< int >  voxel,
int  sliceNumber 
)

Definition at line 478 of file cxImageAlgorithms.cpp.

cxResource_EXPORT int cx::getSliceNumberFrom3Dposition ( ImagePtr  image,
PLANE_TYPE  planeType,
Vector3D  position_r 
)

Definition at line 453 of file cxImageAlgorithms.cpp.

cxResource_EXPORT std::vector< int > cx::getSliceVoxelFrom3Dposition ( ImagePtr  image,
PLANE_TYPE  planeType,
Vector3D  position_r 
)

Definition at line 422 of file cxImageAlgorithms.cpp.

cxResource_EXPORT bool cx::isDark ( unsigned char *  colorsPtr)

Definition at line 207 of file cxImageAlgorithms.cpp.

cxResource_EXPORT QRgb cx::modifyOverlayColor ( unsigned char *  colorsPtr,
QColor  overlayColor 
)

Definition at line 217 of file cxImageAlgorithms.cpp.

cxResource_EXPORT ImagePtr cx::resampleImage ( PatientModelServicePtr  dataManager,
ImagePtr  image,
Transform3D  qMd 
)

Return an image that is resampled into space q. The image is not added to the data manager nor saved.

Definition at line 44 of file cxImageAlgorithms.cpp.

cxResource_EXPORT ImagePtr cx::resampleImage ( PatientModelServicePtr  dataManager,
ImagePtr  image,
const Vector3D  spacing,
QString  uid,
QString  name 
)

Return an image that is resampled with a new output spacing. The image is not added to the data manager nor saved.

Definition at line 79 of file cxImageAlgorithms.cpp.

template<class T >
std::vector<T> cx::sortOnAcquisitionTime ( std::map< QString, T >  input)

Assume T is DataPtr or a derived class.

Return a vector of data sorted on acquisition time.

Definition at line 77 of file cxImageAlgorithms.h.

template<class T >
std::vector<T> cx::sortOnGroupsAndAcquisitionTime ( std::map< QString, T >  input)

Assume T is DataPtr or a derived class.

Return a vector of data sorted on acquisition time.

Definition at line 98 of file cxImageAlgorithms.h.

cxResource_EXPORT QImage cx::vtkImageDataToQImage ( vtkImageDataPtr  imageData,
bool  overlay,
QColor  overlayColor 
)

Definition at line 166 of file cxImageAlgorithms.cpp.