Cli test
Compare changes
- fima authored
+ 108
− 50
@@ -8,39 +8,82 @@ from qim3d.utils import image_preview
@@ -8,39 +8,82 @@ from qim3d.utils import image_preview
preview_parser.add_argument('filename',type = str, metavar = 'FILENAME', help = 'Path to image that will be displayed')
preview_parser.add_argument('--slice',type = int, metavar ='S', default = None, help = 'Specifies which slice of the image will be displayed.\nDefaults to middle slice. If number exceeds number of slices, last slice will be displayed.' )
preview_parser.add_argument('--axis', type = int, metavar = 'AX', default=0, help = 'Specifies from which axis will be the slice taken. Defaults to 0.')
preview_parser.add_argument('--resolution',type = int, metavar = 'RES', default = 80, help = 'Resolution of displayed image. Defaults to 80.')
preview_parser.add_argument('--absolute_values', action='store_false', help = 'By default set the maximum value to be 255 so the contrast is strong. This turns it off.')
@@ -53,13 +96,13 @@ def main():
@@ -53,13 +96,13 @@ def main():
@@ -68,44 +111,59 @@ def main():
@@ -68,44 +111,59 @@ def main():
image_preview(image, image_width = args.resolution, axis = args.axis, slice = args.slice, relative_intensity= args.absolute_values)
\ No newline at end of file