+ All Categories
Home > Documents > Loadable Modules

Loadable Modules

Date post: 23-Feb-2016
Category:
Upload: eytan
View: 34 times
Download: 0 times
Share this document with a friend
Description:
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. - PowerPoint PPT Presentation
Popular Tags:
15
Loadable Modules Julien Finet 2012 NA-MIC All Hands Meeting
Transcript
Page 1: Loadable Modules

Loadable Modules

Julien Finet2012 NA-MIC All Hands Meeting

Page 2: Loadable Modules

Loadable modules

• Slicer– Modules

• Core• CLI• Loadable

– Colors– CropVolume– Data– Models– Tractography– Transforms– Volumes– VolumeRendering

• Scripted

Page 3: Loadable Modules

Application

GUI

MRML

Module

Module PluginqSlicerMyModule

: public QPlugin

Module GUIqSlicerMyModuleWidget

: public QWidget

Module LogicvtkSlicerMyModuleLogic

: public vtkSlicerLogic

Page 4: Loadable Modules

• Slicer/Modules/Loadable– MyModule

• Documentation• Logic• MRMLDisplayableManager• MRML• Resources• Testing• Widgets

Page 5: Loadable Modules

Module LogicvtkSlicerMyModuleLogic

create() create()

Module Widget qSlicerMyModuleWidget

Module PluginqSlicerMyModule

vtkMRMLScenevtkMRMLNodes

Module Designer UIqSlicerMyModuleWidget.ui

Page 6: Loadable Modules

Module plugin qSlicerMyModule

TitleIcon

CategoryHiddenIndex

IO

Dependencies

HelpAcknowledg

mentsContributors

Name

Page 7: Loadable Modules

Module LogicvtkSlicerModuleLogic

vtkMRMLMyNode

vtkMRMLMyDisplayable

Manager

vtkSlicerLogicHelper

Page 8: Loadable Modules

Module widgetqSlicerMyModuleWidget

IconsResources

Custom widgets

UI

IO Options widget

Page 9: Loadable Modules

Life of a module…1. Slicer start-up2. Slicer discovers MyModule

a. Resolve dependenciesb. Add module title in menuc. Create module logic

• Optionally register new nodesd. Setup module

• Optionally registerIO, displayableManager

3. Slicer loads a file (Add Data)a. Check that registered IO can readb. Display IO options within Add Data dialogc. Load file using IO

4. Create module widget on first show

Page 10: Loadable Modules

Show me some code…

• RegisterIO (Volumes)• Custom widgets (Volumes)• Module node, displayable manager

(VolumeRendering)• Logics can depend on other logics (Crop

Volume)

Page 11: Loadable Modules

button

checkbox

Module Widget

MRML Node

synchronize

Connect

QObject::connect( slider,SIGNAL(valueChanged(double)), widget, SLOT(onValueChanged(double)));

Connect

qvtkConnect(node,vtkCommand::ModifiedEvent, widget,SLOT(onNodeModified()));

Page 12: Loadable Modules

button

checkbox

Module Widget

MRML Node

5205

SIGNAL

Connect

void qSlicerModuleWidget::onValueChanged(double newValue){ node->SetValue(newValue);}

SLOT

20

Connect

Invoke Event

SLOT

void qSlicerModuleWidget::onMRMLNodeModified( vtkMRMLNode* node){ slider->setValue(node->GetValue());}

Set value

Set v

alue

Page 13: Loadable Modules

button

checkbox

Module Widget

MRML Node

5205

SIGNAL

Connect

SLOT

20

Connect

Invoke Event

SLOT

Set value

Set v

alue

Page 14: Loadable Modules

Design a module

• cd Slicer-Superbuild/Slicer-build

• ./Slicer --designer• make


Recommended