33 #ifndef CXTESTUTILITIES_H_ 34 #define CXTESTUTILITIES_H_ 36 #include "cxtestutilities_export.h" 44 #include "sscConfig.h" 51 static inline QString GetDataRoot();
52 static inline QString ExpandDataFileName(QString fileName);
58 QString dataRoot = SSC_DATA_ROOT;
65 QString dataRoot = SSC_DATA_ROOT;
66 QString expandedName = dataRoot + fileName;
79 static QString getDataRoot(QString suffix =
"");
80 static vtkImageDataPtr create3DVtkImageData(Eigen::Array3i dim = Eigen::Array3i(3,3,3),
const unsigned int voxelValue = 100);
81 static cx::ImagePtr create3DImage(Eigen::Array3i dim = Eigen::Array3i(3,3,3),
const unsigned int voxelValue = 100);
83 static std::vector<cx::ImagePtr> create3DImages(
unsigned int imageCount, Eigen::Array3i dim = Eigen::Array3i(3,3,3),
const unsigned int voxelValue = 100);
85 static unsigned int getNumberOfVoxelsAboveThreshold(
vtkImageDataPtr image,
int threshold,
int component=0);
87 static double getFractionOfVoxelsAboveThreshold(
vtkImageDataPtr image,
int threshold,
int component=0);
89 static void sleep_sec(
int seconds);
103 #define EXPORT_DUMMY_CLASS_FOR_LINKING_ON_WINDOWS_IN_LIB_WITHOUT_EXPORTED_CLASS(EXPORT_MACRO) \ 104 class EXPORT_MACRO DummyTestClassForLinkingOnWindows \
boost::shared_ptr< class Image > ImagePtr
static QString GetDataRoot()
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
static QString ExpandDataFileName(QString fileName)