Esempio n. 1
0
def run(args):
    logging.info("Loading and initializing bone pipeline dynamically")
    input_dir = args.input
    output_path = args.output
    pipeline_module = load_pipeline_dynamically(plid)
    pipeline_module.run(input_dir, output_path, [1])
    logging.info("Done.")
Esempio n. 2
0
def generate(entries, plid, ar_view):
    output_path = entries["Output File"].get()
    segment_type = list(entries["seg_types"].curselection())
    segment_type = [s + 1 for s in segment_type]
    quiet = entries["silence_log"].get()

    if plid != "brain_segmentation":
        input_dir = entries["Input"].get()
    else:
        flair_dir = entries["Flair Input"].get()
        t1_dir = entries["T1 Input"].get()
        ir_dir = entries["IR Input"].get()
        input_dir = [flair_dir, t1_dir, ir_dir]

    if ((plid == "brain_segmentation" and "" in input_dir) or input_dir == ""
            or output_path == "" or not segment_type):
        messagebox.showerror(
            "Error",
            "Please ensure input/s, an output path, and segmentation type is inputted",
        )
    else:
        logging.basicConfig(
            level=logging.ERROR if quiet else logging.INFO,
            format="%(asctime)s - %(module)s:%(levelname)s - %(message)s",
            datefmt="%d-%b-%y %H:%M:%S",
        )
        logging.info("Loading and initializing pipeline dynamically")
        pipeline_module = load_pipeline_dynamically(plid)
        if ar_view:
            pipeline_module.run(input_dir, output_path, segment_type, False)
            holo_registration_wrapper.start_viewer(output_path, plid)
        else:
            pipeline_module.run(input_dir, output_path, segment_type)
        logging.info("Done.")
def run(args):
    logging.info("Loading and initializing abdominal pipeline dynamically")
    input_dir = args.input
    output_path = args.output
    segment_type = args.type
    pipeline_module = load_pipeline_dynamically(plid)
    pipeline_module.run(input_dir, output_path, segment_type)
    logging.info("Done.")
Esempio n. 4
0
def openViewer():
    plid = "glb_importer"
    file_selected = filedialog.askopenfilename(filetypes=(("glb file",
                                                           "*.glb"),
                                                          ("All files", "*")))
    if file_selected != "":
        pipeline_module = load_pipeline_dynamically(plid)
        pipeline_module.run(file_selected)
def run(args):
    logging.info("Loading and initializing bone pipeline dynamically")
    flair_input_directory = args.flair_input
    t1_input_directory = args.t1_input
    ir_input_directory = args.ir_input
    output_path = args.output
    segment_type = args.type
    pipeline_module = load_pipeline_dynamically(plid)
    pipeline_module.run(
        [flair_input_directory, t1_input_directory, ir_input_directory],
        output_path,
        segment_type,
    )
    logging.info("Done.")
def run(args):
    logging.info("Loading and initializing mesh viewer dynamically")
    input_file = args.input_file
    pipeline_module = load_pipeline_dynamically(plid)
    pipeline_module.run(input_file)
    logging.info("Done.")