img->pixelPicked(point.x()*img->getVoxelSize().x(),point.y()*img->getVoxelSize().y(),point.z()*img->getVoxelSize().z(),img->getAxialSlices());//Need here the voxel coordinates (not voxel index, not voxel world coordinates)
img->pixelPicked(point.x()*spacing[0],point.y()*spacing[1],point.z()*spacing[2],img->getAxialSlices());//Need here the voxel coordinates (not voxel index, not voxel world coordinates)
Application::refresh();
break;
default:
...
...
@@ -319,7 +320,8 @@ void MultiPickingWidget::manuallyModified(int i, int j) {
// 3 possible case, either x, or y or z of one point have been manually changed
// We thus pick this new point
...
...
@@ -330,15 +332,15 @@ void MultiPickingWidget::manuallyModified(int i, int j) {
// Exceptionnally, we do not make this calculation by image picking and use image voxel size
// to mimick a picking from the axial slice.
doublex=iPick*voxSize.x();
doubley=jPick*voxSize.y();
doublez=kPick*voxSize.z();
doublex=iPick*voxSize[0];
doubley=jPick*voxSize[1];
doublez=kPick*voxSize[2];
// check that this point is within image dimensions
if(((x<0)||(x>imageDims[0]*voxSize.x()))||
((y<0)||(y>imageDims[1]*voxSize.y()))||
((z<0)||(z>imageDims[2]*voxSize.z()))){
if(((x<0)||(x>imageDims[0]*voxSize[0]))||
((y<0)||(y>imageDims[1]*voxSize[1]))||
((z<0)||(z>imageDims[2]*voxSize[2]))){
QStringmsg="The point ("+QString::number(x)+", "+QString::number(y)+", "+QString::number(z)+"), does not belong to the image "+img->getName()+". Sorry...";
// 3 possible case, either x, or y or z of one point have been manually changed
// We thus pick this new point
...
...
@@ -369,9 +372,9 @@ void MultiPickingWidget::manuallyModified(int i, int j) {
// check that this point is within image dimensions
if(((x<0)||(x>imageDims[0]*voxSize.x()))||
((y<0)||(y>imageDims[1]*voxSize.y()))||
((z<0)||(z>imageDims[2]*voxSize.z()))){
if(((x<0)||(x>imageDims[0]*voxSize[0]))||
((y<0)||(y>imageDims[1]*voxSize[1]))||
((z<0)||(z>imageDims[2]*voxSize[2]))){
QStringmsg="The point ("+QString::number(x)+", "+QString::number(y)+", "+QString::number(z)+"), does not belong to the image "+img->getName()+". Sorry...";
# TODO CAMITK_DEPRECATED. This macro is marked as deprecated. It is to be removed in CamiTK 4.0
macro(camitk_tool)
message(WARNING "Warning: ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt: camitk_tool macro is deprecated, please usecamitk_library(...) instead (use the same parameters).")