1 /*=========================================================================
5 Author : Joel Schaerer (joel.schaerer@insa-lyon.fr)
9 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
10 CREATIS-LRMN http://www.creatis.insa-lyon.fr
12 This program is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, version 3 of the License.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 =========================================================================*/
25 #ifndef vvMeshReader_h
26 #define vvMeshReader_h
35 class vvMeshReader : public QThread
38 ///Returns the contour names present in a dc struct file
39 std::vector<std::pair<int,std::string> > GetROINames();
42 void SetFilename(const std::string f) { filename=f; }
43 void SetModeToVTK() {vtk_mode=true;}
44 void SetSelectedItems(const std::vector<int> & items) {selected_contours=items;}
45 void SetImage(vvImage::Pointer im) {image=im;}
46 void SetPropagationVF(vvImage::Pointer vf) {this->vf=vf;}
47 std::vector<vvMesh::Pointer> GetOutput() {return result;}
48 ///Called from the main thread, runs the reader and displays the progress bar
54 ///Indicates if the reader should expect a vtk polydata file instead of a dicom-struct
56 ///The list of indexes of contours the reader should read
57 std::vector<int> selected_contours;
58 ///Image the mesh will be displayed over, for binarization
59 vvImage::Pointer image;
60 std::vector<vvMesh::Pointer> result;
62 ///Read a DC-struct file and return an extruded version of the contours
63 std::vector<vvMesh::Pointer> readSelectedContours();
64 ///Vector field used to propagate the contour
66 ///Binarize the output of readSelectedContours() and mesh it with a Marching Cubes
67 void Remesh(vvMesh::Pointer roi);