1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef vvMidPosition_h
19 #define vvMidPosition_h
22 #include <QProgressDialog>
24 #include "vvSlicerManager.h"
26 class vvMidPosition : public QThread
31 ///Call this to trigger the computation in a separate thread and wait until it's done
33 vvSlicerManager * slicer_manager;
34 ///True if there is an error during the computation
36 std::string error_message;
37 vvImage::Pointer output;
38 int reference_image_index;
41 ///This is called everytime the main thread wakes up, and updates a progress bar
42 void update_progress();
43 QProgressDialog p_bar;
44 ///Counter for the progress bar. We should use a mutex, but it turns out it isn't needed