Commit 32d5709c authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

FIXED no more failed test + failure information

a log entry should always explain why a test failed or aborted.
parent 4576e134
......@@ -5,5 +5,5 @@ camitk_extension( ACTION_EXTENSION
CXX_FLAGS "-w"
DESCRIPTION "This action features basic ITK image processing segmentation algorithms"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh diaphragm.pml head1.STL liver-smooth.obj Mesh.off mixed_3D_beam.msh robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
)
\ No newline at end of file
TEST_FILES bassin.msh diaphragm.pml head1.STL liver-smooth.obj Mesh.off mixed_3D_beam.msh robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
......@@ -101,6 +101,7 @@ Action::ApplyStatus RegionGrowing::apply() {
// this call works only with a GUI (i.e. if theWidget exists)
if ((input == NULL) || (rgWidget == NULL)) {
CAMITK_INFO("RegionGrowing", "apply()", "This action cannot be called without a GUI (input data are required to be set manually.")
return ABORTED;
}
......
......@@ -78,6 +78,7 @@ Action::ApplyStatus GenerateModel::apply() {
// ask the user
originalFilename = QFileDialog::getSaveFileName( NULL, "Generate Model", "", "ModelingML (*.mml)" );
if ( originalFilename.isNull() ) {
CAMITK_INFO("GenerateModel", "apply()", "A filename is required.")
return ABORTED;
}
}
......
......@@ -72,6 +72,7 @@ Action::ApplyStatus CloseAllAction::apply() {
return SUCCESS;
}
else {
CAMITK_INFO("CloseAllAction", "apply()", "Action canceled by user")
return ABORTED;
}
}
......
......@@ -86,16 +86,18 @@ Action::ApplyStatus OpenAction::apply() {
++fileIterator;
}
if (fileIterator == listOfFiles.constEnd()) {
Application::showStatusBarMessage(tr ("All files loaded."));
Application::showStatusBarMessage(tr ("All files opened."));
return SUCCESS;
}
else {
Application::showStatusBarMessage(tr ("Error loading files: ") + (*fileIterator));
Application::showStatusBarMessage(tr ("Error opening files: ") + (*fileIterator));
CAMITK_INFO("OpenAction", "apply()", "Some files can not be opened. Action failed.")
return ERROR;
}
}
else {
Application::showStatusBarMessage(tr ("Open aborted."));
CAMITK_INFO("OpenAction", "apply()", "File is required. Action aborted.")
return ABORTED;
}
}
......
......@@ -119,6 +119,7 @@ Action::ApplyStatus OpenFile::apply() {
return SUCCESS;
}
else {
CAMITK_INFO("OpenFile", "apply()", "A filename is required. Action aborted.")
return ABORTED;
}
}
......
......@@ -198,10 +198,10 @@ Action::ApplyStatus SaveAsAction::apply() {
}
else {
Application::showStatusBarMessage( tr ( "Saving aborted" ), 2000 );
CAMITK_INFO("SaveAsAction", "apply()", "A filename is required. Action aborted.")
return ABORTED;
}
return ERROR;
}
......@@ -5,8 +5,8 @@
# CEP_NAME SDK
# DESCRIPTION "Control of the arbitrary slice on image component"
# TEST_APPLICATION ${APPLICATION_TEST_ACTION}
# TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
# TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
# )
## Recursively update the shiboken path variable containing the CamiTK SDK tree structure
#set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
\ No newline at end of file
#set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
......@@ -97,6 +97,7 @@ Action::ApplyStatus BoxVOI::apply() {
// this call works only with a GUI (i.e. if theWidget exists)
if ( ( input == NULL ) || ( rgWidget == NULL ) ) {
CAMITK_INFO("BoxVOI", "apply()", "This action cannot be called without a GUI (input data are required to be set manually.")
return ABORTED;
}
......@@ -108,7 +109,7 @@ Action::ApplyStatus BoxVOI::apply() {
process ( input );
}
else {
QMessageBox::warning ( NULL, "Warning", "Please select 2 or 6 seeds to apply this method", QMessageBox::Abort );
CAMITK_INFO("BoxVOI", "apply()", "It is required to select 2 or 6 seeds to apply this action. Action Aborted.")
return ABORTED;
}
return SUCCESS;
......@@ -127,7 +128,7 @@ Action::ApplyStatus BoxVOI::apply(QList<QVector3D>* seedPoints) {
process ( input );
}
else {
std::cerr << "Warning: Please select 2 or 6 seeds to apply this method" << std::endl;
CAMITK_INFO("BoxVOI", "apply()", "It is required to select 2 or 6 seeds to apply this action. Action Aborted.")
return ABORTED;
}
......
......@@ -5,18 +5,8 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Helps you to crop a volume to keep only an interesting subsample"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh diaphragm.pml head1.STL liver-smooth.obj Mesh.off mixed_3D_beam.msh robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
TEST_FILES bassin.msh diaphragm.pml head1.STL liver-smooth.obj Mesh.off mixed_3D_beam.msh robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
# "Box Volume Of Interest" action will always fail as it needs a widget to define the
# voxels that define the ROI
# The following line will inverse the result of the test, and therefore transform
# a fail to a pass
# This is needed until there is a way to automatically add input ROI without a widget
# and launch the action with this input from the test environment
if(NOT PACKAGING_NSIS AND BUILD_TESTING)
#TODO set_tests_properties("action-cropvolume-level1-15" PROPERTIES WILL_FAIL true)
endif()
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
......@@ -3,8 +3,8 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Displays the image look-up-table (lut)"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
\ No newline at end of file
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
......@@ -3,5 +3,5 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Re-sample image volumes"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
)
\ No newline at end of file
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
......@@ -4,8 +4,8 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Action-multipicking allows one to make several pixel picking on an image component (volumic image)"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
\ No newline at end of file
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
......@@ -4,5 +4,5 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Allows changing the color of the image pixels"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
)
\ No newline at end of file
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
......@@ -3,8 +3,8 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Use marching cube algorithm to create a surfacic mesh from a volumic image"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img biorad.pic brain.mha cthead1.lsm diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-complex-slow1.nrrd mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
\ No newline at end of file
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
......@@ -3,7 +3,7 @@
camitk_extension( ACTION_EXTENSION
NEEDS_COMPONENT_EXTENSION vtkmesh
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh diaphragm.pml head1.STL liver-smooth.obj Mesh.off mixed_3D_beam.msh robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
TEST_FILES bassin.msh diaphragm.pml head1.STL liver-smooth.obj Mesh.off mixed_3D_beam.msh robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
CEP_NAME SDK
DESCRIPTION "Allows one to reorient a volumic image."
)
......
......@@ -268,6 +268,7 @@ Action::ApplyStatus ReorientImage::apply() {
// --------------- process -------------------
Action::ApplyStatus ReorientImage::process( ImageComponent* image) {
if (image == NULL) {
CAMITK_INFO("ReorientImage", "apply()", "ImageComponent is null. Action Aborted.")
return ABORTED;
}
......
......@@ -2,8 +2,8 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Display in 3D the component"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img brain.mha diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img brain.mha diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
\ No newline at end of file
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
......@@ -4,8 +4,8 @@ camitk_extension( ACTION_EXTENSION
CEP_NAME SDK
DESCRIPTION "Use ray tracing to produce a 3D reprensation of the image"
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img brain.mha diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba.nrrd truthcube.pml
TEST_FILES bassin.msh BigEndian.hdr BigEndian.img BigEndianCompressed1.hdr BigEndianCompressed1.img brain.mha diaphragm.pml head1.STL LittleEndian1.hdr LittleEndian1.img LittleEndianCompressed1.hdr LittleEndianCompressed1.img LittleEndianZ1.hdr liver-smooth.obj Mesh.off mini-ten-nomask-slow1.nrrd mini-vector-slow1.nrrd mixed_3D_beam.msh ramp1.gipl robot.wrl scissors.obj simple.vtk sinus_skin.vtk sinus_skull.vtk skull1.stl structured.vtk testrgba1.nrrd truthcube.pml
)
# Recursively update the shiboken path variable containing the CamiTK SDK tree structure
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
\ No newline at end of file
set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
......@@ -68,6 +68,7 @@ Action::ApplyStatus ChangeColor::apply() {
return SUCCESS;
}
CAMITK_INFO("ChangeColor", "apply()", "Invalid color. Action Aborted.")
return ABORTED;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment