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 vvMeshReader_h
19 #define vvMeshReader_h
27 class vvMeshReader : public QThread
30 ///Returns the contour names present in a dc struct file
31 std::vector<std::pair<int,std::string> > GetROINames();
34 void SetFilename(const std::string f) { filename=f; }
35 void SetModeToVTK() {vtk_mode=true;}
36 void SetSelectedItems(const std::vector<int> & items) {selected_contours=items;}
37 void SetImage(vvImage::Pointer im) {image=im;}
38 void SetPropagationVF(vvImage::Pointer vf) {this->vf=vf;}
39 std::vector<vvMesh::Pointer> GetOutput() {return result;}
40 ///Called from the main thread, runs the reader and displays the progress bar
46 ///Indicates if the reader should expect a vtk polydata file instead of a dicom-struct
48 ///The list of indexes of contours the reader should read
49 std::vector<int> selected_contours;
50 ///Image the mesh will be displayed over, for binarization
51 vvImage::Pointer image;
52 std::vector<vvMesh::Pointer> result;
54 ///Read a DC-struct file and return an extruded version of the contours
55 std::vector<vvMesh::Pointer> readSelectedContours();
56 ///Vector field used to propagate the contour
58 ///Binarize the output of readSelectedContours() and mesh it with a Marching Cubes
59 void Remesh(vvMesh::Pointer roi);