/*========================================================================= Program: clitk Module: $RCSfile: clitkTrajectory2D.cxx,v $ Language: C++ Date: $Date: 2010/03/03 12:41:27 $ Version: $Revision: 1.1 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "clitkTrajectory2D.h" //--------------------------------------------------------------------- void clitk::Trajectory2D::ResampleWithTimeWarpTo(int begin, int end, Trajectory2D & output) const { DD(begin); DD(end); int n = (int)lrint((end-begin)*GetSamplingPeriod()/output.GetSamplingPeriod()); output.resize(n); DD(n); double duration = (end-begin)*GetSamplingPeriod(); DD(duration); double sp = output.GetSamplingPeriod(); DD(output.GetTotalTimeDuration()); // DD(sp); for(int i=0; i