X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvDeformableRegistration.cxx;h=980b3e7d1f86633811d1f8afe08ce93a5214f199;hb=b1ef733b737c1127f3f8b378d8ca62a17a5d9eed;hp=5d429a8b71f1c15d9486320f47ba53612be0fdc8;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/vv/vvDeformableRegistration.cxx b/vv/vvDeformableRegistration.cxx index 5d429a8..980b3e7 100644 --- a/vv/vvDeformableRegistration.cxx +++ b/vv/vvDeformableRegistration.cxx @@ -27,6 +27,7 @@ #include "vtkVOXImageWriter.h" #include +#include #include "clitkCommon.h" #include "vvSlicerManager.h" @@ -53,8 +54,8 @@ vvDeformableRegistration::vvDeformableRegistration(vvImage::Pointer image,unsign void vvDeformableRegistration::abort() { aborted=true; - std::system("killall deformableregistration"); - std::system("killall clitkVFMerge"); + int tempReturn = std::system("killall deformableregistration"); + tempReturn = std::system("killall clitkVFMerge"); } unsigned int vvDeformableRegistration::getProgress() @@ -70,16 +71,16 @@ void vvDeformableRegistration::cleanup(int frame_number) //remove temporary file for (int i=0; iSetInput(images[i]); +#else + vox->SetInputData(images[i]); +#endif vox->SetFileName(filename.str().c_str()); if (i==refimage) ref_file=filename.str(); @@ -165,7 +170,7 @@ void vvDeformableRegistration::run() command << "clitkZeroVF -i " << temp_dir << "/deformation_" << computed_vf << ".vf -o " << temp_dir << "/deformation_" << refimage << ".vf"; DD(command.str()); //create zero VF for the ref image - std::system(command.str().c_str()); + int tempReturn = std::system(command.str().c_str()); command.str(""); command << "clitkVFMerge "; for (unsigned int i=0; iGetOrigin()[2]; command << " -o " << output_filename << std::endl; DD(command.str()); - std::system(command.str().c_str()); + tempReturn = std::system(command.str().c_str()); cleanup(images.size()); if (aborted) { - std::system(("rm " + output_filename).c_str()); + tempReturn = std::system(("rm " + output_filename).c_str()); return; } vvImageReader::Pointer reader = vvImageReader::New();