Difference between revisions of "Documentation/4.10/Modules/SampleData"
m (Text replacement - "slicerWiki/index.php" to "wiki") |
|||
(One intermediate revision by one other user not shown) | |||
Line 52: | Line 52: | ||
This module is written in python, and relies on MRML's ability to access datasets via the http protocol. | This module is written in python, and relies on MRML's ability to access datasets via the http protocol. | ||
− | Historically, the sample data have been accessed from the wiki at this url: http://www.slicer.org/ | + | Historically, the sample data have been accessed from the wiki at this url: http://www.slicer.org/wiki/SampleData |
− | Modules can register their own sample data using <t>registerCustomSampleDataSource()</ | + | Modules can register their own sample data using <t>registerCustomSampleDataSource()</tt>. Code like the following can be added to module class constructor: |
<pre> | <pre> | ||
Line 73: | Line 73: | ||
To register sample data available only when developer mode is enabled, set category using <tt>SampleData.SampleDataLogic().developmentCategoryName</tt> | To register sample data available only when developer mode is enabled, set category using <tt>SampleData.SampleDataLogic().developmentCategoryName</tt> | ||
+ | |||
+ | Other examples, see https://github.com/search?q=registerCustomSampleDataSource&type=Code | ||
Latest revision as of 17:05, 21 November 2019
Home < Documentation < 4.10 < Modules < SampleData
For the latest Slicer documentation, visit the read-the-docs. |
Introduction and Acknowledgements
| |||||||
|
Module Description
Provides an easy to download a variety of anonymized datasets (Mr, CT, ...) for learning and testing in Slicer. Because the datasets are hosted in a remote repository, a network connection is required to access them.
Use Cases
Examples:
- Use Case 1: Download an MR Volume to experimenting with the EMSegmenter.
- Use Case 2: Download a CT Volume for use with the Volume Rendering Module.
- Use Case 3: Download a DTI Volume for use with Tractography.
Tutorials
- Tutorial about loading and viewing data.
Panels and their use
This interface consists of a series of buttons for various download volumes. Status about downloads is displayed below the buttons.
Similar Modules
- The DICOM module can be used to access sample data on DICOM servers.
References
N/A
Information for Developers
This module is written in python, and relies on MRML's ability to access datasets via the http protocol.
Historically, the sample data have been accessed from the wiki at this url: http://www.slicer.org/wiki/SampleData
Modules can register their own sample data using <t>registerCustomSampleDataSource(). Code like the following can be added to module class constructor:
iconsPath = os.path.join(os.path.dirname(self.parent.path), 'Resources/Icons') import SampleData SampleData.SampleDataLogic.registerCustomSampleDataSource( category='Sequences', sampleName='CTPCardio', uris='http://slicer.kitware.com/midas3/download/bitstream/667462/CTP-cardio.seq.nrrd', fileNames='CTP-cardio.seq.nrrd', nodeNames='CTPCardio', thumbnailFileName=os.path.join(iconsPath, 'CTPCardio.png'), loadFileType='Volume Sequence' )
To register sample data available only when developer mode is enabled, set category using SampleData.SampleDataLogic().developmentCategoryName
Other examples, see https://github.com/search?q=registerCustomSampleDataSource&type=Code
Section under construction. |