]> Creatis software - clitk.git/blob - vv/vvMidPosition.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvMidPosition.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
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
8
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.
12
13   It is distributed under dual licence
14
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
20 #include <string>
21 #include <QThread>
22 #include <QProgressDialog>
23 #include "vvImage.h"
24 #include "vvSlicerManager.h"
25
26 class vvMidPosition : public QThread
27 {
28 public:
29     vvMidPosition();
30
31     ///Call this to trigger the computation in a separate thread and wait until it's done
32     void Update();
33     vvSlicerManager * slicer_manager;
34     ///True if there is an error during the computation
35     bool error;
36     std::string error_message;
37     vvImage::Pointer output;
38     int reference_image_index;
39 protected:
40     void run();
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
45     int progress;
46 };
47
48 #endif