Skip to content

Conversation

pierocor
Copy link

This branch updates the loader and utility code for the Mayo clinic human CT dataset. In particular:

  • Update dependency (dicom -> pydicom).
  • Add minor fixes due to incongruent metadata and incompatibilities with ODL 1.0.0.
  • Implement handling of the flying focal spot via the src_shift_func of the ConeBeamGeometry.

Copy link
Member

@kohr-h kohr-h left a comment

Choose a reason for hiding this comment

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

Thanks a lot for going though the trouble to keep the Mayo dataset working! Please have a look at my review comments. They should be rather straightforward to address.
Regarding functionality, I trust that the changes you made work for you, so they're kind of tested. After all, it's in contrib.

Comment on lines 14 to 18
# define data folders
proj_folder = odl.__path__[0] + '/../../data/LDCT-and-Projection-data/' \
'L004/08-21-2018-10971/1.000000-Full dose projections-24362/'
rec_folder = odl.__path__[0] + '/../../data/LDCT-and-Projection-data/' \
'L004/08-21-2018-84608/1.000000-Full dose images-59704/'
Copy link
Member

Choose a reason for hiding this comment

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

  • I suggest to use odl.contrib.datasets.util.get_data_dir() to determine a storage location.
  • What are the reasons to change the dataset directory? It would be good to have a small comment on top that says which data it is.
  • Please use dir instead of folder. The latter is Windows lingo, and Python uses e.g. is_dir() to check if a Path object represents a directory.

Copy link
Author

Choose a reason for hiding this comment

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

The Mayo dataset cannot be downloaded directly from a url but it requires its own software. This prevents to use odl.contrib.datasets.util.get_data(filename, subset, url) for local caching. Would this work better?

Suggested change
# define data folders
proj_folder = odl.__path__[0] + '/../../data/LDCT-and-Projection-data/' \
'L004/08-21-2018-10971/1.000000-Full dose projections-24362/'
rec_folder = odl.__path__[0] + '/../../data/LDCT-and-Projection-data/' \
'L004/08-21-2018-84608/1.000000-Full dose images-59704/'
# replace with your local directory
mayo_dir = ''
# define projection and reconstruction data directories
# e.g. for patient L004 full dose CT scan:
proj_dir = os.path.join(
mayo_dir, 'L004/08-21-2018-10971/1.000000-Full dose projections-24362/')
rec_dir = os.path.join(
mayo_dir, 'L004/08-21-2018-84608/1.000000-Full dose images-59704/')

Comment on lines 22 to 23
geometry, proj_data = mayo.load_projections(proj_folder,
indices=slice(16000, 19000))
Copy link
Member

Choose a reason for hiding this comment

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

Same question as above: why change the slice?

Copy link
Author

Choose a reason for hiding this comment

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

It has been adjusted to the example considered (patient L004). In this case, the projection data counts ~32k images and the above slice choice reconstructs a central part of the volume.

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