Cortical Folds Graph -- 3.1 as default

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
ericbarnhill
Posts: 16
Joined: Mon Oct 17, 2011 1:09 pm

Cortical Folds Graph -- 3.1 as default

Post by ericbarnhill »

Salut encore,

If you don't mind one more question for now...

Unless you think I should keep using Cortical Fold Graph 3.0, I would like Morphologist to default to 3.1 so the BSc students have it automatically.

It is no problem to go into CorticalFoldsGraphGeneral.py and change the selection bit like this:

Code: Select all

 eNode1 = ParallelExecutionNode( 'CorticalFoldsGraph_3_1', selected=1 )
  eNode1.addChild( 'LeftCorticalFoldsGraph_3_1',
                   ProcessExecutionNode( 'CorticalFoldsGraph', optional = 1 ) )
  eNode1.addChild( 'RightCorticalFoldsGraph_3_1',
                   ProcessExecutionNode( 'CorticalFoldsGraph', optional = 1 ) )
  eNode.addChild( 'CorticalFoldsGraph_3_1', eNode1 )
  eNode.addChild( 'CorticalFoldsGraph_3_0',
                  ProcessExecutionNode( 'AnaComputeCorticalFoldArg',
                  selected=0 ) )
However the output links are still 3.0 files. For example if I enter

Code: Select all

/home/ericbarnhill/sf_brainvisa-database/RLHanders/r_8_sub2_lhm/t1mri/default_acquisition/default_analysis/nobias_r_8_sub2_lhm.nii.gz
it offers me, in the category of "left graph", the following:

Code: Select all

/home/ericbarnhill/sf_brainvisa-database/RLHanders/r_8_sub2_lhm/t1mri/default_acquisition/default_analysis/folds/3.0/Lr_8_sub2_lhm.arg
This is only if I change the selection bit in the code -- if I change it manually, everything is updated to 3.1.

So there must be something I need to change, besides the initial selection bit, to make sure the target files also become 3.1 default. I am wondering if I need to change something in this stretch of code, but I am not sure what:

Code: Select all

# links for 3.1 version

  eNode.addLink( 'CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.mri_corrected',
                 'mri_corrected' )
  eNode.addLink( \
      'mri_corrected',
      'CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.mri_corrected' )

  eNode.addLink( 'CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.split_mask',
                 'split_mask' )
  eNode.addLink( 'split_mask',
                 'CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.split_mask' )

  eNode.addLink( \
      'CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.commissure_coordinates',
      'commissure_coordinates' )
  eNode.addLink( \
      'commissure_coordinates',
      'CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.commissure_coordinates' )

  eNode.addLink( \
      'CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.Talairach_transform',
      'Talairach_transform' )
  eNode.addLink( \
      'Talairach_transform',
      'CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.Talairach_transform' )


  eNode.addLink( \
      'CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.mri_corrected',
      'mri_corrected' )
  eNode.addLink( \
      'mri_corrected',
      'CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.mri_corrected' )

  eNode.addLink( 'CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.split_mask',
                 'split_mask' )
  eNode.addLink( 'split_mask',
                 'CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.split_mask' )


  eNode.addLink( \
      'CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.commissure_coordinates',
      'commissure_coordinates' )
  eNode.addLink( \
      'commissure_coordinates',
      'CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.commissure_coordinates' )

  eNode.addLink( \
      'CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.Talairach_transform',
      'Talairach_transform' )
  eNode.addLink( \
      'Talairach_transform',
      'CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.Talairach_transform' )


  eNode.addLink( 'CorticalFoldsGraph_3_0.mri_corrected', 'mri_corrected' )
  eNode.addLink( 'mri_corrected', 'CorticalFoldsGraph_3_0.mri_corrected' )

  eNode.addLink( 'CorticalFoldsGraph_3_0.brain_voronoi', 'split_mask' )
  eNode.addLink( 'split_mask', 'CorticalFoldsGraph_3_0.brain_voronoi' )

  eNode.addLink( 'CorticalFoldsGraph_3_0.Lgraph', 'left_graph' )
  eNode.addLink( 'left_graph', 'CorticalFoldsGraph_3_0.Lgraph' )

  eNode.addLink( 'CorticalFoldsGraph_3_0.Rgraph', 'right_graph' )
  eNode.addLink( 'right_graph', 'CorticalFoldsGraph_3_0.Rgraph' )

  eNode.addLink( 'CorticalFoldsGraph_3_0.Commissure_coordinates',
                 'commissure_coordinates' )
  eNode.addLink( 'commissure_coordinates',
                 'CorticalFoldsGraph_3_0.Commissure_coordinates' )
Please let me know if you have a suggestion.

If it is bad for me to have posted all this code please erase it.

Also please let me know if I should be using 3.0 for now instead.

Merci encore,

Eric
Dominique Geffroy
Site Admin
Posts: 161
Joined: Thu Mar 01, 2007 4:22 pm
Location: IFR 49 - Neurospin, Gif-sur-Yvette, France
Contact:

Re: Cortical Folds Graph -- 3.1 as default

Post by Dominique Geffroy »

Hello,

yes, you should also change the parameter links replacing in the function eNode.addLink... CorticalFoldsGraph_3_0.Lgraph by CorticalFoldsGraph_3_1.LeftCorticalFoldsGraph_3_1.graph and CorticalFoldsGraph_3_0.Rgraph by CorticalFoldsGraph_3_1.RightCorticalFoldsGraph_3_1.graph.

Then it should work.

Dominique
ericbarnhill
Posts: 16
Joined: Mon Oct 17, 2011 1:09 pm

Re: Cortical Folds Graph -- 3.1 as default

Post by ericbarnhill »

This works, thank you!
Post Reply