3D Human Airway Tree
Program generuje ludzkie drzewo oskrzelowe
TreeBranchConsumer.h
Idź do dokumentacji tego pliku.
1 /*
2  <one line to give the program's name and a brief idea of what it does.>
3  Copyright (C) 2011 Kacper Pluta <kacperp@wsinf.edu.pl>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 
21 #ifndef TREEBRANCHCONSUMER_H
22 #define TREEBRANCHCONSUMER_H
23 
24 #include <stack>
25 #include <boost/thread.hpp>
26 #include <vtkPolyData.h>
27 #include "Branch.h"
28 
30 {
31 private:
32  std::stack<boost::shared_ptr<Branch> > &pile;
33  boost::shared_ptr<Branch> masterRoot;
34  vtkPolyData *tmpPolyData;
35  boost::thread *t;
36  void Consumer();
37 public:
38  vtkPolyData *GetOutput() const {return tmpPolyData;}
39  TreeBranchConsumer(std::stack<boost::shared_ptr<Branch> > &p_pile, boost::shared_ptr<Branch> p_masterRootRegion) : pile(p_pile), masterRoot(p_masterRootRegion){tmpPolyData = p_masterRootRegion->GetOutput();}
41  boost::thread *Start();
42 
43 };
44 #endif // TREEBRANCHCONSUMER_H