Commit 9ced0a4704a63779ef298266dad69306265feea8

Authored by Thiago Franco de Moraes
1 parent 65bab099
Exists in import_mesh

Reading obj mesh files

invesalius/data/surface.py
... ... @@ -245,7 +245,7 @@ class SurfaceManager():
245 245  
246 246 def OnImportSurfaceFile(self, pubsub_evt):
247 247 """
248   - Creates a new surface from a surface file (STL, PLY or VTP)
  248 + Creates a new surface from a surface file (STL, PLY, OBJ or VTP)
249 249 """
250 250 filename = pubsub_evt.data
251 251 self.CreateSurfaceFromFile(filename)
... ... @@ -255,6 +255,8 @@ class SurfaceManager():
255 255 reader = vtk.vtkSTLReader()
256 256 elif filename.lower().endswith('.ply'):
257 257 reader = vtk.vtkPLYReader()
  258 + elif filename.lower().endswith('.obj'):
  259 + reader = vtk.vtkOBJReader()
258 260 elif filename.lower().endswith('.vtp'):
259 261 reader = vtk.vtkXMLPolyDataReader()
260 262 else:
... ...
invesalius/gui/dialogs.py
... ... @@ -223,9 +223,10 @@ WILDCARD_NIFTI = "NIfTI 1 (*.nii)|*.nii|" \
223 223 WILDCARD_PARREC = "PAR/REC (*.par)|*.par|" \
224 224 "All files (*.*)|*.*"
225 225  
226   -WILDCARD_MESH_FILES = "STL (*.stl)|*.stl|" \
227   - "PLY (*.ply)|*.ply|" \
228   - "VTP (*.vtp)|*.vtp|" \
  226 +WILDCARD_MESH_FILES = "STL File format (*.stl)|*.stl|" \
  227 + "Standard Polygon File Format (*.ply)|*.ply|" \
  228 + "Alias Wavefront Object (*.obj)|*.obj|" \
  229 + "VTK Polydata File Format (*.vtp)|*.vtp|" \
229 230 "All files (*.*)|*.*"
230 231  
231 232  
... ...