Skip to content

Conversation

@pbbaba
Copy link

@pbbaba pbbaba commented Oct 9, 2023

No description provided.

series_uid=dcminfo.get("SeriesInstanceUID"),
time=dcminfo.get("AcquisitionTime"),
# ASL support
in_plane_phase_encoding_direction = dcminfo.get("InPlanePhaseEncodingDirection") if dcminfo.get("InPlanePhaseEncodingDirection") else None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just

Suggested change
in_plane_phase_encoding_direction = dcminfo.get("InPlanePhaseEncodingDirection") if dcminfo.get("InPlanePhaseEncodingDirection") else None,
in_plane_phase_encoding_direction = dcminfo.get("InPlanePhaseEncodingDirection"),

and so on would be sufficient. But first please elaborate why these particular are necessary for ASL support?
Note: we do not really want to extend list of extracted fields to get unnecessarily long.

NB I should really look into finishing #581 some days soon to provide means for easy extraction of any metadata desired.

@pbbaba
Copy link
Author

pbbaba commented Oct 9, 2023

I added the if..else condition so as to avoid the code break if any dicom image does not contain these headers. It did break for 'Image Orientation Patient' tag.

I added these extra tags so as to make them accessible for naming the perf files during the BIDS conversion.

@yarikoptic
Copy link
Member

I added the if..else condition so as to avoid the code break if any dicom image does not contain these headers. It did break for 'Image Orientation Patient' tag.

.get("key") should work and default to None if there is no "key". So code should not break and if..else hence not needed

@yarikoptic
Copy link
Member

ping @pbbaba - do you have time to tune up the PR following the review?

@pbbaba pbbaba closed this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants