ndio/remote/resources.py
def create_dataset(self,
                       name,
                       x_img_size,
                       y_img_size,
                       z_img_size,
                       x_vox_res,
                       y_vox_res,
                       z_vox_res,
                       x_offset=0,
                       y_offset=0,
                       z_offset=0,
                       scaling_levels=0,
                       scaling_option=0,
                       dataset_description="",
                       is_public=0):
        """
        Creates a dataset.

        Arguments:
            name (str): Name of dataset
            x_img_size (int): max x coordinate of image size
            y_img_size (int): max y coordinate of image size
            z_img_size (int): max z coordinate of image size
            x_vox_res (float): x voxel resolution
            y_vox_res (float): y voxel resolution
            z_vox_res (float): z voxel resolution
            x_offset (int): x offset amount
            y_offset (int): y offset amount
            z_offset (int): z offset amount
            scaling_levels (int): Level of resolution scaling
            scaling_option (int): Z slices is 0 or Isotropic is 1
            dataset_description (str): Your description of the dataset
            is_public (int): 1 'true' or 0 'false' for viewability of data set
                in public

        Returns:
            bool: True if dataset created, False if not
        """
        url = self.url() + "/resource/dataset/{}".format(name)
        json = {
            "dataset_name": name,
            "ximagesize": x_img_size,
            "yimagesize": y_img_size,
            "zimagesize": z_img_size,
            "xvoxelres": x_vox_res,
            "yvoxelres": y_vox_res,
            "zvoxelres": z_vox_res,
            "xoffset": x_offset,
            "yoffset": y_offset,
            "zoffset": z_offset,
            "scalinglevels": scaling_levels,
            "scalingoption": scaling_option,
            "dataset_description": dataset_description,
            "public": is_public
        }
        req = self.remote_utils.post_url(url, json=json)

        if req.status_code is not 201:
            raise RemoteDataUploadError('Could not upload {}'.format(req.text))
        if req.content == "" or req.content == b'':
            return True
        else:
            return False
def create_dataset(self,
                       name,
                       x_img_size,
                       y_img_size,
                       z_img_size,
                       x_vox_res,
                       y_vox_res,
                       z_vox_res,
                       x_offset=0,
                       y_offset=0,
                       z_offset=0,
                       scaling_levels=0,
                       scaling_option=0,
                       dataset_description="",
                       is_public=0):
        """
        Creates a dataset.

        Arguments:
            name (str): Name of dataset
            x_img_size (int): max x coordinate of image size
            y_img_size (int): max y coordinate of image size
            z_img_size (int): max z coordinate of image size
            x_vox_res (float): x voxel resolution
            y_vox_res (float): y voxel resolution
            z_vox_res (float): z voxel resolution
            x_offset (int): x offset amount
            y_offset (int): y offset amount
            z_offset (int): z offset amount
            scaling_levels (int): Level of resolution scaling
            scaling_option (int): Z slices is 0 or Isotropic is 1
            dataset_description (str): Your description of the dataset
            is_public (int): 1 'true' or 0 'false' for viewability of data set
                in public

        Returns:
            bool: True if dataset created, False if not
        """
        url = self.url() + "/resource/dataset/{}".format(name)
        json = {
            "dataset_name": name,
            "ximagesize": x_img_size,
            "yimagesize": y_img_size,
            "zimagesize": z_img_size,
            "xvoxelres": x_vox_res,
            "yvoxelres": y_vox_res,
            "zvoxelres": z_vox_res,
            "xoffset": x_offset,
            "yoffset": y_offset,
            "zoffset": z_offset,
            "scalinglevels": scaling_levels,
            "scalingoption": scaling_option,
            "dataset_description": dataset_description,
            "public": is_public
        }
        req = self.remote_utils.post_url(url, json=json)

        if req.status_code is not 201:
            raise RemoteDataUploadError('Could not upload {}'.format(req.text))
        if req.content == "" or req.content == b'':
            return True
        else:
            return False
def create_dataset ( self , name , x_img_size , y_img_size , z_img_size , x_vox_res , y_vox_res , z_vox_res , x_offset = 0 , y_offset = 0 , z_offset = 0 , scaling_levels = 0 , scaling_option = 0 , dataset_description = "" , is_public = 0 ) : url = self . url ( ) + "/resource/dataset/{}" . format ( name ) json = { "dataset_name" : name , "ximagesize" : x_img_size , "yimagesize" : y_img_size , "zimagesize" : z_img_size , "xvoxelres" : x_vox_res , "yvoxelres" : y_vox_res , "zvoxelres" : z_vox_res , "xoffset" : x_offset , "yoffset" : y_offset , "zoffset" : z_offset , "scalinglevels" : scaling_levels , "scalingoption" : scaling_option , "dataset_description" : dataset_description , "public" : is_public } req = self . remote_utils . post_url ( url , json = json ) if req . status_code is not 201 : raise RemoteDataUploadError ( 'Could not upload {}' . format ( req . text ) ) if req . content == "" or req . content == b'' : return True else : return False
Creates a dataset.

        Arguments:
            name (str): Name of dataset
            x_img_size (int): max x coordinate of image size
            y_img_size (int): max y coordinate of image size
            z_img_size (int): max z coordinate of image size
            x_vox_res (float): x voxel resolution
            y_vox_res (float): y voxel resolution
            z_vox_res (float): z voxel resolution
            x_offset (int): x offset amount
            y_offset (int): y offset amount
            z_offset (int): z offset amount
            scaling_levels (int): Level of resolution scaling
            scaling_option (int): Z slices is 0 or Isotropic is 1
            dataset_description (str): Your description of the dataset
            is_public (int): 1 'true' or 0 'false' for viewability of data set
                in public

        Returns:
            bool: True if dataset created, False if not
Creates a dataset .