X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvDeformableRegistration.cxx;h=980b3e7d1f86633811d1f8afe08ce93a5214f199;hb=1c6241402b25efea0052f0464be9a494e761b19e;hp=1586808ed1271ae624dda2d6e8471a456292ff35;hpb=fad7d69a7df544d05deaa19b81bd770aa4c7dd47;p=clitk.git diff --git a/vv/vvDeformableRegistration.cxx b/vv/vvDeformableRegistration.cxx index 1586808..980b3e7 100644 --- a/vv/vvDeformableRegistration.cxx +++ b/vv/vvDeformableRegistration.cxx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #include #include #include @@ -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(); reader->SetInputFilename(output_filename); - reader->Update(VECTORFIELD); + reader->Update(vvImageReader::VECTORFIELD); finish=clock(); DD((finish - start)/static_cast(CLOCKS_PER_SEC)); mOutput = reader->GetOutput();