Commit d43fdfb9a725ebc2fc9851b0452b0475ee383475
1 parent
991ffa8b
Exists in
master
and in
47 other branches
More cleaning
Showing
3 changed files
with
6 additions
and
15 deletions
Show diff stats
invesalius/control.py
invesalius/data/viewer_slice.py
| ... | ... | @@ -845,8 +845,8 @@ class Viewer(wx.Panel): |
| 845 | 845 | self.interactor.Bind(wx.EVT_SIZE, self.OnSize) |
| 846 | 846 | |
| 847 | 847 | def LoadImagedata(self, pubsub_evt): |
| 848 | - imagedata, mask_dict = pubsub_evt.data | |
| 849 | - self.SetInput(imagedata, mask_dict) | |
| 848 | + mask_dict = pubsub_evt.data | |
| 849 | + self.SetInput(mask_dict) | |
| 850 | 850 | |
| 851 | 851 | def LoadRenderers(self, imagedata): |
| 852 | 852 | number_renderers = self.layout[0] * self.layout[1] |
| ... | ... | @@ -911,7 +911,7 @@ class Viewer(wx.Panel): |
| 911 | 911 | self.cursor_ = cursor |
| 912 | 912 | return cursor |
| 913 | 913 | |
| 914 | - def SetInput(self, imagedata, mask_dict): | |
| 914 | + def SetInput(self, mask_dict): | |
| 915 | 915 | self.slice_ = sl.Slice() |
| 916 | 916 | |
| 917 | 917 | max_slice_number = sl.Slice().GetNumberOfSlices(self.orientation) |
| ... | ... | @@ -921,7 +921,7 @@ class Viewer(wx.Panel): |
| 921 | 921 | self.slice_data = self.create_slice_window() |
| 922 | 922 | self.slice_data.SetCursor(self.__create_cursor()) |
| 923 | 923 | self.cam = self.slice_data.renderer.GetActiveCamera() |
| 924 | - self.__build_cross_lines(imagedata) | |
| 924 | + self.__build_cross_lines() | |
| 925 | 925 | |
| 926 | 926 | # Set the slice number to the last slice to ensure the camera if far |
| 927 | 927 | # enough to show all slices. |
| ... | ... | @@ -936,7 +936,7 @@ class Viewer(wx.Panel): |
| 936 | 936 | ## Insert cursor |
| 937 | 937 | self.SetInteractorStyle(const.STATE_DEFAULT) |
| 938 | 938 | |
| 939 | - def __build_cross_lines(self, imagedata): | |
| 939 | + def __build_cross_lines(self): | |
| 940 | 940 | renderer = self.slice_data.overlay_renderer |
| 941 | 941 | |
| 942 | 942 | cross = vtk.vtkCursor3D() | ... | ... |
invesalius/project.py
| ... | ... | @@ -22,7 +22,6 @@ import glob |
| 22 | 22 | import os |
| 23 | 23 | import plistlib |
| 24 | 24 | import shutil |
| 25 | -import stat | |
| 26 | 25 | import tarfile |
| 27 | 26 | import tempfile |
| 28 | 27 | |
| ... | ... | @@ -35,7 +34,6 @@ import data.mask as msk |
| 35 | 34 | import data.polydata_utils as pu |
| 36 | 35 | import data.surface as srf |
| 37 | 36 | from presets import Presets |
| 38 | -from reader import dicom | |
| 39 | 37 | from utils import Singleton, debug |
| 40 | 38 | import version |
| 41 | 39 | |
| ... | ... | @@ -47,18 +45,13 @@ class Project(object): |
| 47 | 45 | def __init__(self): |
| 48 | 46 | # Patient/ acquistion information |
| 49 | 47 | self.name = '' |
| 50 | - self.dicom_sample = '' | |
| 51 | 48 | self.modality = '' |
| 52 | 49 | self.original_orientation = '' |
| 53 | 50 | self.window = '' |
| 54 | 51 | self.level = '' |
| 55 | 52 | |
| 56 | - # Original imagedata (shouldn't be changed) | |
| 57 | - self.imagedata = '' | |
| 58 | - | |
| 59 | 53 | # Masks (vtkImageData) |
| 60 | 54 | self.mask_dict = {} |
| 61 | - self.last_mask_index = 0 | |
| 62 | 55 | |
| 63 | 56 | # Surfaces are (vtkPolyData) |
| 64 | 57 | self.surface_dict = {} |
| ... | ... | @@ -107,7 +100,6 @@ class Project(object): |
| 107 | 100 | output |
| 108 | 101 | @ index: index of item that was inserted |
| 109 | 102 | """ |
| 110 | - #self.last_mask_index = mask.index | |
| 111 | 103 | index = len(self.mask_dict) |
| 112 | 104 | self.mask_dict[index] = mask |
| 113 | 105 | return index | ... | ... |