-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'FileDataset' object has no attribute 'SeriesDate' #20
Comments
That would be awesome if you could PR this, we are always looking for new contributors to help make rt-utils a better community tool! The implementation for it should be fairly simple and would essentially just entail changing the dates to provide a default value as we do for the StudyDescription, etc... (shown below) def add_study_and_series_information(ds: FileDataset, series_data):
reference_ds = series_data[0] # All elements in series should have the same data
ds.StudyDate = reference_ds.StudyDate
ds.SeriesDate = reference_ds.SeriesDate
ds.StudyTime = reference_ds.StudyTime
ds.SeriesTime = reference_ds.SeriesTime
ds.StudyDescription = getattr(reference_ds, 'StudyDescription', '')
ds.SeriesDescription = getattr(reference_ds, 'SeriesDescription', '')
ds.StudyInstanceUID = reference_ds.StudyInstanceUID
ds.SeriesInstanceUID = generate_uid()
ds.StudyID = reference_ds.StudyID
ds.SeriesNumber = "1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
We have come across this error on a few datasets we are using. Including the LCTSC dataset from TCIA: http:https://doi.org/10.7937/K9/TCIA.2017.3r3fvz08
The problem is our DICOMs don't have the SeriesDate attribute. Is this something any one else has come across? Could we consider adjusting the code only copy over that attribute if it is available? I'd be happy to look at submitting a pull request if this is something you are interested in.
Thanks!
Phil
The text was updated successfully, but these errors were encountered: