Skip to content
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

ENH: adds hook for loading directory archetypes #1089

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pieper
Copy link
Member

@pieper pieper commented Feb 8, 2019

When a directory is added via the Add Data dialog,
it may contain a collection of files that should be
treated as a single MRML data type, such as a series
of image files that get loaded as a volume.

This change allows a qSlicerFileReader subclass to define
a method that can examine the contents of a directory and
filter out any files that should be loaded as a group. One
of these files then serves as the archetype and the io properties
can be configured such that the files are loaded correctly.

@pieper
Copy link
Member Author

pieper commented Feb 8, 2019

WIP: do not commit yet.

When a directory is added via the Add Data dialog,
it may contain a collection of files that should be
treated as a single MRML data type, such as a series
of image files that get loaded as a volume.

This change allows a qSlicerFileReader subclass to define
a method that can examine the contents of a directory and
filter out any files that should be loaded as a group.  One
of these files then serves as the archetype and the io properties
can be configured such that the files are loaded correctly.

The qSlicerVolumesReader and related classes have been updated
to use the hooks for reading multiple image files as a volume
by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant