User Tools

Site Tools


dosimetry: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
dosimetry:userguide:thinknode [2015/09/29 02:53] – [rt_types] kerhartdosimetry:userguide:thinknode [2021/07/29 18:23] (current) – external edit 127.0.0.1
Line 6: Line 6:
 ====== Python ====== ====== Python ======
  
 +Please refer to the [[https://github.com/dotdecimal/astroid-script-library/blob/development/python/README.md| Python Script Library Readme]] for dependent python modules and a high level list of what these libraries include.
 ===== Python: Overview ===== ===== Python: Overview =====
  
Line 222: Line 223:
 Each data type detailed in the [[http://docs.apps.dotdecimal.com|astroid Manifest Guide]] has a corresponding class in this python module.  Each data type detailed in the [[http://docs.apps.dotdecimal.com|astroid Manifest Guide]] has a corresponding class in this python module. 
  
-Below you will see as snippet from the rt_types module that shows the class for the //polyset// rt_type along with its default initializations and //.expand_data// and //from_json// functions.+Below you will see snippet from the rt_types module that shows the class for the //polyset// rt_type along with its default initialization, //expand_data// and //from_json// functions.
  
 <code python> <code python>
Line 271: Line 272:
 </code> </code>
  
-  * **Interdependence:** When rt_types are constructed of other or multiple named types, they will be constructed as such in each class as displayed by the //polygons// parameter of the //polyset// in this example. +  * **Interdependence:** When rt_types are constructed of other or multiple named types, they will be constructed as such in each class as seen in the //polygons// parameter of the //polyset// in the above example. 
-  * **//expand_data// function:** Each class's //.expand_data// function provides an ordered dictionary of each of the values in the class. This is explicitly an ordered dictionary since when calling a function in a calculation request, the order of the values provided matters if constructing the request by thinknode value type+  * **//expand_data// function:** Each class's //expand_data// function returns a python dictionary containing each of the values in the class, with all data values expanded out to remove compression or other encodings (i.e. providing results in a format more useful for send to other applications or for human-readability)
-  * **//from_json// function:** Each class's //.from_json// function provides a method to turn a raw json string (e.g. a result from a thinknode calculation or ISS object) into an rt_type data type.+  * **//from_json// function:** Each class's //from_json// function provides a method to turn a raw json string (e.g. a result from a thinknode calculation or ISS object) into an rt_type data type. Proper use is to first construct an empty class instance, then to call the //from_json// method on that instance, passing in the desired json data string
  
-Below is an example usage of getting a thinknode dose image (image_3d data type in the astroid manifest) and turning it into a rt_types image_3d data type, then using that data type to output the image as a VTK graphics file:+Below is an example usage of getting a thinknode dose image (image_3d data type in the astroid manifest) and turning it into a rt_types image_3d data type, so that it can be expanded and then used to output the image into a VTK graphics file:
  
 <code python> <code python>
Line 291: Line 292:
 The //thinknode_worker// module is the main work horse for communication with the astroid app and thinknode. The module will handle authentication, posting objects to ISS, creating most of the common calculation request structures, and posting the calculation request. The //thinknode_worker// module is the main work horse for communication with the astroid app and thinknode. The module will handle authentication, posting objects to ISS, creating most of the common calculation request structures, and posting the calculation request.
  
-Refer to the [[https://github.com/dotdecimal/astroid-script-library|.decimal GitHub repository]] for the complete module. Below are a few of the more common thinknode http worker and their intended usages:+Refer to the [[https://github.com/dotdecimal/astroid-script-library|.decimal GitHub repository]] for the complete module. Below are a few of the more common thinknode_worker functions and their intended usages:
  
 <code python> <code python>
Line 329: Line 330:
  
 ==== dosimetry_worker ==== ==== dosimetry_worker ====
-The dosimetry_worker module provides simplified function and calculation requests for common dosimetry tasks. This library is constantly growing as more routine tasks are programmed in python. +The dosimetry_worker module provides high-level functions for building data types and calculation requests for common dosimetry tasks. This library is constantly growing as more routine tasks are programmed in python. 
  
 Refer to the [[https://github.com/dotdecimal/astroid-script-library|.decimal GitHub repository]] for the complete module. Some basic examples of provided functionality are: Refer to the [[https://github.com/dotdecimal/astroid-script-library|.decimal GitHub repository]] for the complete module. Some basic examples of provided functionality are:
Line 341: Line 342:
  
 ==== vtk_worker ==== ==== vtk_worker ====
-The VTK worker provides a means to write out common rt_types to a .vtk file format that can be visualized in [[http://www.paraview.org/|Paraview]]. It's most useful for displaying image and primitive object data types.+The VTK worker provides a means to write out common rt_types to a vtk file format ([[http://www.vtk.org/|The Visualization TooKit]]) that can be visualized in [[http://www.paraview.org/|Paraview]]. It's most useful for displaying and post-processing image, mesh, and other primitive object data types.
  
-Below is an example of turning a dose image_3d into a .vtk file for visualization in Paraview:+Below is an example of turning a dose image_3d into a vtk file for visualization in Paraview:
  
 <code python> <code python>
Line 358: Line 359:
 ==== decimal_logging ==== ==== decimal_logging ====
  
-The //decimal_logging// module provides formatted and detailed output window and file logging. +The //decimal_logging// module provides formatted and detailed output window messages and file logging. 
  
 The following settings are available in the decimal_logging.py file: The following settings are available in the decimal_logging.py file:
dosimetry/userguide/thinknode.1443495191.txt.gz · Last modified: 2021/07/29 18:21 (external edit)