OPTIMAS/utils/files_handling.py
def read_image_size(json_file_path):
    """
    Open json file, read the image size and bin width to determine actuale
    images size in x and y dimensions
    input: json file path
    output: tuple (image size x, image size y)
    """
    with open(json_file_path) as f:
        data = json.load(f)
    image_bin = data['binning'][0]
    image_size_x, image_size_y = data['fov'][0][1], data['fov'][0][3]
    return (int(image_size_x/image_bin), int(image_size_y/image_bin))

    Open json file, read the image size and bin width to determine actuale
    images size in x and y dimensions
    input: json file path
    output: tuple (image size x, image size y)
    
Open json file, read the image size and bin width to determine actuale
images size in x and y dimensions
input: json file path
output: tuple (image size x, image size y)
Open json file read the image size and bin width to determine actuale images size in x and y dimensions input : json file path output : tuple ( image size x image size y )
def read_image_size(json_file_path):
    with open(json_file_path) as f:
        data = json.load(f)
    image_bin = data['binning'][0]
    image_size_x, image_size_y = data['fov'][0][1], data['fov'][0][3]
    return (int(image_size_x/image_bin), int(image_size_y/image_bin))
def read_image_size ( json_file_path ) : with open ( json_file_path ) as f : data = json . load ( f ) image_bin = data [ 'binning' ] [ 0 ] image_size_x , image_size_y = data [ 'fov' ] [ 0 ] [ 1 ] , data [ 'fov' ] [ 0 ] [ 3 ] return ( int ( image_size_x / image_bin ) , int ( image_size_y / image_bin ) )
Open json file, read the image size and bin width to determine actuale
images size in x and y dimensions
input: json file path
output: tuple (image size x, image size y)
Open json file read the image size and bin width to determine actuale images size in x and y dimensions input : json file path output : tuple ( image size x image size y )
"""
    Open json file, read the image size and bin width to determine actuale
    images size in x and y dimensions
    input: json file path
    output: tuple (image size x, image size y)
    """
json_file_path