Skip to content

Commit

Permalink
deleted unused modules
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-abdelgawad committed Aug 5, 2024
1 parent 7fec4a4 commit 966aa7b
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 1,029 deletions.
14 changes: 8 additions & 6 deletions invesalius/data/slice_.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# --------------------------------------------------------------------------
import os
import tempfile
from typing import TYPE_CHECKING, Optional, Tuple
from typing import TYPE_CHECKING, Optional, Tuple, Union

import numpy as np
from vtkmodules.vtkCommonCore import vtkLookupTable
Expand Down Expand Up @@ -62,8 +62,8 @@ class SliceBuffer:

def __init__(self):
self.index: int = -1
self.image = None
self.mask = None
self.image: Optional[np.ndarray] = None
self.mask: Optional[np.ndarray] = None
self.vtk_image: Optional[vtkImageData] = None
self.vtk_mask: Optional[vtkImageData] = None

Expand Down Expand Up @@ -99,8 +99,10 @@ def __init__(self):
self._affine: np.ndarray = np.identity(4)
self._n_tracts: int = 0
self._tracker = None
self.aux_matrices = {}
self.aux_matrices_colours = {}
self.aux_matrices: dict[str, np.ndarray] = {}
self.aux_matrices_colours: dict[
str, dict[Union[int, float], Tuple[float, float, float]]
] = {}
self.state = const.STATE_DEFAULT

self.to_show_aux = ""
Expand Down Expand Up @@ -134,7 +136,7 @@ def __init__(self):

self.from_ = OTHER
self.__bind_events()
self.opacity = 0.8
self.opacity: float = 0.8

@property
def matrix(self) -> Optional[np.ndarray]:
Expand Down
5 changes: 3 additions & 2 deletions invesalius/data/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import tempfile
import time
from concurrent import futures
from typing import Optional

import numpy as np
import wx
Expand Down Expand Up @@ -2718,8 +2719,8 @@ def __init__(self):
self.con_2d = 4
self.con_3d = 6

self.t0: "int | None" = None
self.t1: "int | None" = None
self.t0: Optional[int] = None
self.t1: Optional[int] = None

self.fill_value = 254

Expand Down
2 changes: 1 addition & 1 deletion invesalius/data/vtk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def UpdateProgress(obj: Union[float, int, "vtkAlgorithm"], label: str = "") -> f

class Text:
def __init__(self):
self.layer = 99
self.layer: int = 99
self.children = []
property = vtkTextProperty()
property.SetFontSize(const.TEXT_SIZE)
Expand Down
60 changes: 0 additions & 60 deletions invesalius/expanduser.py

This file was deleted.

9 changes: 5 additions & 4 deletions invesalius/gui/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
from invesalius.data.mask import Mask
from invesalius.data.styles import (
CropMaskConfig,
FFillConfig,
FFillSegmentationConfig,
SelectPartConfig,
WatershedConfig,
Expand Down Expand Up @@ -2331,9 +2332,9 @@ class MaskBooleanDialog(wx.Dialog):
def __init__(
self,
masks: Dict[int, "Mask"],
ID=-1,
title=_("Boolean operations"),
style=wx.DEFAULT_DIALOG_STYLE | wx.FRAME_FLOAT_ON_PARENT,
ID: int = -1,
title: str = _("Boolean operations"),
style: int = wx.DEFAULT_DIALOG_STYLE | wx.FRAME_FLOAT_ON_PARENT,
):
wx.Dialog.__init__(self, wx.GetApp().GetTopWindow(), ID, title=title, style=style)

Expand Down Expand Up @@ -3064,7 +3065,7 @@ def Pulse(self) -> None:


class FFillOptionsDialog(wx.Dialog):
def __init__(self, title: str, config: "FFillSegmentationConfig"):
def __init__(self, title: str, config: "FFillConfig"):
wx.Dialog.__init__(
self,
wx.GetApp().GetTopWindow(),
Expand Down
Loading

0 comments on commit 966aa7b

Please sign in to comment.