openlifu.photoscan.Photoscan¶
- class openlifu.photoscan.Photoscan(id: "Annotated[str, OpenLIFUFieldData('Photoscan ID', 'ID of this photoscan')]" = 'photoscan', name: "Annotated[str, OpenLIFUFieldData('Photoscan name', 'Photoscan name')]" = 'Photoscan', model_filename: "Annotated[str | None, OpenLIFUFieldData('Model filename', 'Relative path to model')]" = None, texture_filename: "Annotated[str | None, OpenLIFUFieldData('Texture filename', 'Relative path to texture image')]" = None, mtl_filename: "Annotated[str | None, OpenLIFUFieldData('Material filename', 'Relative path to materials file')]" = None, photoscan_approved: 'Annotated[bool, OpenLIFUFieldData(\'Approved?\', "Approval state of the photoscan. \'True\' means the user has provided some kind of confirmation that the photoscan is good enough to be used.")]' = False)[source]¶
Bases:
object- static from_dict(d: Dict) Photoscan[source]¶
Create a Photoscan from a dictionary param d: Dictionary of photoscan parameters. returns: Photoscan object
- static from_file(filename) Photoscan[source]¶
Load a Photoscan from a metadata file :param filename: Name of the file
- id: Annotated[str, OpenLIFUFieldData('Photoscan ID', 'ID of this photoscan')] = 'photoscan'¶
ID of this photoscan
- model_filename: Annotated[str | None, OpenLIFUFieldData('Model filename', 'Relative path to model')] = None¶
Relative path to model
- mtl_filename: Annotated[str | None, OpenLIFUFieldData('Material filename', 'Relative path to materials file')] = None¶
Relative path to materials file
- name: Annotated[str, OpenLIFUFieldData('Photoscan name', 'Photoscan name')] = 'Photoscan'¶
Photoscan name
- photoscan_approved: Annotated[bool, OpenLIFUFieldData('Approved?', "Approval state of the photoscan. 'True' means the user has provided some kind of confirmation that the photoscan is good enough to be used.")] = False¶
Approval state of the photoscan. ‘True’ means the user has provided some kind of confirmation that the photoscan is good enough to be used.
- texture_filename: Annotated[str | None, OpenLIFUFieldData('Texture filename', 'Relative path to texture image')] = None¶
Relative path to texture image
- to_dict() Dict[source]¶
Convert the photoscan to a dictionary returns: Dictionary of photoscan parameters
- to_json(compact: bool) str[source]¶
Serialize a Photoscan to a json string. This is different to the format written to file and does not contain the loaded models and texture. :param compact: if enabled then the string is compact (not pretty). Disable for pretty.
Returns: A json string representing the complete Photoscan object