omidb.filters

class omidb.filters.FilterImages(image_filter)[source]

Filter images of a hierarchical Image model, by applying a user-specified filtering function to each image.

Parameters

image_filter (Callable[[Image], bool]) – Use image_filter to filter images provided by the caller.

__call__(obj)[source]

Inplace filtering of the omidb.image.Image s found in obj.

Parameters

obj (Union[Client, Episode, Study, Series]) – Filter the images nested within one of the core OMI-DB objects

Return type

None

classmethod dicom_filter(tag_criteria)[source]

Returns a new FilterImages instance whose filter function uses the tag/attribute name of a Data Element to filter images by the value of a specific Data Element, i.e. filter by dicom property.

Parameters

tag_criteria (Dict[str, List[str]]) – Dictionary whose keys are the data element tags and values are a list of data element values

Return type

FilterImages