cobra_db.filesystem

Module Contents

Functions

get_patient_path(patient_anon_id)

Obtains a relative folder with the first 12 Bytes (24 chars of the hexstring):

get_study_path(patient_anon_id, study_date)

Our definition of study is PatientID + StudyDate. This method helps keeping the

get_series_path(ds)

Get a unique path for a dataset

get_instance_path(ds)

Get unique path for instance

Attributes

non_alphanumeric

opt

cobra_db.filesystem.non_alphanumeric
cobra_db.filesystem.opt
cobra_db.filesystem.get_patient_path(patient_anon_id: str)[source]

Obtains a relative folder with the first 12 Bytes (24 chars of the hexstring): The hashed PatientID is 26e3af1f7f22df92d6185a8e15ebdfc0ad089a17ec516377525f42c016f1d5cb the folder is 26e/3af/1f7f22df92d6185a8e/ This will balance the folder structure given that the hash is almost random.

cobra_db.filesystem.get_study_path(patient_anon_id: str, study_date: datetime.datetime)[source]

Our definition of study is PatientID + StudyDate. This method helps keeping the folder structure in the same way

cobra_db.filesystem.get_series_path(ds: pydicom.Dataset)[source]

Get a unique path for a dataset

cobra_db.filesystem.get_instance_path(ds: pydicom.Dataset)[source]

Get unique path for instance