Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Pedro Alexandre
Hello everybody. 
I need help.
I'm a beginner programmer. 
Wxpython a is very good GUI. The best of me. 
I'm having a serious problem with wxpython. 
I'm using it to make a medical application to report x-ray 
But I me having this problem: 
13:53:04: Out of window IDs.  Recommend shutting down application.
13:53:04: Out of window IDs.  Recommend shutting down application.
13:53:04: Out of window IDs.  Recommend shutting down application.
13:53:04: Out of window IDs.  Recommend shutting down application. 
... 

How could I solve this problem? 
 
Below is part of my code:


#!/usr/bin/env python
# -*- coding: windows-1252 -*-

"""Assistente interativo para realizar laudos de
raio x."""

import wx
import wx.lib.platebtn as platebtn
import anatomia as anat
import info_paciente_widget as info_pw
import speech_recognition as sr
import _thread as thread
import template_txt as temp_txt

# --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


class FalaParaTexto():
    """Classe converte texto falado em texto."""

    def audio_para_texto(self):
        """Função para reconhecer fala e
        retornar texto."""

        reconhecer = sr.Recognizer()

        with sr.Microphone() as fonte:
            audio = reconhecer.listen(fonte)

        try:
            texto_falado = reconhecer.recognize_google(audio, None, "pt-BR")
        except sr.UnknownValueError:
            print("Não entendi")
        except sr.RequestError:
            print("Falha de coneção")
        else:
            return texto_falado



class MyTabPanel(wx.Panel):

    def __init__(self, parent):
        """Classe Notebook tab."""
        wx.Panel.__init__(self, parent=parent)

        self.SetBackgroundColour("white")


class MyPanel_text_editor(wx.Panel):
    """Panel para TextCtrl."""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_text_editor, self).__init__(parent)

        # Gerenciador de Layout
        down = wx.BoxSizer(wx.VERTICAL)
        row1 = wx.BoxSizer()

        # Widget TextCtrl
        self.text_editor = wx.TextCtrl(self, style=wx.TE_MULTILINE)
        row1.Add(self.text_editor, 1, wx.EXPAND|wx.ALL, 5)
        down.Add(row1, 1, wx.EXPAND)

        # SetSizer
        self.SetSizer(down)

class MyPanel_info_clinica(wx.Panel):
    """Panel para exibir informação relevente
    em tempo real para auxiliar nos diagnósticos."""
    def __init__(self, parent):
        """Inicializar atributos da classe"""
        super(MyPanel_info_clinica, self).__init__(parent)

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "Informação")


        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.EXPAND)
        self.SetSizer(vSizer)

        # Gerenciador de layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        # Texto relevante

        self.texto_info_clinica = wx.TextCtrl(tab1, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY)
        vSizer.Add(self.texto_info_clinica, 1, wx.EXPAND)

        # image dica #400X318
        self.file_img = wx.Image("img_para_info.png").ConvertToBitmap()
        self.info_imagem = wx.StaticBitmap(tab1, -1, bitmap=self.file_img)

        vSizer.Add(self.info_imagem, 1, wx.EXPAND)
        tab1.SetSizer(vSizer)

        # TAB 2
        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "Sugestão de conclusão")

        # Texto conclusão
        self.conclusao_info_clinica = wx.TextCtrl(tab2, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY)
        vSizer_tab2 = wx.BoxSizer(wx.VERTICAL)
        vSizer_tab2.Add(self.conclusao_info_clinica, 1, wx.EXPAND)
        tab2.SetSizer(vSizer_tab2)




