cvpy.base.ImageTable.ImageTable.from_table

static ImageTable.from_table(cas_table: CASTable, image_type: ImageType | None = None, image: str | None = None, dimension: str | None = None, resolution: str | None = None, imageFormat: str | None = None, path: str | None = None, label: str | None = None, id: str | None = None, size: str | None = None, type: str | None = None)

Creates an ImageTable from a CASTable.

cas_table:

Specifies the input CAStable that contains image data.

image_type:

Specifies the type of images, either ImageType.BIOMED or ImageType.NATURAL.

image:

Specifies the name of the column that contains image binaries.

dimension:

Specifies the name of the column that contains dimensions of images.

resolution:

Specifies the name of the column that contains resolutions of images.

imageFormat:

Specifies the name of the column that contains formats of image binaries.

path:

Specifies the name of the column that contains file paths.

label:

Specifies the name of the column that contains labels of images.

id:

Specifies the name of the variable that identifies each image.

size:

Specifies the name of the column that contains byte lengths of image binaries.

type:

Specifies the name of the column that contains the image type.

Returns:
NaturalImageTable or BiomedImageTable:

Returns an instance of NaturalImageTable or BiomedImageTable based on the image_type.