def METHOD_NAME():
    parser = _build_arg_parser()
    args = parser.parse_args()
    assert_inputs_exist(parser, args.in_tractogram)
    assert_outputs_exist(parser, args, args.out_tractogram, args.save_rejected)
    if args.verbose:
        logging.getLogger().setLevel(logging.DEBUG)
        # Silencing SFT's logger if our logging is in DEBUG mode, because it
        # typically produces a lot of outputs!
        set_sft_logger_level('WARNING')
    if args.min_x == 0 and np.isinf(args.max_x) and \
       args.min_y == 0 and np.isinf(args.max_y) and \
       args.min_z == 0 and np.isinf(args.max_z):
        logging.warning("You have not specified min or max in any direction. "
                        "Output will simply be a copy of your input!")
    sft = load_tractogram_with_reference(parser, args, args.in_tractogram)
    computed_rejected_sft = args.save_rejected is not None
    new_sft, indices, rejected_sft = \
        filter_streamlines_by_total_length_per_dim(
            sft, [args.min_x, args.max_x], [args.min_y, args.max_y],
            [args.min_z, args.max_z], args.use_abs, computed_rejected_sft)
    if args.display_counts:
        sc_bf = len(sft.streamlines)
        sc_af = len(new_sft.streamlines)
        print(json.dumps({'streamline_count_before_filtering': int(sc_bf),
                         'streamline_count_after_filtering': int(sc_af)},
                         indent=args.indent))
    if len(new_sft.streamlines) == 0:
        if args.no_empty:
            logging.debug("The file {} won't be written "
                          "(0 streamline).".format(args.out_tractogram))
        else:
            logging.debug('The file {} contains 0 streamline'.format(
                args.out_tractogram))
    save_tractogram(new_sft, args.out_tractogram)
    if computed_rejected_sft:
        save_tractogram(rejected_sft, args.save_rejected)