User Tools

Site Tools


dicom:userguide:thinknode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dicom:userguide:thinknode [2015/09/28 21:24] dpatenaudedicom:userguide:thinknode [2021/07/29 18:23] (current) – external edit 127.0.0.1
Line 11: Line 11:
 ==== Posting a Dicom Patient ==== ==== Posting a Dicom Patient ====
  
-The below example shows how to post a dicom file directory to thinknode iss and return a rt_study. Using the rt_study, sobp and pbs dose calculations can be performed. See the examples //pbs_dose_calc_from_dicom.py// and //sobp_dose_calc_from_dicom.py// from the [[https://github.com/dotdecimal/astroid-script-library|.decimal GitHub repository]] for more indepth example of using the dicom app to call dosimetry calculations.+The below example shows how to post a dicom file directory to thinknode iss and return a //rt_study//. Using the //rt_study//, sobp and pbs dose calculations can be performed. See the examples //pbs_dose_calc_from_dicom.py// and //sobp_dose_calc_from_dicom.py// from the [[https://github.com/dotdecimal/astroid-script-library|.decimal GitHub repository]] for more in depth examples of using the dicom app to call dosimetry calculations.
  
 <code python> <code python>
 # Copyright (c) 2015 .decimal, Inc. All rights reserved. # Copyright (c) 2015 .decimal, Inc. All rights reserved.
 # Date:     09/25/2015 # Date:     09/25/2015
-# Desc:     Post folder to thinknode and get back a dicom_patient+# Desc:     Post folder to thinknode and get back a dicom_study
  
 import os.path import os.path
Line 23: Line 23:
 from lib import decimal_logging as dl from lib import decimal_logging as dl
  
 +# Get IAM ids
 +iam = thinknode.authenticate(thinknode.read_config('thinknode.cfg'))
 + 
 # Create a study # Create a study
 study_id = dicom.make_rt_study_from_dir(iam, 'E:/dicom/MGH_Phantom_min/') study_id = dicom.make_rt_study_from_dir(iam, 'E:/dicom/MGH_Phantom_min/')
Line 28: Line 31:
 # Combine uploaded CT image slices into an Image_3d datatype # Combine uploaded CT image slices into an Image_3d datatype
 study_calc = \ study_calc = \
-  thinknode.function('decimal', 'dicom', "merge_ct_image_slices",+  thinknode.function(iam["account_name"], 'dicom', "merge_ct_image_slices",
       [       [
           thinknode.reference(study_id)           thinknode.reference(study_id)
       ])       ])
-study_res = thinknode.do_calculation(iam, 'dicom', study_calc, False)+study_res = thinknode.do_calculation(iam, study_calc, False)
 dl.data("Patient rt_tudy ISS ID: " + study_res) dl.data("Patient rt_tudy ISS ID: " + study_res)
 </code> </code>
dicom/userguide/thinknode.1443475479.txt.gz · Last modified: (external edit)