Difference between revisions of "2007 Project Week MIT MRML Scenes for the Execution Model"
From NAMIC Wiki
Line 2: | Line 2: | ||
* MRML | * MRML | ||
+ | ** virtual method on each node GetReferencedNodes() returns a list of nodes (e.g. model node returns display node, storage node, transform node) | ||
+ | ** method in MRMLScene GetSubscene(nodeList) returns list all the nodes referenced by all the nodes in the list (recursively searches) | ||
+ | |||
+ | * CommandLineModule | ||
+ | ** need a way in XML to say that a module is 'mrml aware' -- call them mrmlCLIs | ||
+ | ** when nodes are selected as args to a mrmlCLI | ||
+ | *** need to create a subscene containing all the selected nodes and referenced nodes (use GetSubscene) | ||
+ | *** need to pass mrml ids for arguments rather than filenames | ||
+ | *** need to write the subscene to temp space, along with any volumes or models that aren't saved (needs to use the storage nodes) and pass that as argument to mrmlCLI | ||
+ | ** needs to import the resulting mrml scene written by mrmlCLI back into Slicer3's scene | ||
+ | |||
+ | == Example Scenario == | ||
+ | |||
+ | # User reads grayscale | ||
+ | # Creates labelmap with Editor or Segmenter (label volume is not yeat saved) | ||
+ | # User enters ModelMaker and selects label map as input and hits Apply | ||
+ | ## a temp mrml scene is created with | ||
+ | ### label map volume node | ||
+ | ### volume display node (ref'd by volume) | ||
+ | ### color node (ref'd by display) | ||
+ | ### possibly a transform node (ref'd by volume) | ||
+ | ### possibly more transform nodes (ref'd by transform nodes) | ||
+ | ### volume storage node (created by CommandLineModule to point to temp storage of label map) | ||
+ | ## model maker is invoked with arguments for: | ||
+ | ### the temp mrml scene | ||
+ | ### id of the input volume | ||
+ | ### parameters | ||
+ | ## model maker | ||
+ | ### reads mrml scene | ||
+ | ### pulls out needed info (e.g. label names for each model it makes) | ||
+ | ### builds the models | ||
+ | ### puts output into mrml scene that it saves out | ||
+ | ## CommandLineModule | ||
+ | ### imports mrml scene file in to current slicer scene |
Revision as of 20:53, 17 May 2007
Home < 2007 Project Week MIT MRML Scenes for the Execution ModelStrawman Plan
- MRML
- virtual method on each node GetReferencedNodes() returns a list of nodes (e.g. model node returns display node, storage node, transform node)
- method in MRMLScene GetSubscene(nodeList) returns list all the nodes referenced by all the nodes in the list (recursively searches)
- CommandLineModule
- need a way in XML to say that a module is 'mrml aware' -- call them mrmlCLIs
- when nodes are selected as args to a mrmlCLI
- need to create a subscene containing all the selected nodes and referenced nodes (use GetSubscene)
- need to pass mrml ids for arguments rather than filenames
- need to write the subscene to temp space, along with any volumes or models that aren't saved (needs to use the storage nodes) and pass that as argument to mrmlCLI
- needs to import the resulting mrml scene written by mrmlCLI back into Slicer3's scene
Example Scenario
- User reads grayscale
- Creates labelmap with Editor or Segmenter (label volume is not yeat saved)
- User enters ModelMaker and selects label map as input and hits Apply
- a temp mrml scene is created with
- label map volume node
- volume display node (ref'd by volume)
- color node (ref'd by display)
- possibly a transform node (ref'd by volume)
- possibly more transform nodes (ref'd by transform nodes)
- volume storage node (created by CommandLineModule to point to temp storage of label map)
- model maker is invoked with arguments for:
- the temp mrml scene
- id of the input volume
- parameters
- model maker
- reads mrml scene
- pulls out needed info (e.g. label names for each model it makes)
- builds the models
- puts output into mrml scene that it saves out
- CommandLineModule
- imports mrml scene file in to current slicer scene
- a temp mrml scene is created with