Difference between revisions of "User talk:Haehn"

From NAMIC Wiki
Jump to: navigation, search
(Created page with 'my notes.. "import sys; from Slicer import slicer; volNode=slicer.VolumesGUI.GetLogic().AddArchetypeVolume('/home/haehn/data/Image00_LCA.nrrd','Liver',0); matrix = slicer.vtkMa…')
 
Line 1: Line 1:
my notes..
+
==my notes..==
  
 +
* this code works locally:
 
"import sys;
 
"import sys;
 
from Slicer import slicer;
 
from Slicer import slicer;
Line 12: Line 13:
 
volumeNode.SetIJKToRASMatrix(matrix);
 
volumeNode.SetIJKToRASMatrix(matrix);
 
volumeNode.SetModifiedSinceRead(1);
 
volumeNode.SetModifiedSinceRead(1);
slicer.VolumesGUI.GetLogic().SaveArchetypeVolume('home/haehn/data/test.nrrd',volumeNode);"
+
slicer.VolumesGUI.GetLogic().SaveArchetypeVolume('/home/haehn/data/test.nrrd',volumeNode);"

Revision as of 15:35, 11 January 2010

Home < User talk:Haehn

my notes..

  • this code works locally:

"import sys; from Slicer import slicer; volNode=slicer.VolumesGUI.GetLogic().AddArchetypeVolume('/home/haehn/data/Image00_LCA.nrrd','Liver',0); matrix = slicer.vtkMatrix4x4(); volNode.GetIJKToRASMatrix(matrix);

outputNode=slicer.MRMLScene.CreateNodeByClass('vtkMRMLScalarVolumeNode'); volumeNode=slicer.MRMLScene.AddNode(outputNode); volumeNode.SetAndObserveImageData(volNode.GetImageData()); volumeNode.SetIJKToRASMatrix(matrix); volumeNode.SetModifiedSinceRead(1); slicer.VolumesGUI.GetLogic().SaveArchetypeVolume('/home/haehn/data/test.nrrd',volumeNode);"