예제 #1
0
def read_args(argv=None):
    parser = su.add_default_args()
    parser.add_argument('--python_cmd',
                        help='python cmd',
                        required=False,
                        default=sys.executable)
    return su.Bag(au.parse_parser(parser, argv))
예제 #2
0
def render_image(subject,
                 atlas,
                 image_name,
                 output_path,
                 quality=60,
                 inflated=False,
                 inflated_ratio=1,
                 background_color='black',
                 lighting=1.0,
                 smooth_figure=False,
                 hide_lh=False,
                 hide_rh=False,
                 hide_subs=False,
                 show_elecs=False,
                 bipolar=False,
                 show_only_lead=False,
                 curr_elec='',
                 show_connections=False,
                 filter_nodes=True,
                 interactive=True,
                 blender_fol='',
                 subjects=''):
    image_name = [image_name] if isinstance(image_name, str) else image_name
    camera = [
        op.join(
            su.get_mmvt_dir(), subject, 'camera',
            'camera_{}{}.pkl'.format(camera_name, '_inf' if inflated else ''))
        for camera_name in image_name
    ]
    image_name = [
        '{}_{}_{}'.format(
            name, 'inflated_{}'.format(inflated_ratio) if inflated else 'pial',
            background_color) for name in image_name
    ]
    camera = ','.join(camera)
    image_name = ','.join(image_name)
    args = su.Bag(locals())
    su.call_script(__file__, args)