User:Davisb/EMSegmentModule: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
 
(105 intermediate revisions by 2 users not shown)
Line 24: Line 24:
algorithm.  It is the user's job to specify the parameters so that the
algorithm.  It is the user's job to specify the parameters so that the
template is effective for segmenting a particular target image pair
template is effective for segmenting a particular target image pair
(T1 and T2, e.g., from a particular scanner).  Once the parameters are
(T1 and T2, for example, from a particular scanner).  Once the parameters are
specified, the target images are segmented using the EM segmentation
specified, the target images are segmented using the EM segmentation
algorithm.  If the results are satisfactory, the template is saved and
algorithm.  If the results are satisfactory, the template is saved and
Line 38: Line 38:
#Anatomical Structure Hierarchy: Define a hierarchy of anatomical structures.
#Anatomical Structure Hierarchy: Define a hierarchy of anatomical structures.
#Spatial Priors: Assign uniform priors or probability images for each leaf node of the hierarchy.
#Spatial Priors: Assign uniform priors or probability images for each leaf node of the hierarchy.
#Intensity Images: Assign target intensity images.
#Intensity Images: Assign atlas and target intensity images.
#Intensity Distributions: Define an intensity distribution for each leaf node of the hierarchy.
#Intensity Distributions: Define an intensity distribution for each leaf node of the hierarchy.
#Node-based Parameters: Specify node-based segmentation parameters.
#Node-based Parameters: Specify node-based segmentation parameters.
Line 48: Line 48:


The user will (1) load the template, (2) load a new, unsegmented
The user will (1) load the template, (2) load a new, unsegmented
target image pair (T1 and T2), (3) tweak parameters from the template
set of input images, (3) tweak parameters from the template
if desired, and (4) start the segmentation process.  If the input
if desired, and (4) start the segmentation process.  If the input
images are not aligned, they will be aligned prior to the segmentation
images are not aligned, they will be aligned prior to the segmentation
Line 84: Line 84:
For each leaf node specify a spatial prior by one of:
For each leaf node specify a spatial prior by one of:
*Specify a uniform prior (double in [0,1])
*Specify a uniform prior (double in [0,1])
*Specify a prior probability map (volume)
*Specify a prior probability map (volume node reference)
*Number of Training Samples for prior probability map ---int
*Number of training samples for prior probability map (int)


=== Step 3: Intensity Images ===
=== Step 3: Intensity Images ===


*Specify atlas T1 and T2 volumes
*Specify atlas intensity input volumes
*Specify target T1 and T2 volumes
*Specify target input volumes
*Should the target images be aligned prior to segmentation?  Specify with a check-box.


=== Step 4: Intensity Distributions===
=== Step 4: Intensity Distributions===


For each leaf node specify mean and covariance of bivariate Gaussian distribution:
For each leaf node specify mean and covariance of multivariate Gaussian distribution:
*parameters may be entered and edited manually
*parameters may be entered and edited manually
*parameters can be learned by clicking on a representative sample of voxels in the target intensity volumes (~8 clicks)
*parameters can be learned by clicking on a representative sample of voxels in the target intensity volumes (~8 clicks)
**the target images must be aligned together for this method to make sense
**the user may erase a particular sample or all samples
**the user may erase a particular sample or all samples
*A display will be available to visualize the intensity distributions
*A display will be available to visualize the intensity distributions
**plot of distributions for T1 and T2 intensities separately (marginal distributions, intensity vs. probability)
**plot of distributions for input channels separately (marginal distributions, intensity vs. probability)
**2D image visualization of probabilities for T1xT2 intensity combinations (T1 intensity vs. T2 intensity)
**2D image visualization of probabilities for input1xinput2 intensity combinations (input1 intensity vs. input2 intensity)
***saturation is proportional to probability
***saturation is proportional to probability
**In all plots, color is based on tissue type (color selected for leaf node in tree)
**In all plots, color is based on tissue type (color selected for leaf node in tree)
**The user can choose which two input channels are displayed
**The user can toggle the display of each tissue type on and off
**The user can toggle the display of each tissue type on and off
**When the user mouses over the MR image, the intensity under the mouse is plotted on each graph
**When the user mouses over the MR image, the intensity under the mouse is plotted on each graph
Line 193: Line 194:
*joint registration & segmentation
*joint registration & segmentation


Choose interpolation type from pull down list
Choose interpolation type from pull down list:
*Linear
*Cubic
*Nearest-neighbor


