示例#1
0
    def setUp(self) -> None:
        setup_server.setup_data()

        self.instance = Instance(
            a_instance.IDENTIFIER,
            Orthanc(setup_server.ORTHANC_URL)
        )
示例#2
0
    def setUp(self) -> None:
        setup_server.setup_data()

        self.study = Study(
            a_study.IDENTIFIER,
            Orthanc(setup_server.ORTHANC_URL)
        )
示例#3
0
 def setUp(self) -> None:
     self.orthanc = Orthanc(setup_server.ORTHANC_URL)
示例#4
0
    def setUp(self) -> None:
        setup_server.setup_data()

        self.series = Series(a_series.IDENTIFIER,
                             Orthanc(setup_server.ORTHANC_URL))
示例#5
0
        tqdm.write("Finished Patient %s" % pid)
    except Exception as e:
        return str(e)


if __name__ == "__main__":

    import sys

    base_out_dir = "/work/scratch/schock/Temp/FromOrthanc"
    valid_ids = ["0000000001"]

    series_number_mapping = {"00": "img", "01": "left", "02": "right"}
    instance_frame_mapping = {"femur": 0, "tibia": 1}

    orthanc = Orthanc("http://orthanc:8043")
    orthanc.setup_credentials(sys.argv[1], sys.argv[2])  # If needed

    patient_ids = []
    tqdm.write("Retrieve Patient IDs")
    for study_identifier in orthanc.get_studies():
        study_information = orthanc.get_study_information(study_identifier)
        study_id = study_information["MainDicomTags"]["StudyID"]
        patient_id = study_information["PatientMainDicomTags"]["PatientID"]
        if study_id in valid_ids:
            # Add Unique Patient ID and Readable (but possibly ambiguous)
            # Patient ID
            patient_ids.append(
                (study_information["ParentPatient"], patient_id))

    tqdm.write("Start Processing Patients")
示例#6
0
 def setUp(self) -> None:
     self.orthanc = Orthanc(setup_server.ORTHANC_URL)
     self.remote = RemoteModality(self.orthanc, MODALITY)
示例#7
0
文件: main.py 项目: m-anand/ge2ni
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

import tkinter as tk
from tkinter import filedialog, ttk
from pathlib import Path
from distutils.dir_util import copy_tree
import subprocess, json, threading, time, datetime, zipfile, os
import concurrent.futures
from pyorthanc import Orthanc

orthanc = Orthanc('http://localhost:8042')

name = "genii"


# helper class for common gui widgets
class Elements:
    def __init__(self, master):
        self.master = master

    # method for all button processes
    def button(self, char, funct, lambdaVal, x_, y_, algn, rows):
        if lambdaVal == '':
            self.b = tk.Button(self.master, text=char, command=funct)
        else:
            self.b = tk.Button(self.master,
示例#8
0
 def setUp(self) -> None:
     setup_server.setup_data()
     self.patient = Patient(a_patient.IDENTIFIER,
                            Orthanc(setup_server.ORTHANC_URL))
示例#9
0
 def __init__(self):
     self.orthanc = Orthanc(Config.get('pacs_adres'))
     self.orthanc.setup_credentials(Config.get('pacs_login'),
                                    Config.get('pacs_password'))