Skip to content

Commit

Permalink
remove unneeded synthstrip flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoopes committed Dec 25, 2021
1 parent 96cdeb4 commit 3e7f4e6
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions mri_synth_strip/mri_synth_strip
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ parser.add_argument('-o', '--output', required=True, help='Masked output image f
parser.add_argument('-m', '--mask', help='Output mask filename.')
parser.add_argument('-b', '--border', default=1, type=int, help='Mask border threshold. Default is 1.')
parser.add_argument('--model', help='Alternative model file.')
parser.add_argument('--uthresh', type=float, help='Intensity threshold to erase from input image.')
parser.add_argument('-v', '--verbose', action='store_true', help='Verbose output for debugging.')
parser.add_argument('-g', '--gpu', help='GPU ID. CPU is used by default.')
parser.add_argument('--max-norm', action='store_true', help='Normalize by max intensity instead of 97th percentile.')
parser.add_argument('--remove-neck', type=int,
help='Remove bottom part of 2nd axis from listed locations to end.')
args = parser.parse_args()

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '0' if args.verbose else '3'
Expand Down Expand Up @@ -109,15 +106,6 @@ with tf.device(device):
# load input volume
in_img = fs.Volume.read(args.input)

# threshold input
if args.uthresh is not None:
in_img.data[in_img.data > args.uthresh] = 0

# remove y-axis voxels
if args.remove_neck is not None:
print(f'Removing neck from {args.remove_neck} to bottom of image.')
in_img.data[:, args.remove_neck:, :] = 0

# conform image and normalize
conf_img = in_img.conform(shape=(256, 256, 256), voxsize=1.0, dtype='float32', interp_method='nearest')
in_data = conf_img.data
Expand Down

0 comments on commit 3e7f4e6

Please sign in to comment.