Alignment of input channels on/off
Alignment of input channels on/off <u>(shouldn't this should occur before intensity sampling?---bcd)</u>


=== Step 8: Segmentation ===
=== Step 8: Segmentation ===
Line 221: Line 225:
associate image volumes with volume display parameters in Slicer3.
associate image volumes with volume display parameters in Slicer3.


The following graph shows dependency information for all of the node
The following graph shows dependency information for all of the nodeem
types proposed for this file format.  An arrow pointing from node A to
types proposed for this file format.  An arrow pointing from node A to
node B indicates that (1) the XML tag for each node of type A contains
node B indicates that (1) the XML tag for each node of type A contains
a reference to the ID of a node of type B, and (2) the MRML node class
a reference to the ID of a node of type B, and (2) the MRML node class
representing an A node contains a pointer to a MRML B node class.
representing an A node contains a pointer to a MRML B node class.  Note that parent nodes in the anatomical structure hierarchy are a special case: they do not contain references to their child nodes in the XML tags. However, they do contain pointers to their child nodes in their MRML classes.
Also, the prefix '''EMS''' in the graph will be expanded to '''EMSegment'''.


The anatomical structure hierarchy is added for clarity sake.  Note
====Template Builder (A)====
that not all parameter nodes refer to the same volume node, the point
<graphviz>
is to show that parameter nodes point to some volume node.  Also note
digraph g {
that parent nodes in the anatomical structure hierarchy are a special
graph [
case: they do not contain references to their child nodes in the XML tags.
rankdir = "LR"
However, they do contain pointers to their child nodes in their MRML
];
classes.
node [
fontsize = "10"
shape = "record"
];
edge [
color=red
];


Finally, nodes related to the EMSegment module will have EMSegment
#nodes
prepended to the tag name in the graph.
"TemplateBuilder" [label = "<f0>TemplateBuilder"]
"Results" [label = "<f0>Results"]
"Template" [label = "<f0>Template"]
"Tree" [label = "<f0>Tree"]
"GlobalParameters" [label = "<f0>GlobalParameters"]
"Atlas" [label = "<f0>Atlas"]
"Target" [label = "<f0>Target"]
"Volume" [label = "<f0>Volume"]


#edges
"TemplateBuilder":f0 -> "Template":f0
"TemplateBuilder":f0 -> "Results":f0
"Template":f0 -> "Tree":f0
"Template":f0 -> "GlobalParameters":f0
"Tree":f0 -> "GlobalParameters":f0
"GlobalParameters":f0 -> "Atlas":f0
"GlobalParameters":f0 -> "Target":f0
"Atlas":f0 -> "Volume":f0
"Target":f0 -> "Volume":f0
}
</graphviz>
====Template Applyer====
<graphviz>
<graphviz>
digraph g {
digraph g {
graph [
graph [
#rankdir = "LR"
rankdir = "LR"
];
node [
fontsize = "10"
shape = "record"
];
edge [
color=red
];
 
#nodes
"TemplateApplyer" [label = "<f0>TemplateApplyer"]
"Results" [label = "<f0>Results"]
"Template" [label = "<f0>Template"]
"TargetInput" [label = "<f0>TargetInput"]
"AtlasInput" [label = "<f0>AtlasInput"]
 
#edges
"TemplateApplyer":f0 -> "Template":f0
"TemplateApplyer":f0 -> "Results":f0
"TemplateApplyer":f0 -> "AtlasInput":f0
"TemplateApplyer":f0 -> "TargetInput":f0
 
"AtlasInput":f0 -> "Volume":f0
"TargetInput":f0 -> "Volume":f0
 
}
</graphviz>
 
====Template Applyer Expanded====
<graphviz>
digraph g {
graph [
rankdir = "LR"
];
node [
fontsize = "10"
shape = "record"
];
edge [
color=red
];
 
#nodes
"TemplateApplyer" [label = "<f0>TemplateApplyer"]
"Results" [label = "<f0>Results"]
"Template" [label = "<f0>Template"]
"Tree" [label = "<f0>Tree"]
"GlobalParameters" [label = "<f0>GlobalParameters"]
"Atlas" [label = "<f0>Atlas"]
"Target" [label = "<f0>Target"]
"Volume" [label = "<f0>Volume"]
"TargetInput" [label = "<f0>TargetInput"]
"AtlasInput" [label = "<f0>AtlasInput"]
 
#edges
"TemplateApplyer":f0 -> "Template":f0
"TemplateApplyer":f0 -> "Results":f0
"TemplateApplyer":f0 -> "AtlasInput":f0
"TemplateApplyer":f0 -> "TargetInput":f0
 
"Template":f0 -> "Tree":f0
"Template":f0 -> "GlobalParameters":f0
"Tree":f0 -> "GlobalParameters":f0
 
"GlobalParameters":f0 -> "Atlas":f0
"GlobalParameters":f0 -> "Target":f0
 
"AtlasInput":f0 -> "Volume":f0
"TargetInput":f0 -> "Volume":f0
 
"Atlas":f0 -> "Volume":f0
"Target":f0 -> "Volume":f0
}
</graphviz>
 
====Template Builder (B)====
<graphviz>
digraph g {
graph [
rankdir = "LR"
];
node [
fontsize = "10"
shape = "record"
];
edge [
color=red
];
 
#nodes
"TemplateBuilder" [label = "<f0>TemplateBuilder"]
"TemplateApplyer" [label = "<f0>TemplateApplyer"]
"Results" [label = "<f0>Results"]
"Template" [label = "<f0>Template"]
"TargetInput" [label = "<f0>TargetInput"]
"AtlasInput" [label = "<f0>AtlasInput"]
 
#edges
"TemplateBuilder":f0 -> "TemplateApplyer":f0
"TemplateBuilder":f0 -> "Template":f0
"Template":f0 -> "AtlasInput":f0
"Template":f0 -> "TargetInput":f0
"TemplateApplyer":f0 -> "Template":f0
"TemplateApplyer":f0 -> "Results":f0
"TemplateApplyer":f0 -> "AtlasInput":f0
"TemplateApplyer":f0 -> "TargetInput":f0
 
"AtlasInput":f0 -> "Volume":f0
"TargetInput":f0 -> "Volume":f0
 
}
</graphviz>
 
 
 
====g5====
<graphviz>
digraph g {
graph [
rankdir = "LR"
];
];
node [
node [
Line 254: Line 409:
# nodes
# nodes
#
#
# volume related
"emsResults" [label = "<f0>EMS"]
"emsInput" [label = "<f0>EMSInput"]
"volume" [label = "<f0>Volume"]
"volume" [label = "<f0>Volume"]
"volumeStorage" [label = "<f0>VolumeArchetypeStorage"]
"volumeStorage" [label = "<f0>VolumeArchetypeStorage"]
"volumeDisplay" [label = "<f0>VolumeDisplay"]
"volumeDisplay" [label = "<f0>VolumeDisplay"]
"emsAtlas" [label = "<f0>EMSAtlas"]


"template" [label = "<f0>Template"]
# EMS: global
"template" [label = "<f0>EMSTemplate"]
"globalDisplayParameters" [label = "<f0>EMSDisplay"]
"globalAlgorithmParameters" [label = "<f0>EMSParameters"]


"globalDisplayParameters" [label = "<f0>GlobalDisplayParameters"]
# EMS: tree structure
"graphDisplay" [label = "<f0>GraphDisplay"]
"hierarchyNode" [label = "<f0>EMSTree"]
#"hierarchyNode:root" [label = "<f0>EMSTree| <f1>Root"]
#"hierarchyNode:leaf1" [label = "<f0>EMSTree| <f1>Background"]
#"hierarchyNode:sc1" [label = "<f0>EMSTree| <f1>ICC"]
#"hierarchyNode:leaf2" [label = "<f0>EMSTree| <f1>White Matter"]
#"hierarchyNode:leaf4" [label = "<f0>EMSTree| <f1>CSF"]


"globalAlgorithmParameters" [label = "<f0>GlobalAlgorithmParameters"]
# EMS: basic node-based parameters
"genericParams" [label = "<f0>EMSTreeParametersNode"]
"superclassParams" [label = "<f0>EMSTreeParametersParent"]
"leafclassParams" [label = "<f0>EMSTreeParametersLeaf"]
"nodeDisplayParams" [label = "<f0>EMSTreeDisplayNode"]


"hierarchyNode:root" [label = "<f0>HierarchyNode| <f1>Root"]
# EMS: other node-based parameters
"hierarchyNode:leaf1" [label = "<f0>HierarchyNode| <f1>Background"]
"nodeRegistrationParams" [label = "<f0>EMSTreeParametersNodeRegistration"]
"hierarchyNode:sc1" [label = "<f0>HierarchyNode| <f1>ICC"]
"parentRegistrationParams" [label = "<f0>EMSTreeParametersParentRegistration"]
"hierarchyNode:leaf2" [label = "<f0>HierarchyNode| <f1>White Matter"]
"leafRegistrationParams" [label = "<f0>EMSTreeParametersLeafRegistration"]
"hierarchyNode:leaf4" [label = "<f0>HierarchyNode| <f1>CSF"]


"superclassParams" [label = "<f0>SuperClassParameters"]
"nodePCAParams" [label = "<f0>EMSTreeParametersNodePCA"]
"leafclassParams" [label = "<f0>LeafClassParameters"]
"parentPCAParams" [label = "<f0>EMSTreeParametersParentPCA"]
"nodeDisplayParams" [label = "<f0>ClassDisplayParameters"]
"leafPCAParams" [label = "<f0>EMSTreeParametersLeafPCA"]


"matrix" [label = "<f0>CIM"]
"nodeInhomogeneityParams"  [label = "<f0>EMSTreeParametersNodeInhomogeneity"]
"parentInhomogeneityParams"  [label = "<f0>EMSTreeParametersParentInhomogeneity"]
"leafInhomogeneityParams"  [label = "<f0>EMSTreeParametersLeafInhomogeneity"]
 
# EMS: misc
"matrix" [label = "<f0>EMSCIM"]


#
#
# connections
# connections
#
#
"emsResults":f0 -> "emsInput":f0
"emsResults":f0 -> "template":f0
"emsResults":f0 -> "volume":f0
"emsInput":f0 -> "volume":f0
"template":f0 -> "globalDisplayParameters":f0
"template":f0 -> "globalDisplayParameters":f0
"template":f0 -> "globalAlgorithmParameters":f0
"template":f0 -> "hierarchyNode":f0
"template":f0 -> "emsAtlas":f0
 
"globalDisplayParameters":f0 -> "globalAlgorithmParameters":f0


"globalDisplayParameters":f0 -> "graphDisplay":f0
"emsAtlas":f0 -> "volume":f0


"globalAlgorithmParameters":f0 -> "volume":f0
"volume":f0 -> "volumeStorage":f0
"volume":f0 -> "volumeStorage":f0
"volume":f0 -> "volumeDisplay":f0
"volume":f0 -> "volumeDisplay":f0


"template":f0 -> "hierarchyNode:root":f0
"hierarchyNode:root":f0 -> "hierarchyNode:leaf1":f0
"hierarchyNode:root":f0 -> "hierarchyNode:sc1":f0


"hierarchyNode:leaf1":f0 -> "hierarchyNode:root":f0
"hierarchyNode":f0 -> "genericParams":f0
"hierarchyNode:sc1":f0 -> "hierarchyNode:root":f0


"hierarchyNode:sc1":f0 -> "hierarchyNode:leaf2":f0
"hierarchyNode":f0 -> "hierarchyNode":f0
"hierarchyNode:sc1":f0 -> "hierarchyNode:leaf4":f0
"hierarchyNode":f0 -> "nodeDisplayParams":f0


"hierarchyNode:leaf2":f0 -> "hierarchyNode:sc1":f0
#"hierarchyNode":f0 -> "superclassParams":f0
"hierarchyNode:leaf4":f0 -> "hierarchyNode:sc1":f0
#"hierarchyNode":f0 -> "leafclassParams":f0


"hierarchyNode:sc1":f0 -> "nodeDisplayParams":f0
"genericParams":f0 -> "superclassParams":f0 
"hierarchyNode:sc1":f0 -> "superclassParams":f0
"genericParams":f0 -> "leafclassParams":f0
"genericParams":f0 -> "nodePCAParams":f0
"genericParams":f0 -> "nodeRegistrationParams":f0
"genericParams":f0 -> "nodeInhomogeneityParams":f0
"genericParams":f0 -> "globalAlgorithmParameters":f0


"superclassParams":f0 -> "parentRegistrationParams":f0
"superclassParams":f0 -> "parentPCAParams":f0
"superclassParams":f0 -> "parentInhomogeneityParams":f0
"superclassParams":f0 -> "matrix":f0
"superclassParams":f0 -> "matrix":f0
"superclassParams":f0 -> "volume":f0
"superclassParams":f0 -> "volume":f0


"hierarchyNode:leaf4":f0 -> "nodeDisplayParams":f0
"hierarchyNode:leaf4":f0 -> "leafclassParams":f0
"leafclassParams":f0 -> "volume":f0
"leafclassParams":f0 -> "volume":f0
"leafclassParams":f0 -> "leafPCAParams":f0
"leafclassParams":f0 -> "leafRegistrationParams":f0
"leafclassParams":f0 -> "leafInhomogeneityParams":f0


"leafPCAParams":f0 -> "volume":f0
"parentInhomogeneityParams":f0 -> "volume":f0
}
}
</graphviz>
</graphviz>
The following list contains all possible template parameters; not all
parameters will be tunable by the user during the template building
process.


===Example Template File===
===Example Template File===
Line 331: Line 519:
<VolumeDisplay id name>
<VolumeDisplay id name>
<Volume id name storageNodeRef displayNodeRef>
<Volume id name storageNodeRef displayNodeRef>
[...]
[more Volume nodes...]
<VolumeArchetypeStorage id name>
<VolumeDisplay id name>
<Volume id name storageNodeRef displayNodeRef>


#
#
# template node
# Main EMSegment node
#
#
<EMSegmentTemplate id name globalDisplayNodeRef globalParametersNodeRef
<EMSegment
                  hierarchyNodeRef>
  id name
  globalDisplayNodeRef
  globalParametersNodeRef
  treeNodeRef>
 
#
#
# global algorithm parameters
# Global display parameters
#
#
<EMSegmentGlobalAlgorithmParameters id name atlasT1NodeRef atlasT2NodeRef
<EMSegmentGlobalDisplay
                                    [params...]>
  id name
  [graph display parameters...]
  [toggle display of advanced parameters...]>


#
#
# global display parameters
# Global algorithm parameters
#
#
<EMSegmentGlobalDisplayParameters id name graphT1NodeRef graphT2NodeRef
<EMSegmentGlobalParameters
                                  [params...]>
  id name
<EMSegmentGraphDisplayParameters id name [params...]>
  [list of atlas input volume references...]
<EMSegmentGraphDisplayParameters id name [params...]>
  [global algorithm parameters...]>


#
#
# the hierarchy of anatomical structures is described here
# Hierarchy of anatomical structures
#
#
<EMSegmentHierarchyNode id name parentNodeRef superClassParametersNodeRef
<EMSegmentTree
                        leafClassParametersNodeRef displayNodeRef>
  id name
[...]
  parentNodeRef
  parametersNodeRef
  parametersLeafNodeRef
  parametersParentNodeRef
  displayNodeRef>
[more Tree nodes...]
 
  pcaParametersLeafNodeRef
  inhomogeneityParametersParentNodeRef


#
#
# node-specific parameters
# node-specific parameters
#
#
<EMSegmentSuperClassParameters id name cimNorthNodeRef [...] [params...]>
<EMSegmentTreeParameters
[...]
  id name
  parametersRegistrationNodeRef
  [generic node-based algorithm parameters...]>
[more TreeParameters nodes...]
 
<EMSegmentTreeParametersParent
  id name
  parametersParentRegistrationNodeRef
  parametersParentPCANodeRef
  parametersParaentInhomogeneityNodeRef
  [class interactions matrix node refs...]
  [volume refs (not typically used)...]
  [parent-node specific algorithm parameters...]>
[more TreeParametersParent nodes...]
 
<EMSegmentTreeParametersLeaf
  id name
  parametersLeafPCANodeRef
  localPriorNodeRef
  [leaf-node specific algorithm parameters...]>
[more TreeParametersLeaf nodes...]
 
<EMSegmentTreeDisplay
  id name
  [node-specific display parametters...]>
[more TreeDisplay nodes...]
 
<EMSegmentCIM
  id name
  matrix>
[more CIM nodes...]
 
<EMSegmentTreeParametersNodeRegistration
  id name
  [generic node-based registration parmeters...]>
[more TreeParametersNodeRegistration nodes...]


<EMSegmentLeafClassParameters id name localPriorNodeRef [params...]>
<EMSegmentTreeParametersParentRegistration
[...]
  id name
  [parent-node specific registration parmeters...]>
[more TreeParametersParentRegistration nodes...]


<EMSegmentClassDisplayParameters id name [params...]>
<EMSegmentTreeParametersParentPCA
[...]
  id name
  [parent-node specific PCA parmeters...]>
[more TreeParametersParentPCA nodes...]


#
<EMSegmentTreeParametersLeafPCA
# class interaction matrices
  id name
#
  [leaf-node specific PCA parmeters...]>
<EMSegmentCIM id name matrix>
[more TreeParametersLeafPCA nodes...]
[...]
 
<EMSegmentTreeParametersParentInhomogeneity
  id name
  [parent-node specific inhomogeneity parmeters...]>
[more TreeParametersParentInhomogeneity nodes...]
</pre>
</pre>


===Detailed Description===
===Detailed Description===
The following list contains all possible template parameters; not all
parameters will be tunable by the user during the template building
process. Currently, the variables in itatlic have low priority.


====Atlas Data====
====Atlas Data====
*Atlas intensity images (T1 and T2) that are pre-aligned; specified via MRML Volume nodes.
*Atlas intensity images; specified via MRML Volume nodes.
*Spatial prior probability images that are aligned with the atlas intensity images; specified via MRML Volume nodes.
*Spatial prior probability images that are aligned with the atlas intensity images; specified via MRML Volume nodes.


====EM Segment Template====
====Main EM Segment Template Node====
The template containes references to global algorithm and display parameters as well as the class hierarchy.
The template contains references to global algorithm and display parameters as well as the class hierarchy.
<EMSegmentTemplate id name globalDisplayNodeRef globalParametersNodeRef hierarchyNodeRef>
 
*MRML node attributes
<pre>
**Name
<EMSegment
**ID
  id name
  globalDisplayNodeRef
  globalParametersNodeRef
  atlasNodeRef
  targetNodeRef
  treeNodeRef>
</pre>


*Core attributes
*Core attributes
**GlobalDisplayNodeRef--char*
**GlobalDisplayNodeRef--char*
**GlobalParametersNodeRef--char*
**GlobalParametersNodeRef--char*
**HierarchyNodeRef--char*
**AtlasNodeRef--char*
**(I expect this to grow as the GUI develops)
**TargetNodeRef--char*
**TreeNodeRef--char*


====Global EM Algorithm Parameters====
====Global EM Algorithm Parameters====
Global EM algorithm parameters are stored in a single node.
Global EM algorithm parameters are stored in a single node.
<EMSegmentGlobalParameters id name atlasT1NodeRef atlasT2NodeRef [params...]>
 
<pre>
<EMSegmentGlobalParameters
  id name
  [list of atlas input volume references...]
  [global algorithm parameters...]>
</pre>
 
*MRML node attributes
*MRML node attributes
**Name
**Name
Line 409: Line 669:
*Core attributes
*Core attributes
**Alpha--double (should this be node specific?)
**Alpha--double (should this be node specific?)
**AlreadyRead--int (internal state variable that should not be included?)
**''AlreadyRead--int (internal state variable that should not be included?)''
**DisableMultiThreading--int
**NumberOfInputChannels--int--MaxInputChannelDef
**NumberOfInputChannels--int--MaxInputChannelDef
**NumberOfTrainingSamples--int
**NumberOfTrainingSamples--int (Kilian : Should be moved to atlas node; Brad: moved)
**SegmentationBoundaryMax--int[3]
**SegmentationBoundaryMax--int[3]
**SegmentationBoundaryMin--int[3]
**SegmentationBoundaryMin--int[3]
**SmoothingKernelSigma--double--SmSigma (should this be node specific?)
**SmoothingKernelWidth--int--SmWidth (should this be node specific?)
**WorkingDirectory--char*--PrintDir
**WorkingDirectory--char*--PrintDir
**DisableMultiThreading--int


*Additional core attributes (added by Brad and eddited by Kilian)
*Additional core attributes (added by Brad and edited by Kilian)
**List of Input channels (Kilian: How do we define this in new structure ???)
**List of Input channels  
**AlignInput - int (Input channels are aligned to each other)
**AlignInput - int (nonzero=>target input channels will be aligned to each other prior to segmentation???)
**RegistratonType--int (none, Joint, Sequential)  
**RegistratonType--int (none, Joint, Sequential)  
***The following inputs are only relevant if RegistratonType != none  
***The following inputs are only relevant if RegistratonType != none  
Line 431: Line 689:
****RegistratonNonRigid--int (AG,BSpline, ..., disabled)
****RegistratonNonRigid--int (AG,BSpline, ..., disabled)


====Global EM Display Parameters====
====Global EM Display Parameters [not used]====
Global EM display parameters are stored in a single node.
Global EM display parameters are stored in a single node.
<EMSegmentGlobalDisplayParameters id name graphInput1NodeRef graphInput2NodeRef [params...]>
 
<pre>
<EMSegmentGlobalDisplay
  id name
  [graph display parameters...]
  [toggle display of advanced parameters...]>
</pre>
 
*MRML node attributes
*MRML node attributes
**Name
**Name
Line 439: Line 704:


*Core attributes
*Core attributes
**GraphDisplayInput1NodeRef--char*
**(Graph display parameters...)
**GraphDisplayInput2NodeRef--char*
**(I expect this to grow as the GUI develops)
**(I expect this to grow as the GUI develops)


Line 449: Line 713:


<pre>
<pre>
<EMSegmentTissueHierarchy id name parentNodeRef superClassParametersNodeRef
<EMSegmentTree
                          leafClassParametersNodeRef disiplayParametersNodeRef>
  id name
  parentNodeRef
  parametersNodeRef
  parametersLeafNodeRef
  parametersParentNodeRef
  displayNodeRef>
</pre>
</pre>
*MRML node attributes
*MRML node attributes
Line 457: Line 726:


*Core attributes
*Core attributes
**DisplayNodeRef--char* (for example color in graph)
**ParametersLeafNodeRef--char* (leaf-node specific algorithm parameters)
**ParametersNodeRef--char* (generic node-based algorithm parameters)
**ParametersParentNodeRef--char* (parent-node specific algorithm parameters)
**ParentNodeRef--char*--null in case of root node
**ParentNodeRef--char*--null in case of root node
**DisplayParametersNodeRef--char* (for example color in graph)
**SuperClassParametersNodeRef--char*
**LeafClassParametersNodeRef--char*


====Node-based Display Parameters====
====Node-based Display Parameters [moved to tree node]====
<EMSegmentClassDisplayParameters id name [params...]>
 
<pre>
<EMSegmentTreeDisplay
  id name
  [node-specific display parameters...]>
</pre>
 
*MRML node attributes
*MRML node attributes
**Name
**Name
Line 470: Line 746:
*Core attributes
*Core attributes
**Color--char*--color associated with this anatomical structure
**Color--char*--color associated with this anatomical structure
**I expect that more will be added here as the GUI develops
**(I expect that more will be added here as the GUI develops)


====Generic Node-based EM Algorithm Parameters====
====Generic Node-based EM Algorithm Parameters====
There is no MRML node for generic node-based algorithm parameters;
These attributes are applicable to both super-class and
rather, these attributes are present in both super-class and
leaf-class MRML nodes.
leaf-class MRML nodes.


<pre>
<EMSegmentTreeParameters
  id name
  parametersRegistrationNodeRef
  [generic node-based algorithm parameters...]>
</pre>
*MRML node attributes
*MRML node attributes
**Name
**Name
Line 483: Line 764:
*Core attributes
*Core attributes
**InputChannelWeights--char*
**InputChannelWeights--char*
**LocalPriorVolumeID--char*--LocalPriorName
**LocalPriorNodeRef--char*--LocalPriorName
**LocalPriorWeight--double
**LocalPriorWeight--double
**PrintWeights--int
**PrintWeights--int
**ClassProbability--double (need more descriptive name)
**ClassProbability--double (need more descriptive name)
**ParemetersRegistrationNodeRef--char*


*Experimental attributes
*Experimental attributes
**ExcludeFromIncompleteEStep--int--ExcludeFromIncompleteEStepFlag
**ExcludeFromIncompleteEStep--int--ExcludeFromIncompleteEStepFlag
**PrintRegistrationParameters--int
**PrintRegistrationSimilarityMeasure--int
**EmployClassSpecificRegistration--int--RegistrationClassSpecificRegistrationFl\ag
**RegistrationCovariance--double[9]
**RegistrationRotation--double[3]
**RegistrationScale--double[3]
**RegistrationTranslation--double[3]


====SuperClass-Specific EM Algorithm Parameters====
====Parent-node Specific EM Algorithm Parameters====
SuperClass algorithm parameters are stored in a MRML node. Generic
Parent-node specific algorithm parameters are stored in a MRML node.
node-based attributes are included in this node.
 
<pre>
<EMSegmentTreeParametersParent
  id name
  parametersParentRegistrationNodeRef
  parametersParentPCANodeRef
  parametersParentInhomogeneityNodeRef
  [class interactions matrix node refs...]
  [volume refs (not typically used)...]
  [parent-node specific algorithm parameters...]>
</pre>


<EMSegmentSuperClassAlgorithmParameters id name [refs to matrix nodes] [params...]>


*MRML node attributes
*MRML node attributes
Line 509: Line 793:


*Core attributes
*Core attributes
**InitialBiasFieldPrefix--char* (change to mrml node ID? is this node specific or a global parameter?)
**ParametersParentRegistrationNodeRef [not implemented]--char*
**ParametersParentPCANodeRef [not implemented]--char*
**NumClasses--int
**NumClasses--int
**PredefinedLabelMapPrefix--char* (change to mrml node ID?)
**PredefinedLabelMapPrefix [not implemented]--char* (change to mrml node ID? yes)
**PrintBias--int
**PrintFrequency--int
**PrintFrequency--int
**PrintLabelMap--int
**PrintLabelMap--int
Line 523: Line 807:


*Aditional core attributes (added by Brad)
*Aditional core attributes (added by Brad)
**CIMMatrixNorthNodeRef--char*
**CIMMatrixNorthNodeRef [not implemented]--char*
**CIMMatrixSouthNodeRef--char*
**CIMMatrixSouthNodeRef [not implemented]--char*
**CIMMatrixEastNodeRef--char*
**CIMMatrixEastNodeRef [not implemented]--char*
**CIMMatrixWestNodeRef--char*
**CIMMatrixWestNodeRef [not implemented]--char*
**CIMMatrixUpNodeRef--char*
**CIMMatrixUpNodeRef [not implemented]--char*
**CIMMatrixDownNodeRef--char*
**CIMMatrixDownNodeRef [not implemented]--char*


*Experimental attributes
*Experimental attributes
**GenerateBackgroundProbability--int
**GenerateBackgroundProbability--int
**ParameterInitSubClass--int
**ParameterInitSubClass [not implemented]--int
**ParameterSaveToFile--int
**ParameterSaveToFile [not implemented]--int
**ParameterSetFromFile--int
**ParameterSetFromFile [not implemented]--int
**PCAShapeModelType--int
**PredefinedLabelID [not implemented]--int (how does this differ from prefix above? - this assigns the class with a certain internal id specified by the user. In the prefix above we would assign the prefix of the volume)
**PredefinedLabelID--int (how does this differ from prefix above?)
**PrintEMLabelMapConvergence--int
**PrintEMLabelMapConvergence--int
**PrintEMWeightsConvergence--int
**PrintEMWeightsConvergence--int
**PrintMFALabelMapConvergence--int
**PrintMFALabelMapConvergence--int
**PrintMFAWeightsConvergence--int
**PrintMFAWeightsConvergence--int
**PrintShapeSimilarityMeasure--int
**RegistrationIndependentSubclassFlag--int (need different name?)
**RegistrationType--int
**StopBiasCalculation--int


====LeafClass-Specific EM Algorithm Parameters====
====Leaf-node specific EM Algorithm Parameters====
LeafClass algorithm parameters are stored in a MRML node.  Generic
Leaf-node specific algorithm parameters are stored in a MRML node.
node-based attributes are included in this node.


<EMSegmentLeafClassAlgorithmParameters id name [refs to prior volumes] [params...]>
<pre>
<EMSegmentTreeParametersLeaf
  id name
  parametersLeafPCANodeRef
  localPriorNodeRef
  [leaf-node specific algorithm parameters...]>
</pre>


*MRML node attributes
*MRML node attributes
Line 557: Line 841:


*Core attributes
*Core attributes
**ParametersLeafPCANodeRef [not implemented]--char*
**Label--int
**Label--int
**LocalPriorWeight--double
**LocalPriorWeight--double
Line 562: Line 847:
**LogMean--char*
**LogMean--char*
**PrintQuality--int
**PrintQuality--int
**ReferenceStandardFilename--char* (change to mrml node ID?)
**ReferenceStandardFilename [not implemented]--char* (change to mrml node ID? yes again this is case specific - should be defined through through target input node)


*Experimental attributes
*Experimental attributes
**PCALogisticBoundary--double
**''SamplingLogMean--char* (REMOVE)''
**PCALogisticMax--double
**''SamplingLogCovaraince--char* (REMOVE)''
**PCALogisticMin--double
**PCALogisticSlope--double
**PCAMeanName--char* (a filename?)
**PrintPCA--int
**SamplingLogMean--char*
**SamplingLogCovaraince--char*
 
====Graph Display Parameters====
Graph display parameters affect the display of the intensity
distribution graphs.
 
<EMSegmenterGraphDisplay id name [params...]>
 
*MRML node attributes
**Name
**ID
 
*Core attributes
**MinimumIntensityValue--int
**MaximumIntensityValue--int
**Scale--int (need more specific name)


====Class Interaction Matrix====
====Class Interaction Matrix [not implemented]====
Six class interaction matrices (CIMs) are included for each parent
Six class interaction matrices (CIMs) are included for each parent
node in the template. These matrices are named North, South, East,
node in the template. These matrices are named North, South, East,
Line 605: Line 869:
*Core attributes
*Core attributes
**Matrix--char*
**Matrix--char*
====Generic node-based registration parameters [not implemented]====
<pre>
<EMSegmentTreeParametersNodeRegistration
  id name
  [generic node-based registration parmeters...]>
</pre>
*MRML node attributes
**Name
**ID
*Core attributes
**PrintRegistrationParameters--int
**PrintRegistrationSimilarityMeasure--int
**EmployClassSpecificRegistration--int--RegistrationClassSpecificRegistrationFlag
**RegistrationCovariance--double[9]
**''RegistrationRotation--double[3]''
**''RegistrationScale--double[3]''
**''RegistrationTranslation--double[3]''
====Parent-node specific registration parameters [not implemented]====
<pre>
<EMSegmentTreeParametersParentRegistration
  id name
  [parent-node specific registration parmeters...]>
</pre>
*MRML node attributes
**Name
**ID
*Core attributes
**RegistrationIndependentSubclassFlag--int (need different name? )
**RegistrationType--int
====Parent-node specific PCA parameters [not implemented]====
<pre>
<EMSegmentTreeParametersParentPCA
  id name
  [parent-node specific PCA parmeters...]>
</pre>
*MRML node attributes
**Name
**ID
*Core attributes
**PCAShapeModelType--int (change to hapeModelType)
**PCAPrintShapeSimilarityMeasure--int (change to PrintShapeSimilarityMeasure)
====Leaf-node specific PCA parameters [not implemented]====
<pre>
<EMSegmentTreeParametersLeafPCA
  id name
  [leaf-node specific PCA parmeters...]>
</pre>
*MRML node attributes
**Name
**ID
*Core attributes
**PCALogisticBoundary--double
**PCALogisticMax--double
**PCALogisticMin--double
**PCALogisticSlope--double
**PCAMeanName--char* (a filename? change to atlas id)
**PrintPCA--int
====Parent-node specific Inhomogeneity parameters [currently implemented in parent node]====
<pre>
<EMSegmentTreeParametersParentInhomogeneiry
  id name
  [parent-node specific inhomegeneity parmeters...]>
</pre>
*MRML node attributes
**Name
**ID
*Core attributes
**PrintBias--int
**StopBiasCalculation--int
**SmoothingKernelSigma--double--SmSigma
**SmoothingKernelWidth--int--SmWidth
**InhomogeneityNodeRef--char* [not implemented] (change to mrml node ID? This is actually case specific - yes it makes sense to change it to id  should be defined by atlas id !)

Latest revision as of 14:20, 11 December 2006

Project Summary

The goal of this project is to implement a Slicer3 module which creates templates that will be used in segmentation tasks. A template is composed of atlas data and a non-trivial collection of parameters for the EM segmentation algorithm. The template, which is written as an XML file, can be used later to segment new images. The target audience for this module is someone familiar with brain atlases and tissue labels, not a computer scientist.

This module will be demonstrated at the NAMIC All-Hands meeting in January 2007.

Contacts

  • MIT: Polina Golland, Kilian Pohl (pohl@csail.mit.edu)
  • Kitware: Brad Davis (brad.davis@kitware.com), Will Schroeder (will.schroeder@kitware.com)

General Module Description

The purpose of the module is to build a template that can be used later to segment new images. The template is composed of atlas data and a non-trivial collection of parameters for the EM segmentation algorithm. It is the user's job to specify the parameters so that the template is effective for segmenting a particular target image pair (T1 and T2, for example, from a particular scanner). Once the parameters are specified, the target images are segmented using the EM segmentation algorithm. If the results are satisfactory, the template is saved and can be used to segment new target images. If the results are not satisfactory, the parameters can be modified and the segmentation re-run.

The template building process is divided in to a sequence of steps in order to simplify template specification for the non-expert user.

What are the steps in the template building process?

  1. Anatomical Structure Hierarchy: Define a hierarchy of anatomical structures.
  2. Spatial Priors: Assign uniform priors or probability images for each leaf node of the hierarchy.
  3. Intensity Images: Assign atlas and target intensity images.
  4. Intensity Distributions: Define an intensity distribution for each leaf node of the hierarchy.
  5. Node-based Parameters: Specify node-based segmentation parameters.
  6. Global Parameters: Specify global segmentation parameters.
  7. Registration Parameters: Specify atlas-to-template registration parameters.
  8. Segmentation: Apply EM algorithm to segment target image pair.

How will the template be used?

The user will (1) load the template, (2) load a new, unsegmented set of input images, (3) tweak parameters from the template if desired, and (4) start the segmentation process. If the input images are not aligned, they will be aligned prior to the segmentation process---this will be specified by the user.

Alternately, the template can be used by a batch process to segment a collection of images.

Will this process (applying the template) require any parameters that are not included in the template?

Yes. Parameters pertaining to the target images are not stored in the template. Specifically, the template does not store the (1) target volume IDs and (2) whether or not the target images must be aligned. All other parameters should be specified in the template.

Will the template building module contain parameters that are not included in the template?

Yes. The template will not contain information regarding the target images. Also, the template will not contain intermediate data used to compute parameters for the template (e.g., intensity samples used to compute mean and covariance).

Detailed Description of Wizard Steps

Step 1: Anatomical Structure Hierarchy

Build and edit a tree anatomical structures:

  • add new structure (specify name & color)
  • rename node, change associated color
  • remove a node
  • reorganize a node (e.g., specify a new parent for this node)

Step 2: Spatial Priors

For each leaf node specify a spatial prior by one of:

  • Specify a uniform prior (double in [0,1])
  • Specify a prior probability map (volume node reference)
  • Number of training samples for prior probability map (int)

Step 3: Intensity Images

  • Specify atlas intensity input volumes
  • Specify target input volumes

Step 4: Intensity Distributions

For each leaf node specify mean and covariance of multivariate Gaussian distribution:

  • parameters may be entered and edited manually
  • parameters can be learned by clicking on a representative sample of voxels in the target intensity volumes (~8 clicks)
    • the target images must be aligned together for this method to make sense
    • the user may erase a particular sample or all samples
  • A display will be available to visualize the intensity distributions
    • plot of distributions for input channels separately (marginal distributions, intensity vs. probability)
    • 2D image visualization of probabilities for input1xinput2 intensity combinations (input1 intensity vs. input2 intensity)
      • saturation is proportional to probability
    • In all plots, color is based on tissue type (color selected for leaf node in tree)
    • The user can choose which two input channels are displayed
    • The user can toggle the display of each tissue type on and off
    • When the user mouses over the MR image, the intensity under the mouse is plotted on each graph

Image of Slicer2.6 visualization window

Step 5: Node-Based Parameters

For all nodes

  • Class Probability---double
  • Local Prior Weight---double
  • Input Channel Weights---double for each input channel, final representation is char*
  • Print flags
    • Weights

For leaf nodes only

  • Intensity mean and covariance: this is specified in previous step
  • Print flags
    • PCA
    • Quality
      • Requires specification of reference standard volume

For parent nodes only

  • Frequency---int---used by some of the print flags
  • Print flags
    • Registration Parameters
    • Registration Similarity Measure
    • Bias---uses Frequency
    • Label-map---uses Frequency
    • Shape Similarity Measure
    • EMLabelMapConvergence
    • EMWeightsConvergence
    • MFALabelMapConvergence
    • MFAWeightsConvergence
  • Stopping Condition Parameters
    • EM Type---int
    • EM Value---double
    • EM Max Iterations---int
    • MFA Type---int
    • MFA Value---double
    • MFA Max Iterations---int
    • Bias Calculation---int
  • Miscellaneous Parameters
    • Local Prior Name---char*
    • Registration Translation---double[3]
    • Registration Rotation---double[3]
    • Registration Scale---double[3]
    • Registration Covariance---double[9]
    • Registration Class Specific Registration Flag
    • Exclude From Incomplete E-Step Flag
    • Registration Type---int
    • Generate Background Probability Flag
    • PCA Shape Model Type---int
    • Registration Independent Sub-class Flag
  • Class Interaction Matrices
    • 6 matrices: North, South, East, West, Up, Down; choose from list
    • Each matrix is of size (number of subclasses) by (number of subclasses)
    • Each element is a double
    • The final representation for each matrix is char*

Step 6: Global Parameters

  • Alpha---double
  • Smoothing Kernel Width---int
  • Smoothing Kernel Sigma---double
  • Multi-threading Enabled---on/off
  • Working Directory---char*
  • SegmentationBoundaryMax--int[3]
  • SegmentationBoundaryMin--int[3]

Non-template options:

  • Run Remotely---on/off
  • Remote Server---char*---should be something like davisb@swan.cs.unc.edu

Step 7: Registration Parameters

What type of registration should be run: a pull down list.

  • Affine
    • MI
    • ....
    • disabled
  • non rigid
    • Bspline
    • AG
    • ....
    • disabled
  • joint registration & segmentation

Choose interpolation type from pull down list:

  • Linear
  • Cubic
  • Nearest-neighbor

Alignment of input channels on/off (shouldn't this should occur before intensity sampling?---bcd)

Step 8: Segmentation

  • The user can save the template before or after running the algorithm
  • Run Algorithm
  • Progress bar
  • User can interrupt execution
  • At completion the user can
    • visualize segmentations as overlays on the loaded image volumes
    • press button to remove small islands
    • press button to generate 3D modeles

Description of MRML Nodes

Overview

By writing out a template we just mean writing the MRML tree.

The template will include atlas data (i.e. specification of image files), anatomical structure hierarchy information, algorithm parameters, and display parameters (e.g., the graph color for a particular structure). The data, hierarchy, parameter, and display information will be defined in separate nodes. Dependencies and hierarchical structure will be maintained by references: for example, a leaf node will contain a reference to the ID of its parent node. This is the idiom that is used, for example, to nest transforms and associate image volumes with volume display parameters in Slicer3.

The following graph shows dependency information for all of the nodeem types proposed for this file format. An arrow pointing from node A to node B indicates that (1) the XML tag for each node of type A contains a reference to the ID of a node of type B, and (2) the MRML node class representing an A node contains a pointer to a MRML B node class. Note that parent nodes in the anatomical structure hierarchy are a special case: they do not contain references to their child nodes in the XML tags. However, they do contain pointers to their child nodes in their MRML classes. Also, the prefix EMS in the graph will be expanded to EMSegment.

Template Builder (A)

This is a graph with borders and nodes. Maybe there is an Imagemap used so the nodes may be linking to some Pages.

Template Applyer

This is a graph with borders and nodes. Maybe there is an Imagemap used so the nodes may be linking to some Pages.

Template Applyer Expanded

This is a graph with borders and nodes. Maybe there is an Imagemap used so the nodes may be linking to some Pages.

Template Builder (B)

This is a graph with borders and nodes. Maybe there is an Imagemap used so the nodes may be linking to some Pages.


g5

This is a graph with borders and nodes. Maybe there is an Imagemap used so the nodes may be linking to some Pages.

Example Template File

#
# NB: Only the keys are included, not the values.
#

#
# atlas data (intensity and probabiliy maps) are stored in volume nodes
#
<VolumeArchetypeStorage id name>
<VolumeDisplay id name>
<Volume id name storageNodeRef displayNodeRef>
[more Volume nodes...]

#
# Main EMSegment node
#
<EMSegment
  id name
  globalDisplayNodeRef
  globalParametersNodeRef
  treeNodeRef>

#
# Global display parameters
#
<EMSegmentGlobalDisplay
  id name
  [graph display parameters...]
  [toggle display of advanced parameters...]>

#
# Global algorithm parameters
#
<EMSegmentGlobalParameters
  id name
  [list of atlas input volume references...]
  [global algorithm parameters...]>

#
# Hierarchy of anatomical structures
#
<EMSegmentTree
  id name
  parentNodeRef
  parametersNodeRef
  parametersLeafNodeRef
  parametersParentNodeRef
  displayNodeRef>
[more Tree nodes...]

  pcaParametersLeafNodeRef
  inhomogeneityParametersParentNodeRef

#
# node-specific parameters
#
<EMSegmentTreeParameters
  id name
  parametersRegistrationNodeRef
  [generic node-based algorithm parameters...]>
[more TreeParameters nodes...]

<EMSegmentTreeParametersParent
  id name
  parametersParentRegistrationNodeRef
  parametersParentPCANodeRef
  parametersParaentInhomogeneityNodeRef
  [class interactions matrix node refs...]
  [volume refs (not typically used)...]
  [parent-node specific algorithm parameters...]>
[more TreeParametersParent nodes...]

<EMSegmentTreeParametersLeaf
  id name
  parametersLeafPCANodeRef
  localPriorNodeRef
  [leaf-node specific algorithm parameters...]>
[more TreeParametersLeaf nodes...]

<EMSegmentTreeDisplay
  id name
  [node-specific display parametters...]>
[more TreeDisplay nodes...]

<EMSegmentCIM
  id name
  matrix>
[more CIM nodes...]

<EMSegmentTreeParametersNodeRegistration
  id name
  [generic node-based registration parmeters...]>
[more TreeParametersNodeRegistration nodes...]

<EMSegmentTreeParametersParentRegistration
  id name
  [parent-node specific registration parmeters...]>
[more TreeParametersParentRegistration nodes...]

<EMSegmentTreeParametersParentPCA
  id name
  [parent-node specific PCA parmeters...]>
[more TreeParametersParentPCA nodes...]

<EMSegmentTreeParametersLeafPCA
  id name
  [leaf-node specific PCA parmeters...]>
[more TreeParametersLeafPCA nodes...]

<EMSegmentTreeParametersParentInhomogeneity
  id name
  [parent-node specific inhomogeneity parmeters...]>
[more TreeParametersParentInhomogeneity nodes...]

Detailed Description

The following list contains all possible template parameters; not all parameters will be tunable by the user during the template building process. Currently, the variables in itatlic have low priority.

Atlas Data

  • Atlas intensity images; specified via MRML Volume nodes.
  • Spatial prior probability images that are aligned with the atlas intensity images; specified via MRML Volume nodes.

Main EM Segment Template Node

The template contains references to global algorithm and display parameters as well as the class hierarchy.

<EMSegment
  id name
  globalDisplayNodeRef
  globalParametersNodeRef
  atlasNodeRef
  targetNodeRef
  treeNodeRef>
  • Core attributes
    • GlobalDisplayNodeRef--char*
    • GlobalParametersNodeRef--char*
    • AtlasNodeRef--char*
    • TargetNodeRef--char*
    • TreeNodeRef--char*

Global EM Algorithm Parameters

Global EM algorithm parameters are stored in a single node.

<EMSegmentGlobalParameters
  id name
  [list of atlas input volume references...]
  [global algorithm parameters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • Alpha--double (should this be node specific?)
    • AlreadyRead--int (internal state variable that should not be included?)
    • DisableMultiThreading--int
    • NumberOfInputChannels--int--MaxInputChannelDef
    • NumberOfTrainingSamples--int (Kilian : Should be moved to atlas node; Brad: moved)
    • SegmentationBoundaryMax--int[3]
    • SegmentationBoundaryMin--int[3]
    • WorkingDirectory--char*--PrintDir
  • Additional core attributes (added by Brad and edited by Kilian)
    • List of Input channels
    • AlignInput - int (nonzero=>target input channels will be aligned to each other prior to segmentation???)
    • RegistratonType--int (none, Joint, Sequential)
      • The following inputs are only relevant if RegistratonType != none
        • RegistratonInterpolationType--int (linear, nn, cubic )
      • The following inputs are only relevant if RegistratonType = Sequential
        • RegistrationInputRef--char* (which of the input channels should be used for aligning the atlas)
        • RegistrationAtlasImageRef--char* (Image representing the coordinate system of the atlas)
        • RegistratonAffine--int (MI,..., disabled)
        • RegistratonNonRigid--int (AG,BSpline, ..., disabled)

Global EM Display Parameters [not used]

Global EM display parameters are stored in a single node.

<EMSegmentGlobalDisplay
  id name
  [graph display parameters...]
  [toggle display of advanced parameters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • (Graph display parameters...)
    • (I expect this to grow as the GUI develops)

Hierarchy of Anatomical Structures

The hierarchy of anatomical structures is defined by a sequence of nodes. The nodes that define the hierarchy are separate from nodes that contain algorithm or display parameters.

<EMSegmentTree
  id name
  parentNodeRef
  parametersNodeRef
  parametersLeafNodeRef
  parametersParentNodeRef
  displayNodeRef>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • DisplayNodeRef--char* (for example color in graph)
    • ParametersLeafNodeRef--char* (leaf-node specific algorithm parameters)
    • ParametersNodeRef--char* (generic node-based algorithm parameters)
    • ParametersParentNodeRef--char* (parent-node specific algorithm parameters)
    • ParentNodeRef--char*--null in case of root node

Node-based Display Parameters [moved to tree node]

<EMSegmentTreeDisplay
  id name
  [node-specific display parameters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • Color--char*--color associated with this anatomical structure
    • (I expect that more will be added here as the GUI develops)

Generic Node-based EM Algorithm Parameters

These attributes are applicable to both super-class and leaf-class MRML nodes.

<EMSegmentTreeParameters
  id name
  parametersRegistrationNodeRef
  [generic node-based algorithm parameters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • InputChannelWeights--char*
    • LocalPriorNodeRef--char*--LocalPriorName
    • LocalPriorWeight--double
    • PrintWeights--int
    • ClassProbability--double (need more descriptive name)
    • ParemetersRegistrationNodeRef--char*
  • Experimental attributes
    • ExcludeFromIncompleteEStep--int--ExcludeFromIncompleteEStepFlag

Parent-node Specific EM Algorithm Parameters

Parent-node specific algorithm parameters are stored in a MRML node.

<EMSegmentTreeParametersParent
  id name
  parametersParentRegistrationNodeRef
  parametersParentPCANodeRef
  parametersParentInhomogeneityNodeRef
  [class interactions matrix node refs...]
  [volume refs (not typically used)...]
  [parent-node specific algorithm parameters...]>


  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • ParametersParentRegistrationNodeRef [not implemented]--char*
    • ParametersParentPCANodeRef [not implemented]--char*
    • NumClasses--int
    • PredefinedLabelMapPrefix [not implemented]--char* (change to mrml node ID? yes)
    • PrintFrequency--int
    • PrintLabelMap--int
    • StopEMMaxIteration--int--StopEMMaxIter
    • StopEMType--int
    • StopEMValue--double
    • StopMFAMaxIteration--int--StopMFAMaxIter
    • StopMFAType--int
    • StopMFAValue--double
  • Aditional core attributes (added by Brad)
    • CIMMatrixNorthNodeRef [not implemented]--char*
    • CIMMatrixSouthNodeRef [not implemented]--char*
    • CIMMatrixEastNodeRef [not implemented]--char*
    • CIMMatrixWestNodeRef [not implemented]--char*
    • CIMMatrixUpNodeRef [not implemented]--char*
    • CIMMatrixDownNodeRef [not implemented]--char*
  • Experimental attributes
    • GenerateBackgroundProbability--int
    • ParameterInitSubClass [not implemented]--int
    • ParameterSaveToFile [not implemented]--int
    • ParameterSetFromFile [not implemented]--int
    • PredefinedLabelID [not implemented]--int (how does this differ from prefix above? - this assigns the class with a certain internal id specified by the user. In the prefix above we would assign the prefix of the volume)
    • PrintEMLabelMapConvergence--int
    • PrintEMWeightsConvergence--int
    • PrintMFALabelMapConvergence--int
    • PrintMFAWeightsConvergence--int

Leaf-node specific EM Algorithm Parameters

Leaf-node specific algorithm parameters are stored in a MRML node.

<EMSegmentTreeParametersLeaf
  id name
  parametersLeafPCANodeRef
  localPriorNodeRef
  [leaf-node specific algorithm parameters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • ParametersLeafPCANodeRef [not implemented]--char*
    • Label--int
    • LocalPriorWeight--double
    • LogCovariance--char*
    • LogMean--char*
    • PrintQuality--int
    • ReferenceStandardFilename [not implemented]--char* (change to mrml node ID? yes again this is case specific - should be defined through through target input node)
  • Experimental attributes
    • SamplingLogMean--char* (REMOVE)
    • SamplingLogCovaraince--char* (REMOVE)

Class Interaction Matrix [not implemented]

Six class interaction matrices (CIMs) are included for each parent node in the template. These matrices are named North, South, East, West, Up, and Down. These names correspond to positive and negative cardinal directions within the target image space. The element at row i and column j of the North CIM describes the probability that a voxel with class label i will be found North of a voxel with class label j.

CIMs are represented in the template by EMSegmentCIM nodes.

<EMSegmentCIM id name [matrix entries]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • Matrix--char*

Generic node-based registration parameters [not implemented]

<EMSegmentTreeParametersNodeRegistration
  id name
  [generic node-based registration parmeters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • PrintRegistrationParameters--int
    • PrintRegistrationSimilarityMeasure--int
    • EmployClassSpecificRegistration--int--RegistrationClassSpecificRegistrationFlag
    • RegistrationCovariance--double[9]
    • RegistrationRotation--double[3]
    • RegistrationScale--double[3]
    • RegistrationTranslation--double[3]

Parent-node specific registration parameters [not implemented]

<EMSegmentTreeParametersParentRegistration
  id name
  [parent-node specific registration parmeters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • RegistrationIndependentSubclassFlag--int (need different name? )
    • RegistrationType--int

Parent-node specific PCA parameters [not implemented]

<EMSegmentTreeParametersParentPCA
  id name
  [parent-node specific PCA parmeters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • PCAShapeModelType--int (change to hapeModelType)
    • PCAPrintShapeSimilarityMeasure--int (change to PrintShapeSimilarityMeasure)

Leaf-node specific PCA parameters [not implemented]

<EMSegmentTreeParametersLeafPCA
  id name
  [leaf-node specific PCA parmeters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • PCALogisticBoundary--double
    • PCALogisticMax--double
    • PCALogisticMin--double
    • PCALogisticSlope--double
    • PCAMeanName--char* (a filename? change to atlas id)
    • PrintPCA--int

Parent-node specific Inhomogeneity parameters [currently implemented in parent node]

<EMSegmentTreeParametersParentInhomogeneiry
  id name
  [parent-node specific inhomegeneity parmeters...]>
  • MRML node attributes
    • Name
    • ID
  • Core attributes
    • PrintBias--int
    • StopBiasCalculation--int
    • SmoothingKernelSigma--double--SmSigma
    • SmoothingKernelWidth--int--SmWidth
    • InhomogeneityNodeRef--char* [not implemented] (change to mrml node ID? This is actually case specific - yes it makes sense to change it to id should be defined by atlas id !)