niprov.jsonfile module¶
-
class
niprov.jsonfile.JsonFile(dependencies=<niprov.dependencies.Dependencies object>)¶ Bases:
objectStores provenance in a local text file encoded as json.
-
add(image)¶ Add the provenance for one file to storage.
Parameters: image ( BaseFile) – Image file to store.
-
all()¶ Retrieve all known provenance from storage.
Returns: List of provenance for known files. Return type: list
-
byId(uid)¶
-
byLocation(locationString)¶ Get the provenance for a file at the given location.
In the case of a dicom series, this returns the provenance for the series.
Parameters: locationString (str) – Location of the image file. Returns: Provenance for one image file. Return type: dict
-
byLocations(listOfLocations)¶
-
byParents(listOfParentLocations)¶
-
getSeries(image)¶ Get the object that carries provenance for the series that the image passed is in.
Parameters: image ( DicomFile) – File that is part of a series.Returns: Image object that caries provenance for the series. Return type: DicomFile
-
inquire(query)¶
-
latest(n=20)¶
-
search(text)¶
-
serializeAndWrite(images)¶
-
statistics()¶
-
update(image)¶ Save changed provenance for this file..
Parameters: image ( BaseFile) – Image file that has changed.
-
updateApproval(fpath, approvalStatus)¶
-