Prostate Net Loader
Prostate Net Loader contains functions to assist the Data Mining and loading process of Patients originated from the ProCAncer-AI Horizon's 2020 project.
The package is under construction for the time being therefore any suggestion would be appreciated.
Installation
Install the project via pip or pull the repo
pip install PROSTATENETLOADER == 0.0.1
Usage/Examples Series Parser tool
Detailed explanation of the series parser tool is presented at the ParquetParser_Examples.ipynb
Usage/Examples PROSTATENETLOADER Module
Examples could be found in Module_Examples.ipynb regarding the package. An example for a single patient is presented below
Single Patient
a) Import Libraries
import pandas as pd
import SimpleITK as sitk
import ProstateNetLoaders
b) Set the patient folder path and the csv extracted by the sequence selector tool
pth = "PCa-..."
metadata= pd.read_csv("results.csv",
names=["patient_id", "study_uid",
"series_uid", "series_type", "series_type_heuristics"])
c) Execute loaders and pick orientation ("AX","COR", "SAG") and sequence ("T2","ADC","DWI") and whether to be AI sequence parser (Heuristics = False) or Heuristics = True
a = ProstateNetLoaders.ExecuteLoader.Execute(pth, metadata, Heuristics = True)
a.LoadArrays(orientation="AX", seq="T2")
d) Get dictionaries where keys are the series names, values are the Image numpy arrays
pat,ann = a.GetItems()
Batch Loading
The structure of the folders should be like this
pth_batch = "Patients"
patients = {}
Sequence = "T2" # pick you sequence between "T2", "ADC", "DWI"
T2_absence = [] # Store the names of the failed patients
for patient in os.listdir(pth_batch):
pat = os.path.join(pth_batch,patient)
a = ProstateNetLoaders.ExecuteLoader.Execute(pat, metadata)
try:
a.LoadArrays(orientation="AX", seq=Sequence)
pat,ann = a.GetItems()
patients.update({patient:{Sequence:np.array(list(pat.values())[0]),"Lesion": np.array(list(ann.values())[0])}})
except:
T2_absence.append(patient)
continue
Authors
- Dimitris Zaridis
- Harry Kalantzopoulos
- Eugenia Mylona
- Nikolaos Tachos
- José Guilherme Almeida
Badges
Add badges from somewhere like: shields.io
License
Metadata
Release files for ProstateNetLoaders 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ProstateNetLoaders-0.0.1.tar.gz | 25.6 kB | Without provenance | Details for ProstateNetLoaders-0.0.1.tar.gz |
Release files / ProstateNetLoaders-0.0.1.tar.gz
| Download URL | ProstateNetLoaders-0.0.1.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fa323fec1b624736d297ac9a75104bf532b417ba45fe05e50c3adfb0fe3f853
|
|
BLAKE2b-256 checksum How to use checksums |
4ecc7398ecf459882ee111ff5bdf5ef3118ccc12737b0b2f14df0a25726ef830
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.8 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.1.0 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.13
|
Security for ProstateNetLoaders 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.