Documentation/4.10/Modules/SampleData

From Slicer Wiki
Revision as of 14:01, 14 March 2019 by JChris.FillionR (talk | contribs)
Jump to: navigation, search
Home < Documentation < 4.10 < Modules < SampleData


For the latest Slicer documentation, visit the read-the-docs.


Introduction and Acknowledgements

Author(s)/Contributor(s): Steve Pieper (Isomics Inc.), Jean-Christophe Fillion-Robin (Kitware), Julien Finet (Kitware), Benjamin Long (Kitware)
Acknowledgements: This work is part of the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
Contact: Steve Pieper, <email>pieper@bwh.harvard.edu</email>
Isomics, Inc.  
Kitware, Inc.  
National Alliance for Medical Image Computing (NA-MIC)  

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. Sample Data Module

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

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/slicerWiki/index.php/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