def main(args): p = CompoundParser([ execution_parser, application_parser, registration_parser, AnnotatedParser(parser=mk_mbm_parser(), namespace="mbm") ]) options = parse(p, args[1:]) stages = asymmetry_pipeline(options).stages execute(stages, options)
def main(args): p = CompoundParser( [execution_parser, application_parser, registration_parser, AnnotatedParser(parser=mk_mbm_parser(), namespace="mbm")]) options = parse(p, args[1:]) stages = asymmetry_pipeline(options).stages execute(stages, options)
def main(args): # TODO rewrite using `mk_application` p = CompoundParser( [execution_parser, application_parser, registration_parser, tamarack_parser, AnnotatedParser(parser=mk_mbm_parser(with_common_space=False, with_maget=True), namespace="mbm")]) options = parse(p, args[1:]) stages = tamarack_pipeline(options).stages execute(stages, options)
def main(args): p = CompoundParser( [execution_parser, application_parser, registration_parser, #twolevel_parser, AnnotatedParser(parser=mk_mbm_parser(with_common_space=False), namespace="mbm"), # TODO use this before 1st-/2nd-level args # TODO to combine the information from all three MBM parsers, # could use `ConfigArgParse`r `_source_to_settings` (others?) to check whether an option was defaulted # or user-specified, allowing the first/second-level options to override the general mbm settings #AnnotatedParser(parser=mbm_parser, namespace="first_level", prefix="first-level"), #AnnotatedParser(parser=mbm_parser, namespace="second_level", prefix="second-level"), #stats_parser #segmentation_parser ]) # TODO add more stats parsers? options = parse(p, args[1:]) execute(two_level_pipeline(options).stages, options)
def main(args): p = CompoundParser([ execution_parser, application_parser, registration_parser, #twolevel_parser, AnnotatedParser( parser=mk_mbm_parser(with_common_space=False), namespace="mbm"), # TODO use this before 1st-/2nd-level args # TODO to combine the information from all three MBM parsers, # could use `ConfigArgParse`r `_source_to_settings` (others?) to check whether an option was defaulted # or user-specified, allowing the first/second-level options to override the general mbm settings #AnnotatedParser(parser=mbm_parser, namespace="first_level", prefix="first-level"), #AnnotatedParser(parser=mbm_parser, namespace="second_level", prefix="second-level"), #stats_parser #segmentation_parser ]) # TODO add more stats parsers? options = parse(p, args[1:]) execute(two_level_pipeline(options).stages, options)
for img, xfm in zip(df["anatomical_lsq6_MincAtom"], df["lsq6_to_atlas_XfmAtom"])], count_targetspace_MincAtom=lambda df: [s.defer(mincresample_new(img=img, xfm=xfm, like=atlas_target)) for img, xfm in zip(df["count_lsq6_MincAtom"], df["lsq6_to_atlas_XfmAtom"])], atlas_lsq6space_MincAtom=lambda df: [s.defer(mincresample_new(img=atlas_target_label, xfm=xfm, like=like, invert=True, interpolation=Interpolation.nearest_neighbour, extra_flags=('-keep_real_range',))) for xfm, like in zip( df["lsq6_to_atlas_XfmAtom"], df["count_lsq6_MincAtom"])] ) csv.applymap(maybe_deref_path).to_csv("analysis.csv",index=False) s.defer(create_quality_control_images(imgs=csv.count_targetspace_MincAtom.tolist(), montage_dir=output_dir, montage_output=os.path.join(output_dir, pipeline_name + "_resampled", "count_montage"), auto_range=True, message="count_mincs")) return Result(stages=s, output=()) lsq6_parser = AnnotatedParser(parser=BaseParser(_mk_lsq6_parser(with_nuc=False, with_inormalize=False), "LSQ6"), namespace="lsq6", cast=to_lsq6_conf) tv_pipeline_application = mk_application(parsers=[AnnotatedParser(parser=mk_mbm_parser(with_common_space=False, lsq6_parser=lsq6_parser), namespace="mbm"), consensus_to_atlas_parser], pipeline=tissue_vision_pipeline) if __name__ == "__main__": tv_pipeline_application()