CustusX  20.03-rc1
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...
 
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 191 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 223 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 110 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 128 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 101 of file cxImageAlgorithms.cpp.

cxResource_EXPORT QDateTime cx::extractTimestamp ( QString  text)

Definition at line 150 of file cxImageAlgorithms.cpp.

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

Definition at line 204 of file cxImageAlgorithms.cpp.

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

Definition at line 214 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 41 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 76 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 74 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 95 of file cxImageAlgorithms.h.

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

Definition at line 163 of file cxImageAlgorithms.cpp.