Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,32 @@ add_test(
100 # Maximum number of steps
)

add_test(
NAME Cuberille_tibial_cartilage_cropped_0.1
COMMAND CuberilleTestDriver CuberilleTest01
${DATA_DIR}/tibial_cartilage_cropped.nrrd
${ITK_TEST_OUTPUT_DIR}/tibial_cartilage_cropped.vtk
0.1 # Iso-surface value
526 # Expected number of points
938 # Expected number of cells
1 # Generate triangle faces
1 # Project vertices to iso-surface
0.05 # Surface distance threshold
)

add_test(
NAME Cuberille_tibial_cartilage_cropped_0.5
COMMAND CuberilleTestDriver CuberilleTest01
${DATA_DIR}/tibial_cartilage_cropped.nrrd
${ITK_TEST_OUTPUT_DIR}/tibial_cartilage_cropped.vtk
0.5 # Iso-surface value
0 # Expected number of points
0 # Expected number of cells
1 # Generate triangle faces
1 # Project vertices to iso-surface
0.05 # Surface distance threshold
)

#add_test(
# Cuberille_Engine_01
# CuberilleTest01
Expand Down Expand Up @@ -351,6 +377,19 @@ add_test(
# 25 # Maximum number of steps
#)

add_test(
NAME TC_prob_float_9021791_96M_right_cropped
COMMAND CuberilleTestDriver CuberilleTest01
${DATA_DIR}/TC_prob_float_9021791_96M_right_cropped.nrrd
${ITK_TEST_OUTPUT_DIR}/TC_prob_float_9021791_96M_right_cropped.vtk
0.5 # Iso-surface value
132 # Expected number of points
222 # Expected number of cells
1 # Generate triangle faces
1 # Project vertices to iso-surface
0.05 # Surface distance threshold
)

itk_add_test(NAME CuberilleTestDirectionMatrix
COMMAND ${itk-module}TestDriver CuberilleTest02 )

Expand Down
4 changes: 2 additions & 2 deletions test/CuberilleTest01.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ CuberilleTest01Helper(int argc, char * argv[])
int arg = 1;
char * filenameInputImage = argv[arg++];
char * filenameOutputMesh = argv[arg++];
PixelType isoSurfaceValue = atoi(argv[arg++]);
PixelType isoSurfaceValue = atof(argv[arg++]);
unsigned int expectedNumberOfPoints = atoi(argv[arg++]);
unsigned int expectedNumberOfCells = atoi(argv[arg++]);

Expand Down Expand Up @@ -255,7 +255,7 @@ CuberilleTest01(int argc, char * argv[])
{

constexpr unsigned int Dimension = 3;
using PixelType = unsigned char;
using PixelType = float;
using CoordinateType = double;
using QEMeshType = itk::QuadEdgeMesh<CoordinateType, Dimension>;
using MeshType = itk::Mesh<CoordinateType, Dimension>;
Expand Down
Binary file not shown.
Binary file added test/Input/prostate_00.nii.gz
Binary file not shown.
Binary file added test/Input/tibial_cartilage_cropped.nrrd
Binary file not shown.
16 changes: 16 additions & 0 deletions wrapping/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ set(test_input_dir ${CMAKE_CURRENT_SOURCE_DIR}/../../test/Input)

list(FIND ITK_WRAP_IMAGE_DIMS 3 wrap_3_index)
if(wrap_3_index GREATER -1)
itk_python_add_test(NAME Cuberille_tibial_cartilage_cropped_python
TEST_DRIVER_ARGS
COMMAND cuberille_test.py
DATA{${test_input_dir}/tibial_cartilage_cropped.nrrd}
${ITK_TEST_OUTPUT_DIR}/tibial_cartilage_cropped.vtk
0.5 # iso-surface value
)

itk_python_add_test(NAME Cuberille_blob0_python
TEST_DRIVER_ARGS
COMMAND cuberille_test.py
Expand All @@ -23,6 +31,14 @@ if(wrap_3_index GREATER -1)
100 # iso-surface value
)

itk_python_add_test(NAME Cuberille_prostate_00_python
TEST_DRIVER_ARGS
COMMAND cuberille_test.py
DATA{${test_input_dir}/prostate_00.nii.gz}
${ITK_TEST_OUTPUT_DIR}/prostate_00.vtk
1 # iso-surface value
)

itk_python_add_test(NAME Cuberille_hydrogenAtom_35_python
TEST_DRIVER_ARGS
COMMAND cuberille_test.py
Expand Down
Loading