1 / 15

Loadable Modules

Loadable Modules. Julien Finet 2012 NA-MIC All Hands Meeting. Loadable modules. Slicer Modules Core CLI Loadable Colors CropVolume Data Models Tractography Transforms Volumes VolumeRendering Scripted. Application. MRML. Module. Module Plugin qSlicerMyModule : public QPlugin.

eytan
Download Presentation

Loadable Modules

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Loadable Modules Julien Finet 2012 NA-MIC All Hands Meeting

  2. Loadable modules • Slicer • Modules • Core • CLI • Loadable • Colors • CropVolume • Data • Models • Tractography • Transforms • Volumes • VolumeRendering • Scripted

  3. Application MRML Module Module Plugin qSlicerMyModule: public QPlugin Module Logic vtkSlicerMyModuleLogic: public vtkSlicerLogic GUI Module GUI qSlicerMyModuleWidget: public QWidget

  4. Slicer/Modules/Loadable • MyModule • Documentation • Logic • MRMLDisplayableManager • MRML • Resources • Testing • Widgets

  5. Module Plugin qSlicerMyModule create() create() Module Widget qSlicerMyModuleWidget Module Logic vtkSlicerMyModuleLogic Module Designer UI qSlicerMyModuleWidget.ui vtkMRMLScene vtkMRMLNodes

  6. Life of a module… • Slicer start-up • Slicer discovers MyModule • Resolve dependencies • Add module title in menu • Create module logic • Optionally register new nodes • Setup module • Optionally registerIO, displayableManager • Slicer loads a file (Add Data) • Check that registered IO can read • Display IO options within Add Data dialog • Load file using IO • Create module widget on first show

  7. Show me some code… • RegisterIO (Volumes) • Custom widgets (Volumes) • Module node, displayable manager (VolumeRendering) • Logics can depend on other logics (Crop Volume)

  8. MRML Node Connect Connect synchronize Module Widget qvtkConnect(node,vtkCommand::ModifiedEvent,widget,SLOT(onNodeModified())); QObject::connect(slider,SIGNAL(valueChanged(double)), widget, SLOT(onValueChanged(double))); button checkbox

  9. MRML Node 5 20 5 20 Invoke Event SIGNAL Connect Set value Connect Module Widget Set value SLOT SLOT void qSlicerModuleWidget::onMRMLNodeModified(vtkMRMLNode* node) { slider->setValue(node->GetValue()); } void qSlicerModuleWidget::onValueChanged(double newValue) { node->SetValue(newValue); } button checkbox

  10. MRML Node 5 20 5 20 Invoke Event SIGNAL Connect Set value Connect Module Widget Set value SLOT SLOT button checkbox

  11. Design a module • cd Slicer-Superbuild/Slicer-build • ./Slicer --designer • make

  12. Links • http://www.slicer.org/slicerWiki/index.php/Documentation/4.0/Developers/Tutorials/ModuleWriting • http://www.slicer.org/slicerWiki/index.php/Documentation/4.0/Developers/Tutorials/QtDesigner

More Related