Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

VisualizationAids.hxx

Go to the documentation of this file.
00001 /* ImLib3D
00002  * Copyright (c) 2001, ULP-IPB Strasbourg.
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or (at
00007  * your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00020 #include <ImLib3D/Arithmetic.hpp>
00021 
00022 
00023 template <class ImageType>
00024 void
00025 IP3D::AnimateField(const ImageType& imSrc, const Field3Df& _field, Image3DSet<ImageType>& resImages, int nSteps)
00026 {
00027     float stepsize = 1.0/(float)nSteps;
00028     cout << "CAnimateTransformation nbImages to create: " << nSteps << endl;
00029     for (int i=0; i<nSteps; i++)
00030     {
00031         cout << "Creating Image " << i << endl;
00032         Field3Df field(_field);
00033         ImageType* im = new ImageType(imSrc);
00034         field*=stepsize*(i+1);
00035         //      IP3D::MultiplicationByCst(field, , field);
00036         field *= (double)stepsize;
00037         IP3D::TransformWithInverseField(imSrc, field, *im);
00038         resImages.AddImage(im);
00039     }
00040 }

Generated on Fri Jun 17 13:36:09 2005 for ImLib3D by  doxygen 1.4.2