Skip to content

Commit

Permalink
PR touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
Susannah Trevino committed Nov 6, 2023
1 parent 34cedeb commit a2a90c1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion oct_converter/dicom/dicom.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from oct_converter.exceptions import InvalidOCTReaderError
from oct_converter.readers import BOCT, E2E, FDA, FDS, IMG, POCT

# Deterministic implentation UID based on package name and version
# Deterministic implementation UID based on package name and version
version = metadata.version("oct_converter")
implementation_uid = generate_uid(entropy_srcs=["oct_converter", version])

Expand Down
2 changes: 2 additions & 0 deletions oct_converter/dicom/e2e_meta.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from oct_converter.dicom.metadata import (
DicomMetadata,
ImageGeometry,
Expand Down
2 changes: 2 additions & 0 deletions oct_converter/dicom/img_meta.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from datetime import datetime

from oct_converter.dicom.metadata import (
Expand Down
8 changes: 4 additions & 4 deletions oct_converter/readers/img.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def read_oct_volume(
oct_volume = OCTVolumeWithMetaData(
[volume[:, :, i] for i in range(volume.shape[2])],
patient_id=meta.get("patient_id"),
acquisition_date=meta.get("acq"),
laterality=lat_map[meta.get("lat", None)],
acquisition_date=meta.get("acquisition_date"),
laterality=lat_map[meta.get("laterality", None)],
metadata=meta,
)
return oct_volume
Expand Down Expand Up @@ -87,15 +87,15 @@ def get_metadata_from_filename(self) -> dict:
else None
)
if acq:
meta["acq"] = datetime(
meta["acquisition_date"] = datetime(
year=int(acq[2]),
month=int(acq[0]),
day=int(acq[1]),
hour=int(acq[3]),
minute=int(acq[4]),
second=int(acq[5]),
)
meta["lat"] = (
meta["laterality"] = (
re.search(r"O[D|S]", filename).group(0)
if re.search(r"O[D|S]", filename)
else None
Expand Down

0 comments on commit a2a90c1

Please sign in to comment.