Get image node from different patients

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Get image node from different patients

Matthew Anthony Mouawad

Hello everyone,

 

I have a script that I put together that allows me to register a bunch of images to another one using brainsfit and the python terminal. One thing I want to be able to do is run registrations from different patients.  Right now I am getting the image ID’s using the name of the images i.e., if I have an image called “image1” under the some patient node

 

  1. imageNode = getNode(“image1”)
  2. imageID = imageNode.GetID()

 

This works fine when I only have one patient node but I am wondering what will happen if I have two images that are named the same but under different patient Ids – more specifically how do I reference one and not the other? Sorry if this is a bit of a stupid question, I am not very strong in my programming skills and have only a tenuous grasp of python.

 

Thanks


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Get image node from different patients

Andras Lasso-2

If you load volume from a research format (nrrd, mha, …):

https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Load_volume_from_file

 

If you load data from DICOM:

https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#DICOM_2

 

Andras

 

From: slicer-users [mailto:[hidden email]] On Behalf Of Matthew Anthony Mouawad
Sent: February 20, 2017 15:01
To: SPL Slicer Users <[hidden email]>
Subject: [slicer-users] Get image node from different patients

 

Hello everyone,

 

I have a script that I put together that allows me to register a bunch of images to another one using brainsfit and the python terminal. One thing I want to be able to do is run registrations from different patients.  Right now I am getting the image ID’s using the name of the images i.e., if I have an image called “image1” under the some patient node

 

  1. imageNode = getNode(“image1”)
  2. imageID = imageNode.GetID()

 

This works fine when I only have one patient node but I am wondering what will happen if I have two images that are named the same but under different patient Ids – more specifically how do I reference one and not the other? Sorry if this is a bit of a stupid question, I am not very strong in my programming skills and have only a tenuous grasp of python.

 

Thanks


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