class MyPanel_img_torax(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_torax, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "PA 1")

        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "PA 2")

        tab3 = MyTabPanel(notebook)
        notebook.AddPage(tab3, "Perfil 1")

        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia

        # Rx normal
        self.btn = anat.Anatomia.rx_normal(tab1, 521, 27, 20, 20)

        # Coração
        self.btn = anat.Anatomia.coracao(tab1, 350, 300, 20, 20)
        self.btn = anat.Anatomia.coracao(tab2, 328, 336, 20, 20)
        self.btn = anat.Anatomia.coracao(tab3, 132, 283, 20, 20)

        # Ventriculo esquerdo
        self.btn = anat.Anatomia.ventriculo(tab1, 376, 311, 20, 20, "ventrículo esquerdo")

        # Ventriculo direito
        self.btn = anat.Anatomia.ventriculo(tab1, 267, 303, 20, 20, "ventrículo direito")


        # Atrio esquerdo
        self.btn = anat.Anatomia.atrio(tab1, 354, 244, 20, 20, "atrio esquerdo")

        # Atrio esquerdo
        self.btn = anat.Anatomia.atrio(tab1, 228, 268, 20, 20, "atrio direito")

        # Aorta
        self.btn = anat.Anatomia.aorta(tab1, 311, 109, 20, 20)
        self.btn = anat.Anatomia.aorta(tab2, 316, 175, 20, 20)
        self.btn = anat.Anatomia.aorta(tab3, 256, 159, 20, 20)

        # Mediastino
        self.btn = anat.Anatomia.mediastino(tab1, 278, 211, 20, 20)
        self.btn = anat.Anatomia.mediastino(tab3, 110, 184, 20, 20)

        # Subclávia
        self.btn = anat.Anatomia.subclavia(tab1, 132, 43, 20, 20, "subclávia direita")
        self.btn = anat.Anatomia.subclavia(tab1, 432, 49, 20, 20, "subclávia esquerda")
        self.btn = anat.Anatomia.subclavia(tab2, 153, 47, 20, 20, "subclávia direita")
        self.btn = anat.Anatomia.subclavia(tab2, 410, 50, 20, 20, "subclávia esquerda")

        # Pulmão
        self.btn_anat = anat.Anatomia.pulmao(tab1, 131, 187, 20, 20, "pulmão direito")
        self.btn_anat = anat.Anatomia.pulmao(tab1, 414, 188, 20, 20, "pulmão esquerdo")

        self.btn_anat = anat.Anatomia.pulmao(tab2, 135, 205, 20, 20, "pulmão direito")
        self.btn_anat = anat.Anatomia.pulmao(tab2, 408, 208, 20, 20, "pulmão esquerdo")

        # Traqueia
        self.btn_anat = anat.Anatomia.traqueia(tab1, 281, 50, 20, 20)
        self.btn_anat = anat.Anatomia.traqueia(tab2, 287, 75, 20, 20)
        self.btn_anat = anat.Anatomia.traqueia(tab3, 251, 67, 20, 20)

        # Esofago
        self.btn_anat = anat.Anatomia.esofago(tab1, 283, 73, 20, 20)
        self.btn_anat = anat.Anatomia.esofago(tab3, 209, 55, 20, 20)


        # Diafragma
        self.btn_anat = anat.Anatomia.diafragma(tab1, 124, 323, 20, 20, "diafragma direito")
        self.btn_anat = anat.Anatomia.diafragma(tab1, 426, 334, 20, 20, "diafragma esquerdo")
        self.btn_anat = anat.Anatomia.diafragma(tab2, 148, 422, 20, 20, "diafragma direito")
        self.btn_anat = anat.Anatomia.diafragma(tab2, 430, 435, 20, 20, "diafragma esquerdo")
        self.btn_anat = anat.Anatomia.diafragma(tab3, 238, 459, 20, 20, "diafragma direito")
        self.btn_anat = anat.Anatomia.diafragma(tab3, 224, 424, 20, 20, "diafragma esquerdo")

        # Hilo
        self.btn = anat.Anatomia.hilo(tab1, 200, 200, 20, 20, "hilo direito")
        self.btn_1 = anat.Anatomia.hilo(tab1, 350, 165, 20, 20, "hilo esquerdo")
        self.btn = anat.Anatomia.hilo(tab2, 219, 238, 20, 20, "hilo direito")
        self.btn_1 = anat.Anatomia.hilo(tab2, 348, 245, 20, 20, "hilo esquerdo")


        # Seio Costofrenico direito
        self.btn = anat.Anatomia.seio_costofrenico(tab1, 55, 355, 20, 20, "seio costofrênico direito")
        self.btn = anat.Anatomia.seio_costofrenico(tab1, 501, 368, 20, 20, "seio costofrênico esquerdo")
        self.btn = anat.Anatomia.seio_costofrenico(tab2, 93, 497, 20, 20, "seio costofrênico direito")
        self.btn = anat.Anatomia.seio_costofrenico(tab2, 469, 490, 20, 20, "seio costofrênico esquerdo")

        # Escapula
        self.btn = anat.Anatomia.osso_generico(tab1, 55, 99, 20, 20, "escápula direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 493, 98, 20, 20, "escápula esquerda", "a")

        self.btn = anat.Anatomia.osso_generico(tab2, 77, 121, 20, 20, "escápula direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 489, 135, 20, 20, "escápula esquerda", "a")

        # Esterno
        self.btn = anat.Anatomia.osso_generico(tab1, 274, 183, 20, 20, "esterno", "o")
        self.btn = anat.Anatomia.osso_generico(tab3, 71, 183, 20, 20, "esterno", "o")

        # Clavícula
        self.btn = anat.Anatomia.osso_generico(tab1, 128, 12, 20, 20, "clavícula direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 434, 29, 20, 20, "clavícula esquerda", "a")

        # costela
        self.btn = anat.Anatomia.osso_generico(tab1, 66, 208, 20, 20, "1º costela direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 488, 203, 20, 20, "2º costela esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 96, 246, 20, 20, "1º costela direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 460, 252, 20, 20, "2º costela esquerda", "a")

        # coluna torácica
        self.btn = anat.Anatomia.osso_generico(tab3, 311, 202, 20, 20, "coluna torácica", "a")

        # mama
        self.btn = anat.Anatomia.mama(tab1, 52, 405, 20, 20, "mama direita")
        self.btn = anat.Anatomia.mama(tab1, 505, 415, 20, 20, "mama esquerda")


        # Imagem tap 1 PA Tórax
        torax_img_pa1 = wx.Image("torax_1_pa.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab1, bitmap=torax_img_pa1, pos=wx.DefaultPosition)

        # Imagem tap 2 PA Tórax Ossos
        torax_img_pa2 = wx.Image("torax_2_pa_ossos.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab2, bitmap=torax_img_pa2, pos=(60, -1))

        # Imagem tap 2 Perfil Tórax
        torax_img_perfil1 = wx.Image("torax_1_perfil .png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab3, bitmap=torax_img_perfil1, pos=wx.DefaultPosition)

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class MyPanel_img_coluna_cervical(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_coluna_cervical, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "PA 1")

        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "Perfil")

        tab3 = MyTabPanel(notebook)
        notebook.AddPage(tab3, "Atlas C1")


        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia

        # C1
        self.btn = anat.Anatomia.vertebra(tab2, 164, 119, 20, 20, "C1")
        self.btn = anat.Anatomia.vertebra(tab3, 179, 223, 20, 20, "C1")

        # C2
        self.btn = anat.Anatomia.vertebra(tab1, 204, 128, 20, 20, "C2")
        self.btn = anat.Anatomia.vertebra(tab2, 160, 164, 20, 20, "C2")

        # C3
        self.btn = anat.Anatomia.vertebra(tab1, 207, 156, 20, 20, "C3")
        self.btn = anat.Anatomia.vertebra(tab2, 163, 201, 20, 20, "C3")

        # C4
        self.btn = anat.Anatomia.vertebra(tab1, 212, 185, 20, 20, "C4")
        self.btn = anat.Anatomia.vertebra(tab2, 170, 232, 20, 20, "C4")

        # C5
        self.btn = anat.Anatomia.vertebra(tab1, 211, 214, 20, 20, "C5")
        self.btn = anat.Anatomia.vertebra(tab2, 172, 265, 20, 20, "C5")

        # C6
        self.btn = anat.Anatomia.vertebra(tab1, 216, 243, 20, 20, "C6")
        self.btn = anat.Anatomia.vertebra(tab2, 177, 298, 20, 20, "C6")

        # C7
        self.btn = anat.Anatomia.vertebra(tab1, 214, 279, 20, 20, "C7")
        self.btn = anat.Anatomia.vertebra(tab2, 192, 331, 20, 20, "C7")

        # T1
        self.btn = anat.Anatomia.vertebra(tab1, 211, 320, 20, 20, "T1")

        # T2
        self.btn = anat.Anatomia.vertebra(tab1, 213, 354, 20, 20, "T2")

        # T3
        self.btn = anat.Anatomia.vertebra(tab1, 210, 389, 20, 20, "T3")

        # T4
        self.btn = anat.Anatomia.vertebra(tab1, 215, 430, 20, 20, "T4")

        # Clavícula
        self.btn = anat.Anatomia.osso_generico(tab1, 31, 339, 20, 20, "clavícula direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 362, 324, 20, 20, "clavícula esquerda", "a")

        # Costela direita
        self.btn = anat.Anatomia.osso_generico(tab1, 134, 309, 20, 20, "1º costela direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 128, 339, 20, 20, "2º costela direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 128, 377, 20, 20, "3º costela direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 133, 414, 20, 20, "4º costela direita", "a")

        # Costela esquerda
        self.btn = anat.Anatomia.osso_generico(tab1, 294, 304, 20, 20, "1º costela esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 295, 335, 20, 20, "2º costela esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 298, 373, 20, 20, "3º costela esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 296, 419, 20, 20, "4º costela esquerda", "a")



        # Imagem tap 1 PA cervical
        torax_img_pa1 = wx.Image("cervical_ap.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab1, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


        # Imagem tap 1 Perfil cervical
        torax_img_pa1 = wx.Image("cervical_perfil.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab2, bitmap=torax_img_pa1, pos=wx.DefaultPosition)

        # Imagem tap 3 Atlas
        torax_img_pa1 = wx.Image("cervical_atlas.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab3, bitmap=torax_img_pa1)



class MyPanel_img_coluna_toracica(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_coluna_toracica, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "PA 1")

        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "Perfil 1")

        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia

        # C6
        self.btn = anat.Anatomia.vertebra(tab1, 116, 3, 20, 20, "C6")

        # C7
        self.btn = anat.Anatomia.vertebra(tab1, 117, 23, 20, 20, "C7")
        self.btn = anat.Anatomia.vertebra(tab2, 145, 15, 20, 20, "C7")


        # T1
        self.btn = anat.Anatomia.vertebra(tab1, 119, 44, 20, 20, "T1")
        self.btn = anat.Anatomia.vertebra(tab2, 150, 40, 20, 20, "T1")

        # T2
        self.btn = anat.Anatomia.vertebra(tab1, 120, 70, 20, 20, "T2")
        self.btn = anat.Anatomia.vertebra(tab2, 158, 66, 20, 20, "T2")

        # T3
        self.btn = anat.Anatomia.vertebra(tab1, 120, 105, 20, 20, "T3")
        self.btn = anat.Anatomia.vertebra(tab2, 168, 99, 20, 20, "T3")

        # T4
        self.btn = anat.Anatomia.vertebra(tab1, 120, 134, 20, 20, "T4")
        self.btn = anat.Anatomia.vertebra(tab2, 172, 123, 20, 20, "T4")

        # T5
        self.btn = anat.Anatomia.vertebra(tab1, 120, 167, 20, 20, "T5")
        self.btn = anat.Anatomia.vertebra(tab2, 173, 160, 20, 20, "T5")

        # T6
        self.btn = anat.Anatomia.vertebra(tab1, 119, 189, 20, 20, "T6")
        self.btn = anat.Anatomia.vertebra(tab2, 177, 189, 20, 20, "T6")

        # T7
        self.btn = anat.Anatomia.vertebra(tab1, 119, 219, 20, 20, "T7")
        self.btn = anat.Anatomia.vertebra(tab2, 172, 225, 20, 20, "T7")

        # T8
        self.btn = anat.Anatomia.vertebra(tab1, 119, 253, 20, 20, "T8")
        self.btn = anat.Anatomia.vertebra(tab2, 167, 263, 20, 20, "T8")

        # T9
        self.btn = anat.Anatomia.vertebra(tab1, 118, 288, 20, 20, "T9")
        self.btn = anat.Anatomia.vertebra(tab2, 156, 299, 20, 20, "T9")

        # T10
        self.btn = anat.Anatomia.vertebra(tab1, 118, 320, 20, 20, "T10")
        self.btn = anat.Anatomia.vertebra(tab2, 149, 336, 20, 20, "T10")

        # T11
        self.btn = anat.Anatomia.vertebra(tab1, 117, 355, 20, 20, "T11")
        self.btn = anat.Anatomia.vertebra(tab2, 139, 377, 20, 20, "T11")

        # T12
        self.btn = anat.Anatomia.vertebra(tab1, 119, 394, 20, 20, "T12")
        self.btn = anat.Anatomia.vertebra(tab2, 125, 423, 20, 20, "T12")

        # L1
        self.btn = anat.Anatomia.vertebra(tab1, 120, 438, 20, 20, "L1")
        self.btn = anat.Anatomia.vertebra(tab2, 111, 466, 20, 20, "L1")

        # L2
        self.btn = anat.Anatomia.vertebra(tab1, 121, 484, 20, 20, "L2")
        self.btn = anat.Anatomia.vertebra(tab2, 94, 514, 20, 20, "L2")

        # L3
        self.btn = anat.Anatomia.vertebra(tab1, 119, 529, 20, 20, "L3")


        # Imagem tap 1 PA Lombar
        torax_img_pa1 = wx.Image("coluna_toracica_ap.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab1, bitmap=torax_img_pa1, pos=wx.DefaultPosition)

        # Imagem tap 1 Perfil Lombar
        torax_img_pa1 = wx.Image("coluna_toracica_perfil.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab2, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


class MyPanel_img_coluna_toracolombar(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_coluna_toracolombar, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "PA 1")

        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "Perfil 1")

        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia

        # T7
        self.btn = anat.Anatomia.vertebra(tab1, 171, 4, 20, 20, "T7")

        # T8
        self.btn = anat.Anatomia.vertebra(tab1, 170, 39, 20, 20, "T8")
        self.btn = anat.Anatomia.vertebra(tab2, 195, 18, 20, 20, "T8")

        # T9
        self.btn = anat.Anatomia.vertebra(tab1, 170, 78, 20, 20, "T9")
        self.btn = anat.Anatomia.vertebra(tab2, 180, 58, 20, 20, "T9")

        # T10
        self.btn = anat.Anatomia.vertebra(tab1, 170, 112, 20, 20, "T10")
        self.btn = anat.Anatomia.vertebra(tab2, 168, 97, 20, 20, "T10")

        # T11
        self.btn = anat.Anatomia.vertebra(tab1, 172, 157, 20, 20, "T11")
        self.btn = anat.Anatomia.vertebra(tab2, 149, 140, 20, 20, "T11")

        # T12
        self.btn = anat.Anatomia.vertebra(tab1, 170, 203, 20, 20, "T12")
        self.btn = anat.Anatomia.vertebra(tab2, 131, 189, 20, 20, "T12")

        # L1
        self.btn = anat.Anatomia.vertebra(tab1, 172, 255, 20, 20, "L1")
        self.btn = anat.Anatomia.vertebra(tab2, 114, 240, 20, 20, "L1")

        # L2
        self.btn = anat.Anatomia.vertebra(tab1, 173, 308, 20, 20, "L2")
        self.btn = anat.Anatomia.vertebra(tab2, 101, 292, 20, 20, "L2")

        # L3
        self.btn = anat.Anatomia.vertebra(tab1, 172, 370, 20, 20, "L3")
        self.btn = anat.Anatomia.vertebra(tab2, 91, 357, 20, 20, "L3")

        # L4
        self.btn = anat.Anatomia.vertebra(tab1, 171, 413, 20, 20, "L4")
        self.btn = anat.Anatomia.vertebra(tab2, 101, 420, 20, 20, "L4")

        # L5
        self.btn = anat.Anatomia.vertebra(tab1, 174, 459, 20, 20, "L5")
        self.btn = anat.Anatomia.vertebra(tab2, 113, 472, 20, 20, "L5")

        # S1
        self.btn = anat.Anatomia.vertebra(tab1, 170, 510, 20, 20, "S1")
        self.btn = anat.Anatomia.vertebra(tab2, 150, 515, 20, 20, "S1")

        # Sacro
        self.btn = anat.Anatomia.osso_generico(tab1, 171, 544, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 185, 534, 20, 20, "sacro", "o")


        # Crista ilíaca
        self.btn = anat.Anatomia.osso_generico(tab1, 37, 458, 20, 20, "crista ilíaca direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 298, 466, 20, 20, "crista ilíaca esquerda", "a")

        # Imagem tap 1 PA Lombar
        torax_img_pa1 = wx.Image("coluna_toraco_lombar_ap.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab1, bitmap=torax_img_pa1, pos=wx.DefaultPosition)

        # Imagem tap 1 Perfil Lombar
        torax_img_pa1 = wx.Image("coluna_toraco_lombar_perfil.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab2, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


class MyPanel_img_coluna_lombar(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_coluna_lombar, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "PA 1")

        tab3 = MyTabPanel(notebook)
        notebook.AddPage(tab3, "Perfil 1")

        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia

        # T11
        self.btn = anat.Anatomia.vertebra(tab1, 229, 30, 20, 20, "T11")

        # T12
        self.btn = anat.Anatomia.vertebra(tab1, 232, 68, 20, 20, "T12")
        self.btn = anat.Anatomia.vertebra(tab3, 160, 9, 20, 20, "T12")

        # L1
        self.btn = anat.Anatomia.vertebra(tab1, 230, 114, 20, 20, "L1")
        self.btn = anat.Anatomia.vertebra(tab3, 139, 66, 20, 20, "L1")

        # L2
        self.btn = anat.Anatomia.vertebra(tab1, 236, 163, 20, 20, "L2")
        self.btn = anat.Anatomia.vertebra(tab3, 113, 132, 20, 20, "L2")

        # L3
        self.btn = anat.Anatomia.vertebra(tab1, 228, 220, 20, 20, "L3")
        self.btn = anat.Anatomia.vertebra(tab3, 99, 205, 20, 20, "L3")

        # L4
        self.btn = anat.Anatomia.vertebra(tab1, 224, 275, 20, 20, "L4")
        self.btn = anat.Anatomia.vertebra(tab3, 94, 280, 20, 20, "L4")

        # L5
        self.btn = anat.Anatomia.vertebra(tab1, 223, 332, 20, 20, "L5")
        self.btn = anat.Anatomia.vertebra(tab3, 108, 359, 20, 20, "L5")

        # S1
        self.btn = anat.Anatomia.vertebra(tab1, 215, 382, 20, 20, "S1")
        self.btn = anat.Anatomia.vertebra(tab3, 155, 411, 20, 20, "S1")

        # Sacro
        self.btn = anat.Anatomia.osso_generico(tab1, 216, 423, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab3, 205, 434, 20, 20, "sacro", "o")


        # Crista ilíaca
        self.btn = anat.Anatomia.osso_generico(tab1, 59, 319, 20, 20, "crista ilíaca direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 364, 320, 20, 20, "crista ilíaca esquerda", "a")

        # Imagem tap 1 PA Lombar
        torax_img_pa1 = wx.Image("lombar_pa.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab1, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


        # Imagem tap 1 Perfil Lombar
        torax_img_pa1 = wx.Image("lombar_perfil.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab3, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


class MyPanel_img_coluna_lombossacra(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_coluna_lombossacra, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "AP 1")

        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "Perfil 2")

        tab3 = MyTabPanel(notebook)
        notebook.AddPage(tab3, "L5-S1")

        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia

        # T12
        self.btn = anat.Anatomia.vertebra(tab1, 149, 27, 20, 20, "T12")
        self.btn = anat.Anatomia.vertebra(tab2, 215, 7, 20, 20, "T12")

        # L1
        self.btn = anat.Anatomia.vertebra(tab1, 146, 74, 20, 20, "L1")
        self.btn = anat.Anatomia.vertebra(tab2, 175, 56, 20, 20, "L1")

        # L2
        self.btn = anat.Anatomia.vertebra(tab1, 143, 128, 20, 20, "L2")
        self.btn = anat.Anatomia.vertebra(tab2, 128, 112, 20, 20, "L2")

        # L3
        self.btn = anat.Anatomia.vertebra(tab1, 133, 196, 20, 20, "L3")
        self.btn = anat.Anatomia.vertebra(tab2, 87, 175, 20, 20, "L3")
        self.btn = anat.Anatomia.vertebra(tab3, 120, 24, 20, 20, "L3")

        # L4
        self.btn = anat.Anatomia.vertebra(tab1, 137, 269, 20, 20, "L4")
        self.btn = anat.Anatomia.vertebra(tab2, 63, 245, 20, 20, "L4")
        self.btn = anat.Anatomia.vertebra(tab3, 99, 113, 20, 20, "L4")

        # L5
        self.btn = anat.Anatomia.vertebra(tab1, 135, 333, 20, 20, "L5")
        self.btn = anat.Anatomia.vertebra(tab2, 60, 321, 20, 20, "L5")
        self.btn = anat.Anatomia.vertebra(tab3, 104, 205, 20, 20, "L5")

        # S1
        self.btn = anat.Anatomia.vertebra(tab1, 138, 382, 20, 20, "S1")
        self.btn = anat.Anatomia.vertebra(tab2, 97, 376, 20, 20, "S1")
        self.btn = anat.Anatomia.vertebra(tab3, 148, 268, 20, 20, "S1")

        # Sacro
        self.btn = anat.Anatomia.osso_generico(tab1, 137, 419, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 151, 413, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab3, 199, 304, 20, 20, "sacro", "o")


        # Crista ilíaca
        self.btn = anat.Anatomia.osso_generico(tab1, 2, 319, 20, 20, "crista ilíaca direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 287, 317, 20, 20, "crista ilíaca esquerda", "a")


        dic_img = {"coluna_lombossacra_ap.png": tab1,
                   "coluna_lombossacra_perfil.png": tab2,
                   "coluna_lombossacra_perfil_foco.png": tab3
                   }


        # Imagem tap 1 PA Lombar
        for key, value in dic_img.items():
            torax_img_pa1 = wx.Image(key).ConvertToBitmap()
            self.image = wx.StaticBitmap(value, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


class MyPanel_img_coluna_sacrococcix(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_coluna_sacrococcix, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "AP 1")

        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "Perfil 2")

        tab3 = MyTabPanel(notebook)
        tab3.SetBackgroundColour("black")
        notebook.AddPage(tab3, "3D AP")

        tab4 = MyTabPanel(notebook)
        tab4.SetBackgroundColour("black")
        notebook.AddPage(tab4, "3D Perfil")


        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia


        # Sacro
        self.btn = anat.Anatomia.osso_generico(tab1, 143, 194, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 186, 159, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab3, 225, 151, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab4, 286, 156, 20, 20, "sacro", "o")


        dic_img = {"coluna_sacrococcix_ap.png": tab1,
                   "coluna_sacrococcix_perfil.png": tab2,
                   "coluna_sacrococcix_ap3d.png": tab3,
                   "coluna_sacrococcix_perfil3d.png": tab4
                   }


        # Imagem tap 1 PA Lombar
        for key, value in dic_img.items():
            torax_img_pa1 = wx.Image(key).ConvertToBitmap()
            self.image = wx.StaticBitmap(value, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


class MyPanel_img_coluna_total(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_coluna_total, self).__init__(parent)

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "PA 1")

        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "Perfil")

        tab3 = MyTabPanel(notebook)
        notebook.AddPage(tab3, "Atlas C1")

        # coluna toraxica
        # Notebook Tab
        tab4 = MyTabPanel(notebook)
        notebook.AddPage(tab4, "PA 1")

        tab5 = MyTabPanel(notebook)
        notebook.AddPage(tab5, "Perfil 1")

        # lombar
        tab6 = MyTabPanel(notebook)
        notebook.AddPage(tab6, "PA 1")

        tab7 = MyTabPanel(notebook)
        notebook.AddPage(tab7, "Perfil 1")

        # sacral
        # Notebook Tab
        tab8 = MyTabPanel(notebook)
        notebook.AddPage(tab8, "AP 1")

        tab9 = MyTabPanel(notebook)
        notebook.AddPage(tab9, "Perfil 2")

        tab10 = MyTabPanel(notebook)
        notebook.AddPage(tab10, "L5-S1")



        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia
        # Cervical

        # C1
        self.btn = anat.Anatomia.vertebra(tab2, 164, 119, 20, 20, "C1")
        self.btn = anat.Anatomia.vertebra(tab3, 179, 223, 20, 20, "C1")

        # C2
        self.btn = anat.Anatomia.vertebra(tab1, 204, 128, 20, 20, "C2")
        self.btn = anat.Anatomia.vertebra(tab2, 160, 164, 20, 20, "C2")

        # C3
        self.btn = anat.Anatomia.vertebra(tab1, 207, 156, 20, 20, "C3")
        self.btn = anat.Anatomia.vertebra(tab2, 163, 201, 20, 20, "C3")

        # C4
        self.btn = anat.Anatomia.vertebra(tab1, 212, 185, 20, 20, "C4")
        self.btn = anat.Anatomia.vertebra(tab2, 170, 232, 20, 20, "C4")

        # C5
        self.btn = anat.Anatomia.vertebra(tab1, 211, 214, 20, 20, "C5")
        self.btn = anat.Anatomia.vertebra(tab2, 172, 265, 20, 20, "C5")

        # C6
        self.btn = anat.Anatomia.vertebra(tab1, 216, 243, 20, 20, "C6")
        self.btn = anat.Anatomia.vertebra(tab2, 177, 298, 20, 20, "C6")

        # C7
        self.btn = anat.Anatomia.vertebra(tab1, 214, 279, 20, 20, "C7")
        self.btn = anat.Anatomia.vertebra(tab2, 192, 331, 20, 20, "C7")

        # T1
        self.btn = anat.Anatomia.vertebra(tab1, 211, 320, 20, 20, "T1")

        # T2
        self.btn = anat.Anatomia.vertebra(tab1, 213, 354, 20, 20, "T2")

        # T3
        self.btn = anat.Anatomia.vertebra(tab1, 210, 389, 20, 20, "T3")

        # T4
        self.btn = anat.Anatomia.vertebra(tab1, 215, 430, 20, 20, "T4")

        # Clavícula
        self.btn = anat.Anatomia.osso_generico(tab1, 31, 339, 20, 20, "clavícula direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 362, 324, 20, 20, "clavícula esquerda", "a")

        # Costela direita
        self.btn = anat.Anatomia.osso_generico(tab1, 134, 309, 20, 20, "1º costela direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 128, 339, 20, 20, "2º costela direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 128, 377, 20, 20, "3º costela direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 133, 414, 20, 20, "4º costela direita", "a")

        # Costela esquerda
        self.btn = anat.Anatomia.osso_generico(tab1, 294, 304, 20, 20, "1º costela esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 295, 335, 20, 20, "2º costela esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 298, 373, 20, 20, "3º costela esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab1, 296, 419, 20, 20, "4º costela esquerda", "a")



        # Imagem tap 1 PA cervical
        torax_img_pa1 = wx.Image("cervical_ap.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab1, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


        # Imagem tap 1 Perfil cervical
        torax_img_pa1 = wx.Image("cervical_perfil.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab2, bitmap=torax_img_pa1, pos=wx.DefaultPosition)

        # Imagem tap 3 Atlas
        torax_img_pa1 = wx.Image("cervical_atlas.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab3, bitmap=torax_img_pa1)




        # Gerenciamento da anatomia toraxica

        # C6
        self.btn = anat.Anatomia.vertebra(tab4, 116, 3, 20, 20, "C6")

        # C7
        self.btn = anat.Anatomia.vertebra(tab4, 117, 23, 20, 20, "C7")
        self.btn = anat.Anatomia.vertebra(tab5, 145, 15, 20, 20, "C7")


        # T1
        self.btn = anat.Anatomia.vertebra(tab4, 119, 44, 20, 20, "T1")
        self.btn = anat.Anatomia.vertebra(tab5, 150, 40, 20, 20, "T1")

        # T2
        self.btn = anat.Anatomia.vertebra(tab4, 120, 70, 20, 20, "T2")
        self.btn = anat.Anatomia.vertebra(tab5, 158, 66, 20, 20, "T2")

        # T3
        self.btn = anat.Anatomia.vertebra(tab4, 120, 105, 20, 20, "T3")
        self.btn = anat.Anatomia.vertebra(tab5, 168, 99, 20, 20, "T3")

        # T4
        self.btn = anat.Anatomia.vertebra(tab4, 120, 134, 20, 20, "T4")
        self.btn = anat.Anatomia.vertebra(tab5, 172, 123, 20, 20, "T4")

        # T5
        self.btn = anat.Anatomia.vertebra(tab4, 120, 167, 20, 20, "T5")
        self.btn = anat.Anatomia.vertebra(tab5, 173, 160, 20, 20, "T5")

        # T6
        self.btn = anat.Anatomia.vertebra(tab4, 119, 189, 20, 20, "T6")
        self.btn = anat.Anatomia.vertebra(tab5, 177, 189, 20, 20, "T6")

        # T7
        self.btn = anat.Anatomia.vertebra(tab4, 119, 219, 20, 20, "T7")
        self.btn = anat.Anatomia.vertebra(tab5, 172, 225, 20, 20, "T7")

        # T8
        self.btn = anat.Anatomia.vertebra(tab4, 119, 253, 20, 20, "T8")
        self.btn = anat.Anatomia.vertebra(tab5, 167, 263, 20, 20, "T8")

        # T9
        self.btn = anat.Anatomia.vertebra(tab4, 118, 288, 20, 20, "T9")
        self.btn = anat.Anatomia.vertebra(tab5, 156, 299, 20, 20, "T9")

        # T10
        self.btn = anat.Anatomia.vertebra(tab4, 118, 320, 20, 20, "T10")
        self.btn = anat.Anatomia.vertebra(tab5, 149, 336, 20, 20, "T10")

        # T11
        self.btn = anat.Anatomia.vertebra(tab4, 117, 355, 20, 20, "T11")
        self.btn = anat.Anatomia.vertebra(tab5, 139, 377, 20, 20, "T11")

        # T12
        self.btn = anat.Anatomia.vertebra(tab4, 119, 394, 20, 20, "T12")
        self.btn = anat.Anatomia.vertebra(tab5, 125, 423, 20, 20, "T12")

        # L1
        self.btn = anat.Anatomia.vertebra(tab4, 120, 438, 20, 20, "L1")
        self.btn = anat.Anatomia.vertebra(tab5, 111, 466, 20, 20, "L1")

        # L2
        self.btn = anat.Anatomia.vertebra(tab4, 121, 484, 20, 20, "L2")
        self.btn = anat.Anatomia.vertebra(tab5, 94, 514, 20, 20, "L2")

        # L3
        self.btn = anat.Anatomia.vertebra(tab4, 119, 529, 20, 20, "L3")


        # Imagem tap 1 PA Lombar
        torax_img_pa1 = wx.Image("coluna_toracica_ap.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab4, bitmap=torax_img_pa1, pos=wx.DefaultPosition)

        # Imagem tap 1 Perfil Lombar
        torax_img_pa1 = wx.Image("coluna_toracica_perfil.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab5, bitmap=torax_img_pa1, pos=wx.DefaultPosition)

        # Lombar

        # Gerenciamento da anatomia

        # T11
        self.btn = anat.Anatomia.vertebra(tab6, 229, 30, 20, 20, "T11")

        # T12
        self.btn = anat.Anatomia.vertebra(tab6, 232, 68, 20, 20, "T12")
        self.btn = anat.Anatomia.vertebra(tab7, 160, 9, 20, 20, "T12")

        # L1
        self.btn = anat.Anatomia.vertebra(tab6, 230, 114, 20, 20, "L1")
        self.btn = anat.Anatomia.vertebra(tab7, 139, 66, 20, 20, "L1")

        # L2
        self.btn = anat.Anatomia.vertebra(tab6, 236, 163, 20, 20, "L2")
        self.btn = anat.Anatomia.vertebra(tab7, 113, 132, 20, 20, "L2")

        # L3
        self.btn = anat.Anatomia.vertebra(tab6, 228, 220, 20, 20, "L3")
        self.btn = anat.Anatomia.vertebra(tab7, 99, 205, 20, 20, "L3")

        # L4
        self.btn = anat.Anatomia.vertebra(tab6, 224, 275, 20, 20, "L4")
        self.btn = anat.Anatomia.vertebra(tab7, 94, 280, 20, 20, "L4")

        # L5
        self.btn = anat.Anatomia.vertebra(tab6, 223, 332, 20, 20, "L5")
        self.btn = anat.Anatomia.vertebra(tab7, 108, 359, 20, 20, "L5")

        # S1
        self.btn = anat.Anatomia.vertebra(tab6, 215, 382, 20, 20, "S1")
        self.btn = anat.Anatomia.vertebra(tab7, 155, 411, 20, 20, "S1")

        # Sacro
        self.btn = anat.Anatomia.osso_generico(tab6, 216, 423, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab7, 205, 434, 20, 20, "sacro", "o")


        # Crista ilíaca
        self.btn = anat.Anatomia.osso_generico(tab6, 59, 319, 20, 20, "crista ilíaca direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab6, 364, 320, 20, 20, "crista ilíaca esquerda", "a")

        # Imagem tap 1 PA Lombar
        torax_img_pa1 = wx.Image("lombar_pa.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab6, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


        # Imagem tap 1 Perfil Lombar
        torax_img_pa1 = wx.Image("lombar_perfil.png").ConvertToBitmap()
        self.image = wx.StaticBitmap(tab7, bitmap=torax_img_pa1, pos=wx.DefaultPosition)

        # sacral
        # Gerenciamento da anatomia

        # T12
        self.btn = anat.Anatomia.vertebra(tab8, 149, 27, 20, 20, "T12")
        self.btn = anat.Anatomia.vertebra(tab9, 215, 7, 20, 20, "T12")

        # L1
        self.btn = anat.Anatomia.vertebra(tab8, 146, 74, 20, 20, "L1")
        self.btn = anat.Anatomia.vertebra(tab9, 175, 56, 20, 20, "L1")

        # L2
        self.btn = anat.Anatomia.vertebra(tab8, 143, 128, 20, 20, "L2")
        self.btn = anat.Anatomia.vertebra(tab9, 128, 112, 20, 20, "L2")

        # L3
        self.btn = anat.Anatomia.vertebra(tab8, 133, 196, 20, 20, "L3")
        self.btn = anat.Anatomia.vertebra(tab9, 87, 175, 20, 20, "L3")
        self.btn = anat.Anatomia.vertebra(tab10, 120, 24, 20, 20, "L3")

        # L4
        self.btn = anat.Anatomia.vertebra(tab8, 137, 269, 20, 20, "L4")
        self.btn = anat.Anatomia.vertebra(tab9, 63, 245, 20, 20, "L4")
        self.btn = anat.Anatomia.vertebra(tab10, 99, 113, 20, 20, "L4")

        # L5
        self.btn = anat.Anatomia.vertebra(tab8, 135, 333, 20, 20, "L5")
        self.btn = anat.Anatomia.vertebra(tab9, 60, 321, 20, 20, "L5")
        self.btn = anat.Anatomia.vertebra(tab10, 104, 205, 20, 20, "L5")

        # S1
        self.btn = anat.Anatomia.vertebra(tab8, 138, 382, 20, 20, "S1")
        self.btn = anat.Anatomia.vertebra(tab9, 97, 376, 20, 20, "S1")
        self.btn = anat.Anatomia.vertebra(tab10, 148, 268, 20, 20, "S1")

        # Sacro
        self.btn = anat.Anatomia.osso_generico(tab8, 137, 419, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab9, 151, 413, 20, 20, "sacro", "o")
        self.btn = anat.Anatomia.osso_generico(tab10, 199, 304, 20, 20, "sacro", "o")


        # Crista ilíaca
        self.btn = anat.Anatomia.osso_generico(tab8, 2, 319, 20, 20, "crista ilíaca direita", "a")
        self.btn = anat.Anatomia.osso_generico(tab8, 287, 317, 20, 20, "crista ilíaca esquerda", "a")


        dic_img = {"coluna_lombossacra_ap.png": tab8,
                   "coluna_lombossacra_perfil.png": tab9,
                   "coluna_lombossacra_perfil_foco.png": tab10
                   }


        # Imagem tap 1 PA Lombar
        for key, value in dic_img.items():
            torax_img_pa1 = wx.Image(key).ConvertToBitmap()
            self.image = wx.StaticBitmap(value, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


class MyPanel_img_ombro(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_ombro, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "AP")

        tab2 = MyTabPanel(notebook)
        tab2.SetBackgroundColour("black")
        notebook.AddPage(tab2, "AP 3D")



        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia


        # clavícula
        self.btn = anat.Anatomia.osso_generico(tab1, 241, 47, 20, 20, "clavícula", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 236, 48, 20, 20, "clavícula", "a")

        # Acrômio
        self.btn = anat.Anatomia.osso_generico(tab1, 98, 59, 20, 20, "acrômio", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 142, 67, 20, 20, "acrômio", "o")

        # espaço articular acromioclavicular
        self.btn = anat.Anatomia.espaco_articular(tab1, 135, 43, 20, 20, "espaço articular acromioclavicular", "o")
        self.btn = anat.Anatomia.espaco_articular(tab2, 164, 62, 20, 20, "espaço articular acromioclavicular", "o")

        # espaço articular glenoumeral
        self.btn = anat.Anatomia.espaco_articular(tab1, 174, 156, 20, 20, "espaço articular glenoumeral", "o")
        self.btn = anat.Anatomia.espaco_articular(tab2, 199, 146, 20, 20, "espaço articular glenoumeral", "o")

        # espaço subacromial
        self.btn = anat.Anatomia.espaco_articular(tab1, 81, 96, 20, 20, "espaço subacromial", "o")
        self.btn = anat.Anatomia.espaco_articular(tab2, 133, 93, 20, 20, "espaço subacromial", "o")

        # processo coracoide
        self.btn = anat.Anatomia.osso_generico(tab1, 213, 108, 20, 20, "processo coracoide", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 227, 106, 20, 20, "processo coracoide", "o")

        # glenóide
        self.btn = anat.Anatomia.osso_generico(tab1, 190, 170, 20, 20, "glenóide", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 207, 164, 20, 20, "glenóide", "a")

        # cabeça umeral
        self.btn = anat.Anatomia.osso_generico(tab1, 91, 163, 20, 20, "cabeça umeral", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 151, 147, 20, 20, "cabeça umeral", "a")


        # tuberosidade maior do úmero
        self.btn = anat.Anatomia.osso_generico(tab1, 144, 182, 20, 20, "tuberosidade maior do úmero", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 81, 137, 20, 20, "tuberosidade maior do úmero", "a")

        # tuberosidade menor do úmero
        self.btn = anat.Anatomia.osso_generico(tab1, 175, 196, 20, 20, "tuberosidade menor do úmero", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 104, 165, 20, 20, "tuberosidade menor do úmero", "a")


        # escapula
        self.btn = anat.Anatomia.osso_generico(tab1, 236, 171, 20, 20, "escápula", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 242, 165, 20, 20, "escápula", "a")

        # umero
        self.btn = anat.Anatomia.osso_generico(tab1, 86, 229, 20, 20, "metáfise umeral", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 122, 214, 20, 20, "metáfise umeral", "a")

        # diáfise proximal
        self.btn = anat.Anatomia.osso_generico(tab1, 76, 306, 20, 20, "diáfise proximal do úmero", "a")


        dic_img = {"ombro_ap.png": tab1,
                   "ombro_ap3d.png": tab2,
                   }


        # Imagem tap 1 PA Lombar
        for key, value in dic_img.items():
            torax_img_pa1 = wx.Image(key).ConvertToBitmap()
            self.image = wx.StaticBitmap(value, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


class MyPanel_img_mao(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent, id=wx.ID_ANY):
        """Inicializar atributos da classe."""
        super(MyPanel_img_mao, self).__init__(parent, id=wx.ID_ANY)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "AP")

        tab2 = MyTabPanel(notebook)
        notebook.AddPage(tab2, "AP 3D")
        tab2.SetBackgroundColour("black")

        # Notebook Tab
        tab3 = MyTabPanel(notebook)
        notebook.AddPage(tab3, "Espaço articular")




        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia


        # Falange distal
        self.btn = anat.Anatomia.osso_generico(tab1, 25, 231, 20, 20, "falange distal do polegar", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 73, 192, 20, 20, "falange distal do polegar", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 141, 46, 20, 20, "falange distal do 2º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 66, 38, 20, 20, "falange distal do 2º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 222, 23, 20, 20, "falange distal do 3º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 110, 8, 20, 20, "falange distal do 3º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 299, 52, 20, 20, "falange distal do 4º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 172, 9, 20, 20, "falange distal do 4º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 390, 143, 20, 20, "falange distal do 5º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 227, 55, 20, 20, "falange distal do 5º dedo", "a")

        # Falange média
        self.btn = anat.Anatomia.osso_generico(tab1, 145, 90, 20, 20, "falange média do 2º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 74, 79, 20, 20, "falange média do 2º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 219, 78, 20, 20, "falange média do 3º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 117, 46, 20, 20, "falange média do 3º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 287, 100, 20, 20, "falange média do 4º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 175, 49, 20, 20, "falange média do 4º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 365, 175, 20, 20, "falange média do 5º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 227, 89, 20, 20, "falange média do 5º dedo", "a")

        # Falange proximal
        self.btn = anat.Anatomia.osso_generico(tab1, 63, 273, 20, 20, "falange proximal do polegar", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 80, 241, 20, 20, "falange proximal do polegar", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 157, 159, 20, 20, "falange proximal do 2º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 88, 135, 20, 20, "falange proximal do 2º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 216, 153, 20, 20, "falange proximal do 3º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 130, 118, 20, 20, "falange proximal do 3º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 270, 176, 20, 20, "falange proximal do 4º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 180, 116, 20, 20, "falange proximal do 4º dedo", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 330, 217, 20, 20, "falange proximal do 5º dedo", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 228, 145, 20, 20, "falange proximal do 5º dedo", "a")


        # Falange proximal
        self.btn = anat.Anatomia.osso_generico(tab1, 119, 336, 20, 20, "1º metacarpo", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 96, 301, 20, 20, "1º metacarpo", "o")

        self.btn = anat.Anatomia.osso_generico(tab1, 175, 275, 20, 20, "2º metacarpo", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 121, 242, 20, 20, "2º metacarpo", "o")

        self.btn = anat.Anatomia.osso_generico(tab1, 219, 269, 20, 20, "3º metacarpo", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 160, 234, 20, 20, "3º metacarpo", "o")

        self.btn = anat.Anatomia.osso_generico(tab1, 254, 283, 20, 20, "4º metacarpo", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 194, 232, 20, 20, "4º metacarpo", "o")

        self.btn = anat.Anatomia.osso_generico(tab1, 284, 305, 20, 20, "5º metacarpo", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 233, 244, 20, 20, "5º metacarpo", "o")


        # Trapézio
        self.btn = anat.Anatomia.osso_generico(tab1, 178, 374, 20, 20, "trapézio", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 132, 342, 20, 20, "trapézio", "o")

        # Trapezóide
        self.btn = anat.Anatomia.osso_generico(tab1, 198, 359, 20, 20, "trapezóide", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 154, 335, 20, 20, "trapezóide", "o")

        # capitato
        self.btn = anat.Anatomia.osso_generico(tab1, 225, 365, 20, 20, "capitato", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 184, 336, 20, 20, "capitato", "o")

        # hamato
        self.btn = anat.Anatomia.osso_generico(tab1, 249, 371, 20, 20, "hamato", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 213, 328, 20, 20, "hamato", "o")

        # escafoide
        self.btn = anat.Anatomia.osso_generico(tab1, 205, 401, 20, 20, "escafoide", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 157, 374, 20, 20, "escafoide", "o")

        # semilunar
        self.btn = anat.Anatomia.osso_generico(tab1, 245, 402, 20, 20, "semilunar", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 199, 374, 20, 20, "semilunar", "o")

        # piramidal
        self.btn = anat.Anatomia.osso_generico(tab1, 265, 386, 20, 20, "piramidal", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 224, 357, 20, 20, "piramidal", "o")

        # pisiforme
        self.btn = anat.Anatomia.osso_generico(tab1, 276, 375, 20, 20, "pisiforme", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 242, 358, 20, 20, "pisiforme", "o")

        # rádio
        self.btn = anat.Anatomia.osso_generico(tab1, 256, 448, 20, 20, "rádio", "o")
        self.btn = anat.Anatomia.osso_generico(tab2, 180, 435, 20, 20, "rádio", "o")

        # ulna
        self.btn = anat.Anatomia.osso_generico(tab1, 308, 426, 20, 20, "ulna", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 251, 425, 20, 20, "ulna", "a")

        # espaço articular tab 3
        self.btn = anat.Anatomia.espaco_articular(tab3, 237, 419, 20, 20, "espaço articular radiocárpico", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 278, 415, 20, 20, "espaço articular radioulnar distal", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 232, 378, 20, 20, "espaço articular intercarpical", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 226, 344, 20, 20, "espaço articular carpometacarpal", "o")

        self.btn = anat.Anatomia.espaco_articular(tab3, 90, 300, 20, 20, "espaço articular da 1º metacarpofalangiana", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 162, 208, 20, 20, "espaço articular da 2º metacarpofalangiana", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 214, 208, 20, 20, "espaço articular da 3º metacarpofalangiana", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 262, 221, 20, 20, "espaço articular da 4º metacarpofalangiana", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 307, 246, 20, 20, "espaço articular da 5º metacarpofalangiana", "o")

        self.btn = anat.Anatomia.espaco_articular(tab3, 41, 251, 20, 20, "espaço articular da interfalangiana do 1º dedo", "o")

        self.btn = anat.Anatomia.espaco_articular(tab3, 150, 120, 20, 20, "espaço articular da interfalangiana proximal do 2º dedo", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 216, 106, 20, 20, "espaço articular da interfalangiana proximal do 3º dedo", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 280, 128, 20, 20, "espaço articular da interfalangiana proximal do 4º dedo", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 354, 190, 20, 20, "espaço articular da interfalangiana proximal do 5º dedo", "o")

        self.btn = anat.Anatomia.espaco_articular(tab3, 142, 66, 20, 20, "espaço articular da interfalangiana distal do 2º dedo", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 219, 43, 20, 20, "espaço articular da interfalangiana distal do 3º dedo", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 294, 70, 20, 20, "espaço articular da interfalangiana distal do 4º dedo", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 380, 157, 20, 20, "espaço articular da interfalangiana distal do 5º dedo", "o")

        self.btn = anat.Anatomia.espaco_articular(tab3, 469, 92, 20, 20, "espaço articular das interfalangianas distais", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 463, 191, 20, 20, "espaço articular das interfalangianas proximais", "o")
        self.btn = anat.Anatomia.espaco_articular(tab3, 468, 264, 20, 20, "espaço articular das metacarpofalangianas", "o")


        dic_img = {"mao_ap.png": tab1,
                   "mao_ap3d.png": tab2,
                   "mao_ap2.png": tab3
                   }


        # Imagem tap 1 PA Lombar
        for key, value in dic_img.items():
            torax_img_pa1 = wx.Image(key).ConvertToBitmap()
            self.image = wx.StaticBitmap(value, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


class MyPanel_img_arcos_costais(wx.Panel):
    """Meu Panel"""
    def __init__(self, parent):
        """Inicializar atributos da classe."""
        super(MyPanel_img_arcos_costais, self).__init__(parent)

        self.SetBackgroundColour("white")

        # Notebook Tab
        notebook = wx.Notebook(self)
        tab1 = MyTabPanel(notebook)
        notebook.AddPage(tab1, "PA")

        tab2 = MyTabPanel(notebook)
        tab2.SetBackgroundColour("black")
        notebook.AddPage(tab2, "PA 3D")


        # Gerenciador de Layout
        vSizer = wx.BoxSizer(wx.VERTICAL)
        vSizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5)
        self.SetSizer(vSizer)

        # Gerenciamento da anatomia

        # Solucionar problema de id antes de continuar!

        # costela direita
        #self.btn1 = anat.Anatomia.osso_generico(tab1, 132, 51, 20, 20, "1º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 132, 66, 20, 20, "1º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 117, 68, 20, 20, "2º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 115, 104, 20, 20, "2º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 103, 95, 20, 20, "3º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 106, 149, 20, 20, "3º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 98, 123, 20, 20, "4º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 101, 183, 20, 20, "4º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 95, 152, 20, 20, "5º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 91, 225, 20, 20, "5º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 94, 188, 20, 20, "6º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 70, 259, 20, 20, "6º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 88, 226, 20, 20, "7º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 65, 294, 20, 20, "7º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 88, 264, 20, 20, "8º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 51, 309, 20, 20, "8º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 89, 304, 20, 20, "9º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 112, 247, 20, 20, "9º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 90, 350, 20, 20, "10º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 119, 270, 20, 20, "10º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 105, 395, 20, 20, "11º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 125, 298, 20, 20, "11º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 127, 405, 20, 20, "12º costela direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 143, 325, 20, 20, "12º costela direita", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 53, 74, 20, 20, "clavícula direita", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 95, 40, 20, 20, "clavícula direita", "a")

        # costela esquerda
        #self.btn = anat.Anatomia.osso_generico(tab1, 249, 46, 20, 20, "1º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 281, 67, 20, 20, "1º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 265, 58, 20, 20, "2º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 293, 107, 20, 20, "2º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 277, 82, 20, 20, "3º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 300, 146, 20, 20, "3º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 296, 113, 20, 20, "4º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 312, 184, 20, 20, "4º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 306, 150, 20, 20, "5º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 321, 225, 20, 20, "5º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 306, 184, 20, 20, "6º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 337, 258, 20, 20, "6º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 302, 226, 20, 20, "7º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 351, 296, 20, 20, "7º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 298, 264, 20, 20, "8º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 365, 307, 20, 20, "8º costela esquerda", "a")
#
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 297, 308, 20, 20, "9º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 291, 238, 20, 20, "9º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 284, 343, 20, 20, "10º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 297, 266, 20, 20, "10º costela esquerda", "a")
#
        #self.btn = anat.Anatomia.osso_generico(tab1, 267, 389, 20, 20, "11º costela esquerda", "a")
        #self.btn = anat.Anatomia.osso_generico(tab2, 285, 293, 20, 20, "11º costela esquerda", "a")

        #self.btn = anat.Anatomia.osso_generico(tab1, 246, 405, 20, 20, "12º costela esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 277, 322, 20, 20, "12º costela esquerda", "a")

        self.btn = anat.Anatomia.osso_generico(tab1, 342, 72, 20, 20, "clavícula esquerda", "a")
        self.btn = anat.Anatomia.osso_generico(tab2, 318, 44, 20, 20, "clavícula esquerda", "a")

        dic_img = {"arcos_costais_pa.png": tab1,
                   "arcos_costais_pa3d.png": tab2,
                   }


        # Imagem tap 1 PA Lombar
        for key, value in dic_img.items():
            torax_img_pa1 = wx.Image(key).ConvertToBitmap()
            self.image = wx.StaticBitmap(value, bitmap=torax_img_pa1, pos=wx.DefaultPosition)


# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

class MyFrame(wx.Frame):
    """Quadro"""
    def __init__(self, parent, title=""):
        """Inicializar atributos da classe."""
        super(MyFrame, self).__init__(parent, title=title, size=(1200, 620))

        #self.SetWindowStyle(wx.STAY_ON_TOP|wx.DEFAULT_FRAME_STYLE)

        # Set Icon
        ico = wx.Icon("bone.png")
        self.SetIcon(ico)

        # Gerenciador de Layout Horizontal
        self.hSizer = wx.BoxSizer()

        # Gerenciador de Layout Vertical (Principal)
        vSizer = wx.BoxSizer(wx.VERTICAL)

        # Gerencidor de Layout vertical do panel
        self.vSizer_panel_info = wx.BoxSizer(wx.VERTICAL)

        # Setar panel info
        self.panel_info = info_pw.MyPanel_info(self)
        self.vSizer_panel_info.Add(self.panel_info, 0, wx.EXPAND)
        self.hSizer.Add(self.vSizer_panel_info, 1, wx.EXPAND)

        # Setar panel de seleção panel widget torax
        self.panel_widget_torax = MyPanel_img_torax(self)
        self.hSizer.Add(self.panel_widget_torax, 1, wx.EXPAND)

        # Criar object
        self.panel_widget_coluna_lombar = MyPanel_img_coluna_lombar(self)
        self.panel_widget_coluna_cervical = MyPanel_img_coluna_cervical(self)
        self.panel_widget_coluna_toracica = MyPanel_img_coluna_toracica(self)
        self.panel_widget_coluna_toracolombar = MyPanel_img_coluna_toracolombar(self)
        self.panel_widget_coluna_lombossacra = MyPanel_img_coluna_lombossacra(self)
        self.panel_widget_coluna_sacrococcix = MyPanel_img_coluna_sacrococcix(self)
        self.panel_widget_coluna_total = MyPanel_img_coluna_total(self)
        self.panel_widget_ombro_direito = MyPanel_img_ombro(self)
        self.panel_widget_ombro_esquerdo = MyPanel_img_ombro(self)
        self.panel_widget_mao_direita = MyPanel_img_mao(self)
        self.panel_widget_mao_esquerda = MyPanel_img_mao(self)
        self.panel_widget_arcos_costais_direita = MyPanel_img_arcos_costais(self)
        self.panel_widget_arcos_costais_esquerda = MyPanel_img_arcos_costais(self)


        # One time Class to self
        self.list_panel_img = [self.panel_widget_coluna_lombar,
                         self.panel_widget_coluna_lombossacra,
                         self.panel_widget_coluna_cervical,
                         self.panel_widget_coluna_toracica,
                         self.panel_widget_coluna_toracolombar,
                         self.panel_widget_coluna_sacrococcix,
                         self.panel_widget_coluna_total,
                         self.panel_widget_ombro_direito,
                         self.panel_widget_ombro_esquerdo,
                         self.panel_widget_mao_direita,
                         self.panel_widget_mao_esquerda,
                         self.panel_widget_arcos_costais_direita,
                         self.panel_widget_arcos_costais_esquerda,
                              ]

        # Setar panel img generic
        for item in self.list_panel_img:
            self.hSizer.Add(item, 1, wx.EXPAND)
            item.Hide()


        # lembrar qual estava ligado e titulo do exame
        self.panel_ligado = self.panel_widget_torax
        self.titulo_exame = temp_txt.tp_torax().split("\n", 1)[0]


        # Setar Panel Editor de Texto
        self.panel_text = MyPanel_text_editor(self)
        self.vSizer_panel_info.Add(self.panel_text, 1, wx.EXPAND)

        # Setar Panel Informação
        self.panel_clinico = MyPanel_info_clinica(self)
        self.hSizer.Add(self.panel_clinico, 1, wx.EXPAND)
        self.panel_clinico.Hide()

        # StatusBar
        statusBar = self.CreateStatusBar()

        # Criando uma toolbar
        tool_img = wx.Image("x-ray.png").ConvertToBitmap()
        mic_img = wx.Image("mic.png").ConvertToBitmap()
        copy_img = wx.Image("copy.png").ConvertToBitmap()
        indent_img = wx.Image("indent.png").ConvertToBitmap()
        resize_img = wx.Image("resize.png").ConvertToBitmap()
        idea_img = wx.Image("idea.png").ConvertToBitmap()

        toolbar = self.CreateToolBar()
        toolbar.AddSimpleTool(wx.NewId(), bitmap=tool_img, shortHelpString="Barra de ferramentas",
longHelpString="Sistema avançado para geração de laudos radiograficos.")
        self.mic_tool_ico = toolbar.AddSimpleTool(wx.NewId(), bitmap=mic_img, shortHelpString="Texto para voz",
                              longHelpString="Fale para iniciar a converção de voz para texto.")
        self.copy_ico = toolbar.AddSimpleTool(wx.NewId(), bitmap=copy_img,
shortHelpString="Copiar laudo!", longHelpString="Click para copiar o laudo já formatado, "
                                         "depois é só colar onde "
                                         "você desejar.")
        self.resut_concl = toolbar.AddSimpleTool(wx.NewId(), bitmap=indent_img, shortHelpString="Resultado:\nConclusão:",
longHelpString="Formata o texto colocando o laudo entre Resultado e Conclusão.")
        self.resize = toolbar.AddSimpleTool(wx.NewId(), bitmap=resize_img, shortHelpString="Expandir editor de texto",
longHelpString ="Clique para expandir o editor de texto e clique novamente para retornar ao normal.")
        self.idea = toolbar.AddSimpleTool(wx.NewId(), bitmap=idea_img, shortHelpString="Informação clínica em tempo real",
    longHelpString="Exibi informações clínicas em tempo real para auxiliar nos diagnósticos.")
        toolbar.Realize()



        #Set Sizer

        vSizer.Add(self.hSizer, 1, wx.EXPAND)
        self.SetSizer(vSizer)

        # Transparencia
        self.SetTransparent(250)



        # Maximize
        self.Maximize(False)

        # Bind
        # Fala para texto icone microfone
        self.Bind(wx.EVT_TOOL, self.fala_para_texto, self.mic_tool_ico)

        # Pegar nome do paciente e colocar no editor de texto:
        self.Bind(wx.EVT_TEXT, self.on_ao_digitar_nome, self.panel_info.nome_paciente_text_ctrl)

        # seleção do laudo template pardão
        self.panel_info.Bind(wx.EVT_MENU, self.on_menu)

        # copiar laudo
        self.Bind(wx.EVT_TOOL, self.on_copiar, self.copy_ico)

        # formatar laudo
        self.Bind(wx.EVT_TOOL, self.resultado_conclusao, self.resut_concl)

        # Expandir editor de texto
        self.Bind(wx.EVT_TOOL, self.on_resize, self.resize)
        self.flag_resize = True

        # limpar nome do paciente do textCtrl
        self.Bind(wx.EVT_BUTTON, self.on_linpar_nome_pac, self.panel_info.button_clear)
        self.panel_widget_torax.Bind(wx.EVT_MENU, self.on_menu_rx)

        for item in self.list_panel_img:
            item.Bind(wx.EVT_MENU, self.on_menu_rx)

        # limpar texto do editor de texto
        self.Bind(wx.EVT_BUTTON, self.on_limpar_texto, self.panel_info.apagar_texto)

        # Posição do mouse
        self.panel_widget_torax.Bind(wx.EVT_MOUSEWHEEL, self.on_mouse_pos)


        for item in self.list_panel_img:
            item.Bind(wx.EVT_MOUSEWHEEL, self.on_mouse_pos)


        # Ligar e desligar panel de informação clínica
        self.Bind(wx.EVT_TOOL, self.on_idea, self.idea)
        self.idea_flag = False

        # Bind maximizar para refresh
        self.Bind(wx.EVT_MAXIMIZE, self.on_maximize)

        # Panel para ligar e desligar

        self.dic_panel_info = {
            self.panel_info.menu_item_cranio: [temp_txt.tp_cranio, None],
            self.panel_info.menu_item_seios_da_face: [temp_txt.tp_seios_da_face, None],
            self.panel_info.menu_item_cavum: [temp_txt.tp_cavum, None],
            self.panel_info.menu_item_ossos_da_face: [temp_txt.tp_ossos_da_face, None],
            self.panel_info.menu_item_ossos_nasais: [temp_txt.tp_ossos_nasais, None],
            self.panel_info.menu_item_mandibula: [temp_txt.tp_mandibula, None],
            self.panel_info.menu_item_atm: [temp_txt.tp_articulacoes_temporomandibulares, None],
            self.panel_info.menu_item_coluna_cervical: [temp_txt.tp_coluna_cervical, self.panel_widget_coluna_cervical, self.panel_widget_torax],
            self.panel_info.menu_item_coluna_toracica: [temp_txt.tp_coluna_toracica, self.panel_widget_coluna_toracica],
            self.panel_info.menu_item_coluna_toraco_lombar: [temp_txt.tp_coluna_toraco_lombar, self.panel_widget_coluna_toracolombar],
            self.panel_info.menu_item_coluna_lombar: [temp_txt.tp_coluna_lombar, self.panel_widget_coluna_lombar, self.panel_widget_torax],
            self.panel_info.menu_item_coluna_lombossacra: [temp_txt.tp_coluna_lombossacra, self.panel_widget_coluna_lombossacra],
            self.panel_info.menu_item_coluna_sacro_coccigea: [temp_txt.tp_coluna_sacrococcix, self.panel_widget_coluna_sacrococcix],
            self.panel_info.menu_item_coluna_total: [temp_txt.tp_coluna_total, self.panel_widget_coluna_total],
            self.panel_info.menu_item_torax: [temp_txt.tp_torax, self.panel_widget_torax],
            self.panel_info.menu_item_arcos_costais_a_direita: [temp_txt.tp_arcos_costais_a_direita, self.panel_widget_arcos_costais_direita],
            self.panel_info.menu_item_arcos_costais_a_esquerda: [temp_txt.tp_arcos_costais_a_esquerda, self.panel_widget_arcos_costais_esquerda],
            self.panel_info.menu_item_abdomen_simples: [temp_txt.tp_abdome_simples, None],
            self.panel_info.menu_item_abdome_agudo_simples: [temp_txt.tp_abdome_agudo_simples, None],
            self.panel_info.menu_item_articulacoes: [temp_txt.tp_articulacoes, None],
            self.panel_info.menu_item_ombro_direito: [temp_txt.tp_ombro_direito, self.panel_widget_ombro_direito],
            self.panel_info.menu_item_ombro_esquerdo: [temp_txt.tp_ombro_esquerdo, self.panel_widget_ombro_esquerdo],
            self.panel_info.menu_item_clavicula_direita: [temp_txt.tp_clavicula_direita, None],
            self.panel_info.menu_item_clavicula_esquerda: [temp_txt.tp_clavicula_esquerda, None],
            self.panel_info.menu_item_escapula_direita: [temp_txt.tp_escapula_direita, None],
            self.panel_info.menu_item_escapula_esquerda: [temp_txt.tp_escapula_esquerda, None],
            self.panel_info.menu_item_braco_direito: [temp_txt.tp_braco_direito, None],
            self.panel_info.menu_item_braço_esquerdo: [temp_txt.tp_braco_esquerdo, None],
            self.panel_info.menu_item_cotovelo_direito: [temp_txt.tp_cotovelo_direito, None],
            self.panel_info.menu_item_cotovelo_esquerdo: [temp_txt.tp_cotovelo_esquerdo, None],
            self.panel_info.menu_item_antebraço_direito: [temp_txt.tp_antebraco_direito, None],
            self.panel_info.menu_item_antebraço_esquerdo: [temp_txt.tp_antebraco_esquerdo, None],
            self.panel_info.menu_item_punho_direito: [temp_txt.tp_punho_direito, None],
            self.panel_info.menu_item_punho_esquerdo: [temp_txt.tp_punho_esquerdo, None],
            self.panel_info.menu_item_dedos_da_mao_direita: [temp_txt.tp_dedos_da_mao_direita, None],
            self.panel_info.menu_item_dedos_da_mao_esquerda: [temp_txt.tp_dedos_da_mao_esquerda, None],
            self.panel_info.menu_item_mao_direita: [temp_txt.tp_mao_direita, self.panel_widget_mao_direita],
            self.panel_info.menu_item_mao_esquerda: [temp_txt.tp_mao_esquerda, self.panel_widget_mao_esquerda],
            self.panel_info.menu_item_bacia: [temp_txt.tp_bacia, None],
            self.panel_info.menu_item_quadril_direito: [temp_txt.tp_quadril_direito, None],
            self.panel_info.menu_item_quadril_esquerdo: [temp_txt.tp_quadril_esquerdo, None],
            self.panel_info.menu_item_femur_direito: [temp_txt.tp_femur_direito, None],
            self.panel_info.menu_item_femur_esquerdo: [temp_txt.tp_femur_esquerdo, None],
            self.panel_info.menu_item_coxa_direita: [temp_txt.tp_coxa_direita, None],
            self.panel_info.menu_item_coxa_esquerda: [temp_txt.tp_coxa_esquerda, None],
            self.panel_info.menu_item_joelho_direito: [temp_txt.tp_joelho_direito, None],
            self.panel_info.menu_item_joelho_esquerdo: [temp_txt.tp_joelho_esquerdo, None],
            self.panel_info.menu_item_perna_direita: [temp_txt.tp_perna_direita, None],
            self.panel_info.menu_item_perna_esquerda: [temp_txt.tp_perna_esquerda, None],
            self.panel_info.menu_item_tornozelo_direito: [temp_txt.tp_tornozelo_direito, None],
            self.panel_info.menu_item_tornozelo_esquerdo: [temp_txt.tp_tornozelo_esquerdo, None],
            self.panel_info.menu_item_pe_direito: [temp_txt.tp_pe_direito, None],
            self.panel_info.menu_item_pe_esquerdo: [temp_txt.tp_pe_esquerdo, None],
            self.panel_info.menu_item_calcaneo_direito: [temp_txt.tp_calcaneo_direito, None],
            self.panel_info.menu_item_calcaneo_esquerdo: [temp_txt.tp_calcaneo_esquerdo, None],
            self.panel_info.menu_item_urografia_excretora: [temp_txt.tp_urografia_excretora, None],
            self.panel_info.menu_item_transito_intestinal: [temp_txt.tp_transito_intestinal, None],
            self.panel_info.menu_item_esofago_estomago_e_duodeno_contrastado: [temp_txt.tp_esofago_estomago_e_duodeno_contrastado, None],
            self.panel_info.menu_item_enema_opaco: [temp_txt.tp_enema_opaco, None],
            self.panel_info.menu_item_dacriocistografia: [temp_txt.tp_dacriocistografia, None],
            self.panel_info.menu_item_uretrocistografia_miccional: [temp_txt.tp_uretrocistografia_miccional, None],
            self.panel_info.menu_item_uretrocistografia_retrograda: [temp_txt.tp_uretrocistografia_retrograda_e_miccional, None],
            self.panel_info.menu_item_uretrocistografia_retrograda_e_miccional: [temp_txt.tp_uretrocistografia_retrograda_e_miccional, None],
            self.panel_info.menu_item_histerossalpingografia: [temp_txt.tp_histerossalpingografia, None],
            self.panel_info.menu_item_mao_para_idade_ossea: [temp_txt.tp_mao_para_idade_ossea, None],
            self.panel_info.menu_item_escanometria: [temp_txt.tp_escanometria, None],
            self.panel_info.menu_item_legg_calve_perthes_pelve: [temp_txt.tp_legg_calve_perthes_pelve, None],
            self.panel_info.menu_item_idade_ossea: [temp_txt.tp_idade_ossea, None]
        }


    # Pegar posição do mouse
    def on_mouse_pos(self, event):
        """Pegar posição do mouse."""
        pos = event.GetPosition()
        print("x=" + str(pos[0] - 18))
        print("y=" + str(pos[1] - 38))


    def fala_para_texto(self, event):
        """Converter fala para texto."""
        thread.start_new_thread(self.fala_para_texto_thread, (1, ))

    def fala_para_texto_thread(self, meuId):
        print("Pronto para ouvir!")
        texto_falado = FalaParaTexto.audio_para_texto(None).replace(" ponto", ".\n")
        self.panel_text.text_editor.WriteText(texto_falado)

    def on_ao_digitar_nome(self, event):
        """Ao difitar nome passar para editor de texto"""
        print("Digitando!")

    def on_copiar(self, event):
        """Ao clicar no ico copiar, copiar texto do
        editor para área de transferência."""
        print("Pronto para copiar.")
        nome = self.panel_info.nome_paciente_text_ctrl.Value.upper().strip()
        texto = self.panel_text.text_editor.Value

        if nome != "":
            nome += "\n\n"
            texto = nome + self.panel_text.text_editor.Value
        else:
            texto = self.panel_text.text_editor.Value

        data_text_obj = wx.TextDataObject()                     # Cesta para texto
        if wx.TheClipboard.Open() or wx.TheClipboard.IsOpen():  # Abrir área de transferência do pc
            data_text_obj.SetText(texto)                        # Coloco texto na cesta
            wx.TheClipboard.SetData(data_text_obj)              # Coloco cesta na a. de trans
            wx.TheClipboard.Close()                             # Fecho área de trasferência.

    def resultado_conclusao(self, event):
        """Formata o texto colocando o laudo entre Resultado e Conclusão."""
        texto = self.panel_text.text_editor.GetValue()
        #print(texto)
        self.panel_text.text_editor.SetValue( self.titulo_exame + "\nRESULTADO:\n" + texto + "\nCONCLUSÃO:\n")




    def on_linpar_nome_pac(self, event):
        """Limpar nome do paciente do TextCtrl."""
        text = ""
        self.panel_info.nome_paciente_text_ctrl.SetValue(text)


    def on_limpar_texto(self, event):
        """Limpar editor de texto."""
        try:
            if self.panel_text.text_editor.Value != "":
                self.texto_guardado = self.panel_text.text_editor.GetValue()
                self.panel_text.text_editor.SetValue("")
            elif self.panel_text.text_editor.Value == "":
                self.panel_text.text_editor.SetValue(self.texto_guardado)
        except AttributeError:
            print("AttributeError: 'MyFrame' object has no attribute 'texto_guardado")
            pass


    def on_menu(self, event):
        event_id = event.GetId()
        event_obj = event.EventObject

    # Coloca o texto
        for key, value in self.dic_panel_info.items():
            try:
                desligar = value[1].Hide()
            except AttributeError:
                print("Falta implementar panel com imagem e ocutar os demais")
            if event_id == key.GetId():
                texto = value[0]() + "\n\n"
                self.titulo_exame = value[0]().split("\n", 1)[0]
                #self.panel_text.text_editor.SetValue(texto)
                self.panel_text.text_editor.AppendText(texto)
                self.panel_clinico.texto_info_clinica.SetValue("")
                self.panel_clinico.conclusao_info_clinica.SetValue("")
                img = wx.Image("img_para_info.png").ConvertToBitmap()
                self.panel_clinico.info_imagem.SetBitmap(img)
                self.panel_clinico.info_imagem.Refresh()
                try:
                    ligar = value[1].Show()
                    self.panel_ligado = value[1]
                    self.flag_resize = True
                except AttributeError:
                    print("!!!!@@@@")
        self.Layout()

    def on_resize(self, event):
        event_id = event.GetId()
        event_obj = event.EventObject

        """Expandir editor de texto."""
        if self.flag_resize == True:
            self.panel_ligado.Hide()
            self.flag_resize = False
        elif self.flag_resize == False:
            self.panel_ligado.Show()
            self.flag_resize = True
        self.Layout()
        self.panel_clinico.Refresh()

    def on_idea(self, event):
        """Mostrar ou esconder o panel de informação
        clínica."""
        if self.idea_flag == False:
            self.panel_clinico.Show()
            self.idea_flag = True
        elif self.idea_flag == True:
            self.panel_clinico.Hide()
            self.idea_flag = False
        self.Layout()
        self.Refresh(eraseBackground=True)

    def on_maximize(self, event):
        """Redesenhar o quadro ao maximizar"""
        self.Refresh()
        print("Is Maximized:", self.IsMaximized())


    # Escrever texto para o editor do panel_widget_torax
        # estou dando prioridade para a helpstring

    def on_menu_rx(self, event):
        """Escrever texto para o editor estou dando prioridade para a helpstring"""
        event_id = event.GetId()
        event_obj = event.EventObject

        if event_obj.GetHelpString(event_id) == "":
            texto_label = event_obj.GetLabel(event_id) + "\n"
            self.panel_text.text_editor.WriteText(texto_label)
        elif event_obj.GetHelpString(event_id).split != "":
            texto_label = event_obj.GetHelpString(event_id).split("#r#")[1] + "\n"
            self.panel_text.text_editor.WriteText(texto_label)
            try:
                texto_info = event_obj.GetHelpString(event_id).split("#info#")[1]
                self.panel_clinico.texto_info_clinica.SetValue(texto_info)
            except IndexError:
                print("Sem para info texto")
            try:
                imagem_info = wx.Image(event_obj.GetHelpString(event_id).split("#img#")[1]).ConvertToBitmap()
                self.panel_clinico.info_imagem.SetBitmap(imagem_info)
            except IndexError:
                print("Sem imagem para info te")
            try:
                texto_con = event_obj.GetHelpString(event_id).split("#con#")[1] + "\n\n"
                self.panel_clinico.conclusao_info_clinica.WriteText(texto_con)
            except IndexError:
                print("Sem para conclusão")


class MyApp(wx.App):
    """Meu App"""
    def OnInit(self):
        """For MainLoop."""

        self.frame = MyFrame(None, "Assistente Rx versão 2")
        self.frame.Show()
        return True


if __name__ == "__main__":
    app = MyApp(False)
    app.MainLoop()


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Tim Roberts
On 06/19/2018 10:10 AM, Pedro Alexandre wrote:

> Hello everybody.
> I need help.
> I'm a beginner programmer.
> Wxpython a is very good GUI. The best of me.
> I'm having a serious problem with wxpython.
> I'm using it to make a medical application to report x-ray
> But I me having this problem:
> 13:53:04: Out of window IDs.  Recommend shutting down application.
> 13:53:04: Out of window IDs.  Recommend shutting down application.
> 13:53:04: Out of window IDs.  Recommend shutting down application.
> 13:53:04: Out of window IDs.  Recommend shutting down application.
> ...
>
> How could I solve this problem?

Are each of those calls to anat.Anatomia.etc actually creating a
button?  You have more than 400 of those calls here.

It might be more productive for you to treat those images like an "image
map" in HTML, where you just keep track of the "live" areas, so that any
time there is a click, you just check the mouse coordinate against your
list of active areas to see if there was a hit.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

GadgetSteve


On 19/06/2018 23:41, Tim Roberts wrote:

> On 06/19/2018 10:10 AM, Pedro Alexandre wrote:
>
>> Hello everybody.
>> I need help.
>> I'm a beginner programmer.
>> Wxpython a is very good GUI. The best of me.
>> I'm having a serious problem with wxpython.
>> I'm using it to make a medical application to report x-ray
>> But I me having this problem:
>> 13:53:04: Out of window IDs.  Recommend shutting down application.
>> 13:53:04: Out of window IDs.  Recommend shutting down application.
>> 13:53:04: Out of window IDs.  Recommend shutting down application.
>> 13:53:04: Out of window IDs.  Recommend shutting down application.
>> ...
>>
>> How could I solve this problem?
>
> Are each of those calls to anat.Anatomia.etc actually creating a
> button?  You have more than 400 of those calls here.
>
> It might be more productive for you to treat those images like an "image
> map" in HTML, where you just keep track of the "live" areas, so that any
> time there is a click, you just check the mouse coordinate against your
> list of active areas to see if there was a hit.
>

Presumably, unless you are using a huge screen, with that many controls
not all, (or even a large proportion), are shown on the screen at the
same time and they are actually shown in tabs, scrollable or some other
view selection method. One trick that can work very well is to have a
fixed screen layout with generalised buttons where when you change the
view you update the text on the buttons, (and possibly some other data
associated with them such as enable/disable state or visibility). You
can then have a generic handler bound to them all (or to groups of them)
that utilise a dictionary of what to call based on which button & which
view you are currently on. This works very well and tends to produce a
more consistent user experience.

One trick that you can use with wxPython, (as opposed to wxWidgets), is
that each control item is a python object which means that you can add
associations at run time such as control.CurrentHandler = some.method.

I would take this further and programatically generate the buttons from
a list of dictionaries each specifying the required characteristics of
the controls in their initial state. You will be amazed how much neater
and more maintainable this can make your code.

I have used all of these methods successfully in the past and they can
help a lot.
--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

---
This email has been checked for viruses by AVG.
https://www.avg.com

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Pedro Alexandre
In reply to this post by Tim Roberts
Thank you very much. 
Excuse me for the large code. It's my first post. 
I'm so sorry. 
You could run my code, and see what is happening. 
I don't know how solve this problem yet.
The problem begin after some numbers of buttons.
I think should you be easier way to solve the problem.
If it don't spend much time you could can run my code. 
Again thank you very much.

project: https://drive.google.com/open?id=1IFZoM6CgnPY4bf7goeygWesPprUbfsET 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

GNUmed, Brazil, was: [wxPython-users] Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Karsten Hilbert
In reply to this post by Pedro Alexandre
Hello Pedro,

I do not have a better suggestion for your immediate problem
than what has already been written. However, I do have a
suggestion:

Since you are [...]

> [...] using it to make a medical application

may I suggest you take a look at GNUmed

        https://www.gnumed.de

        https://github.com/ncqgm/gnumed

which is a wxPython application for medical practices.

If you write a description of what you actually need your
program to do we can think about whether the functionality
could easily be integrated into GNUmed.

Using GNUmed would immediately give you a stable base to
build upon including but not limited to Debian packages,
application structure, database access (PostgreSQL), patient
management, document archive, SOAP notes, and Orthanc PACS

        https://www.orthanc-server.com/

access (since you are probably working with DICOM images)

> [...] to report x-ray

At one time our user community included a doctor from Brazil,
which it seems you are writing from,

> texto_falado = reconhecer.recognize_google(audio, None, "pt-BR")

and whom I have copied this email to, in case he might be
willing to provide some assistance, if you are interested.

There has been a presention on GNUmed at FISL in 2013:

        http://www.gnumed.de/downloads/videos/2013-presentation_FISL_Brazil.ogg

Hope that helps,
Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: GNUmed, Brazil, was: [wxPython-users] Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Pedro Alexandre
Thank you very much for help me. 
If you have some email from Brazilian you can send for me. 
I'm going study some way to solve this problem. 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: GNUmed, Brazil, was: [wxPython-users] Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Pedro Alexandre
In reply to this post by Karsten Hilbert
Thank you very much for help me. 
If you have some email from Brazilian you can send for me. 
I'm going study some way to solve this problem. 

Em quarta-feira, 20 de junho de 2018 07:08:42 UTC-3, Karsten Hilbert escreveu:
Hello Pedro,

I do not have a better suggestion for your immediate problem
than what has already been written. However, I do have a
suggestion:

Since you are [...]

> [...] using it to make a medical application

may I suggest you take a look at GNUmed

        <a href="https://www.gnumed.de" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.gnumed.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEMjsKafBTl9ekO_YD2IKp5kfYvIg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.gnumed.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEMjsKafBTl9ekO_YD2IKp5kfYvIg&#39;;return true;">https://www.gnumed.de

        <a href="https://github.com/ncqgm/gnumed" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fncqgm%2Fgnumed\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGUxczEITmH84tmdLAFyOQNtRbwwQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fncqgm%2Fgnumed\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGUxczEITmH84tmdLAFyOQNtRbwwQ&#39;;return true;">https://github.com/ncqgm/gnumed

which is a wxPython application for medical practices.

If you write a description of what you actually need your
program to do we can think about whether the functionality
could easily be integrated into GNUmed.

Using GNUmed would immediately give you a stable base to
build upon including but not limited to Debian packages,
application structure, database access (PostgreSQL), patient
management, document archive, SOAP notes, and Orthanc PACS

        <a href="https://www.orthanc-server.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.orthanc-server.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHpZ47Ye4ODxlgDRiKfXqCbgdBn3w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.orthanc-server.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHpZ47Ye4ODxlgDRiKfXqCbgdBn3w&#39;;return true;">https://www.orthanc-server.com/

access (since you are probably working with DICOM images)

> [...] to report x-ray

At one time our user community included a doctor from Brazil,
which it seems you are writing from,

>        texto_falado = reconhecer.recognize_google(audio, None, "pt-BR")

and whom I have copied this email to, in case he might be
willing to provide some assistance, if you are interested.

There has been a presention on GNUmed at FISL in 2013:

        <a href="http://www.gnumed.de/downloads/videos/2013-presentation_FISL_Brazil.ogg" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.gnumed.de%2Fdownloads%2Fvideos%2F2013-presentation_FISL_Brazil.ogg\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzrrz3IJNfvYBjKWp8Wnmv8JdJMw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.gnumed.de%2Fdownloads%2Fvideos%2F2013-presentation_FISL_Brazil.ogg\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFzrrz3IJNfvYBjKWp8Wnmv8JdJMw&#39;;return true;">http://www.gnumed.de/downloads/videos/2013-presentation_FISL_Brazil.ogg

Hope that helps,
Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Tim Roberts
In reply to this post by Pedro Alexandre
On 06/19/2018 10:36 PM, Pedro Alexandre wrote:

> Thank you very much.
> Excuse me for the large code. It's my first post.
> I'm so sorry.
> You could run my code, and see what is happening.

No, we can't.  The code you posted is missing a bunch of modules, and
your Google Drive project is in the trash.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Robin Dunn
In reply to this post by Pedro Alexandre
On Tuesday, June 19, 2018 at 10:36:20 PM UTC-7, Pedro Alexandre wrote:
Thank you very much. 
Excuse me for the large code. It's my first post. 
I'm so sorry. 
You could run my code, and see what is happening. 

As I said in your duplicate message thread on wxPython-dev:

When asking for help it is vital that you provide a short-as-possible and runnable code sample. Nobody but you has the time nor inclination to fully understand your entire application. Either recreate the problem in an application that shows nothing but the problem, or reduce the current code to attempt the same. In the process you may actually find the cause of the problem yourself and learn what not to do in the future.


--
Robin


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Pedro Alexandre
In reply to this post by Tim Roberts
I have delete the link. 
But I can post again. 
It is a very helpful project. Here we are need something like this.
The picture what's my project look like. 
Thank you. 
Link to download: https://drive.google.com/open?id=1U-gHfl0qVXNWUCNvHLBOOC9_AccHLp2e


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Pedro Alexandre
In reply to this post by Tim Roberts
It is the problem I having: 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Pedro Alexandre
In reply to this post by Tim Roberts
I have deleted the link. 
But I can post again.  Here it is: Link to download: https://drive.google.com/open?id=1U-gHfl0qVXNWUCNvHLBOOC9_AccHLp2e
It is a very helpful project. Here we are need something like this.
The picture what's my project look like. 

The problem I'm having with wxpython IDs begin after some exact number of buttons. 

But to continue I need much more buttons, because I have others wx.Panel to do with others 
human body. 


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

GadgetSteve


On 21/06/2018 02:04, Pedro Alexandre wrote:

>     I have deleted the link.
>     But I can post again.  Here it is: Link to download:
>     https://drive.google.com/open?id=1U-gHfl0qVXNWUCNvHLBOOC9_AccHLp2e
>     <https://drive.google.com/open?id=1U-gHfl0qVXNWUCNvHLBOOC9_AccHLp2e>
>     It is a very helpful project. Here we are need something like this.
>     The picture what's my project look like.
>
>     <https://lh3.googleusercontent.com/-qLxHFKhpkYg/Wyr4CoXG2XI/AAAAAAAAsqo/FXUxZ9YVE94yzrZ6mR5r-h7lduUD3kHZgCLcBGAs/s1600/2018-06-20%2B%25284%2529.png>
>
>     <https://lh3.googleusercontent.com/-PVL9Jz5Xso0/Wyr4F9xcimI/AAAAAAAAsqs/0nBRL3n4_9UkTuWETBGj8I9J7rRFvED7ACLcBGAs/s1600/2018-06-20%2B%25286%2529.png>
>
>     The problem I'm having with wxpython IDs begin after some exact
>     number of buttons.
>
>
> But to continue I need much more buttons, because I have others wx.Panel
> to do with others
> human body.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout.

But you only need a few buttons on each wxPanel and many of them are
probably common!
--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

---
This email has been checked for viruses by AVG.
https://www.avg.com

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Tim Roberts
In reply to this post by Pedro Alexandre
On Jun 20, 2018, at 6:04 PM, Pedro Alexandre <[hidden email]> wrote:

I have deleted the link. 
But I can post again.  Here it is: Link to download: https://drive.google.com/open?id=1U-gHfl0qVXNWUCNvHLBOOC9_AccHLp2e
It is a very helpful project. Here we are need something like this.
The picture what's my project look like. ...

The problem I'm having with wxpython IDs begin after some exact number of buttons. 

But to continue I need much more buttons, because I have others wx.Panel to do with others 
human body. 

You do not need buttons for this.  That's what I tried to tell you the first time.  What you need here is the equivalent of an HTML image map.  If you don't know what that is, you should look it up.

Instead of using buttons at all, you would just catch mouse down events on the image itself.  You already have the coordinates of all of the "hot zones" within the image.  So, all you need to do is have an array that says something like this:
    x,y = GetMouseClickPosition
    for hotzone in set_of_hot_zones:
        if point_within_zone( (x,y), hotzone.location):
            trigger_button_clock( hotzone )
— 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help, please: 13:53:04: Out of window IDs. Recommend shutting down application.

Pedro Alexandre
In reply to this post by Tim Roberts
Great idea!
I'm going to do that. 
Thank you very much, Tim Roberts.


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.