Skip to content

Commit

Permalink
Tudo Ok. Ver Velocidade e Visualizador Dicom
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavomata committed Feb 19, 2024
1 parent d4f77d0 commit 2060af0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
Binary file modified __pycache__/dicom_utils.cpython-312.pyc
Binary file not shown.
Binary file modified dicom_report.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion dicom_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def on_scroll(self, event):


plt.show()

# Exemplo de uso
plot_slices(path)
# plot_slices(r"H:\DICOMS\Caso William\Silva_W_37288844")


24 changes: 13 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,24 +434,26 @@ def toggle_light_mode():

# Atualize o comando do botão para alternar para o modo claro
btn_dark_mode.config(command=toggle_dark_mode)
"""

def on_table_click(event):
region = tree.identify_region(event.x, event.y)
if region == "cell":
item = tree.identify_row(event.y)
column = tree.identify_column(event.x)
if column == "#12": # Verifica se o clique ocorreu na penúltima coluna
if column == "#12": # Verifica se o clique ocorreu na última coluna
item_text = tree.item(item)["text"]
if " - " in item_text:
dicom_files = tree.item(item)["values"][11] # Coluna 13 (índice 12)
path = dicom_files # Use o caminho diretamente
plot_slices(path)"""


def start_viewer_thread(patient_key, path):
viewer_thread = Thread(target=plot_slices, args=(path,))
_, patient_key = item_text.split(" - ", 1) # Dividir apenas uma vez
dicom_files = tree.item(item)["values"][-1]
start_viewer_thread(patient_key, dicom_files)
else:
messagebox.showerror("Erro", "Futuro Dicom Viewer.")

def start_viewer_thread(patient_key, dicom_files):
viewer_thread = Thread(target=view_dicom_series, args=(patient_key, dicom_files))
viewer_thread.daemon = True
viewer_thread.start()

viewer_thread.start()

def on_double_click(event, tree):
selected_item = tree.selection()[0]
Expand Down

0 comments on commit 2060af0

Please sign in to comment.