Commit 9d0c5a70c5a49023a72e9749603aad98c4a583d0
1 parent
40abd5b9
Exists in
master
and in
2 other branches
Strip whitespaces
Showing
1 changed file
with
13 additions
and
13 deletions
Show diff stats
invesalius/data/surface.py
... | ... | @@ -84,7 +84,7 @@ class Surface(): |
84 | 84 | #plist_filepath = os.path.join(dir_temp, filename + '.plist') |
85 | 85 | temp_plist = tempfile.mktemp() |
86 | 86 | plistlib.writePlist(surface, temp_plist) |
87 | - | |
87 | + | |
88 | 88 | filelist[temp_plist] = plist_filename |
89 | 89 | |
90 | 90 | return plist_filename |
... | ... | @@ -145,7 +145,7 @@ class SurfaceManager(): |
145 | 145 | Publisher.subscribe(self.OnDuplicate, "Duplicate surfaces") |
146 | 146 | Publisher.subscribe(self.OnRemove,"Remove surfaces") |
147 | 147 | Publisher.subscribe(self.UpdateSurfaceInterpolation, 'Update Surface Interpolation') |
148 | - | |
148 | + | |
149 | 149 | def OnDuplicate(self, pubsub_evt): |
150 | 150 | selected_items = pubsub_evt.data |
151 | 151 | proj = prj.Project() |
... | ... | @@ -155,7 +155,7 @@ class SurfaceManager(): |
155 | 155 | # compute copy name |
156 | 156 | name = original_surface.name |
157 | 157 | names_list = [surface_dict[i].name for i in surface_dict.keys()] |
158 | - new_name = utl.next_copy_name(name, names_list) | |
158 | + new_name = utl.next_copy_name(name, names_list) | |
159 | 159 | # create new mask |
160 | 160 | self.CreateSurfaceFromPolydata(polydata = original_surface.polydata, |
161 | 161 | overwrite = False, |
... | ... | @@ -221,7 +221,7 @@ class SurfaceManager(): |
221 | 221 | index_list.append(index) |
222 | 222 | #self.ShowActor(index, True) |
223 | 223 | |
224 | - Publisher.sendMessage('Show multiple surfaces', (index_list, True)) | |
224 | + Publisher.sendMessage('Show multiple surfaces', (index_list, True)) | |
225 | 225 | |
226 | 226 | def OnLargestSurface(self, pubsub_evt): |
227 | 227 | """ |
... | ... | @@ -388,10 +388,10 @@ class SurfaceManager(): |
388 | 388 | matrix = slice_.matrix |
389 | 389 | filename_img = slice_.matrix_filename |
390 | 390 | spacing = slice_.spacing |
391 | - | |
391 | + | |
392 | 392 | algorithm = surface_parameters['method']['algorithm'] |
393 | 393 | options = surface_parameters['method']['options'] |
394 | - | |
394 | + | |
395 | 395 | surface_name = surface_parameters['options']['name'] |
396 | 396 | quality = surface_parameters['options']['quality'] |
397 | 397 | fill_holes = surface_parameters['options']['fill'] |
... | ... | @@ -425,7 +425,7 @@ class SurfaceManager(): |
425 | 425 | pipeline_size += 1 |
426 | 426 | if keep_largest: |
427 | 427 | pipeline_size += 1 |
428 | - | |
428 | + | |
429 | 429 | ## Update progress value in GUI |
430 | 430 | UpdateProgress = vu.ShowProgress(pipeline_size) |
431 | 431 | UpdateProgress(0, _("Creating 3D surface...")) |
... | ... | @@ -438,7 +438,7 @@ class SurfaceManager(): |
438 | 438 | flip_image = True |
439 | 439 | |
440 | 440 | n_processors = multiprocessing.cpu_count() |
441 | - | |
441 | + | |
442 | 442 | pipe_in, pipe_out = multiprocessing.Pipe() |
443 | 443 | o_piece = 1 |
444 | 444 | piece_size = 2000 |
... | ... | @@ -455,7 +455,7 @@ class SurfaceManager(): |
455 | 455 | mask.temp_file, |
456 | 456 | mask.matrix.shape, |
457 | 457 | mask.matrix.dtype, |
458 | - spacing, | |
458 | + spacing, | |
459 | 459 | mode, min_value, max_value, |
460 | 460 | decimate_reduction, |
461 | 461 | smooth_relaxation_factor, |
... | ... | @@ -642,7 +642,7 @@ class SurfaceManager(): |
642 | 642 | polydata.SetSource(None) |
643 | 643 | polydata.DebugOn() |
644 | 644 | del filled_polydata |
645 | - | |
645 | + | |
646 | 646 | normals = vtk.vtkPolyDataNormals() |
647 | 647 | normals.ReleaseDataFlagOn() |
648 | 648 | normals_ref = weakref.ref(normals) |
... | ... | @@ -741,19 +741,19 @@ class SurfaceManager(): |
741 | 741 | (surface.index, surface.name, |
742 | 742 | surface.colour, surface.volume, |
743 | 743 | surface.transparency)) |
744 | - | |
744 | + | |
745 | 745 | #When you finalize the progress. The bar is cleaned. |
746 | 746 | UpdateProgress = vu.ShowProgress(1) |
747 | 747 | UpdateProgress(0, _("Ready")) |
748 | 748 | Publisher.sendMessage('Update status text in GUI', _("Ready")) |
749 | - | |
749 | + | |
750 | 750 | Publisher.sendMessage('End busy cursor') |
751 | 751 | del actor |
752 | 752 | |
753 | 753 | def UpdateSurfaceInterpolation(self, pub_evt): |
754 | 754 | interpolation = int(ses.Session().surface_interpolation) |
755 | 755 | key_actors = self.actors_dict.keys() |
756 | - | |
756 | + | |
757 | 757 | for key in self.actors_dict: |
758 | 758 | self.actors_dict[key].GetProperty().SetInterpolation(interpolation) |
759 | 759 | Publisher.sendMessage('Render volume viewer') | ... | ... |