Closed pchlap closed 3 years ago
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"
This issue is similar to #19 @carluri
Hi,
We have come across this error on a few datasets we are using. Including the LCTSC dataset from TCIA: http://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