Examples

From MIPAV
Revision as of 19:59, 15 February 2012 by Angelfish100 (Talk)

Jump to: navigation, search

Examples:

Applying Face De-Identification, BSE, and Fuzzy C-Means

In this example, we will to show you how to record a script, and then run it in via the Scripting menu. The script includes:

1 Applying the Face De-Identification algorithm;
2 Applying the Extract Brain Surface (BET) algorithm;
3 And finally, performing brain segmentation using the Fuzzy C-Means > Single Channel algorithm.
To start recording the script:

Open an image of interest and then, press Start Recording Script button on the Scripts toolbar. The Record New Script dialog box appears indicating that recording a script is started.

Recording the Face De-Identification algorithm execution:

1 Call Algorithms > Brain Tools > Face De-Identification;
2 The Anonymize Face dialog box opens;
3 Fill out the dialog box as shown in [MIPAV_Scripting.html#1336039 Figure 290]. The right column displays the script text corresponding to the dialog box options;
4 Press OK to run the algorithm.
Figure 290. The Anonymize Face dialog box options and the corresponding script text. Here, "face_orientation int 2" is an image specific and corresponds to the Left option chosen in the "Which way is the patient's face pointing?" dialog


{| align="center"

Script AnonymizeFace.png



|

FaceAnonymizerBET("input_image_1 ext_image $image1", "face_orientation int 2", "mms_to_delete_from_face int 15", "vertical_deletion_limit_ratio float 0.33", "bet_do_estimate_with_sphere boolean true", "bet_image_influence float 0.01", "bet_stiffness float 0.015")

|}


After the algorithm finishes running and the result image appears on the screen, make the result image active and call the next Extract Brain Surface (BET) algorithm.

Recording the BET algorithm execution:

1 Call Algorithms > Brain Tools > Extract Brain Surface (BET);
2 The Extract Brain dialog box opens;
3 Fill out the dialog box as shown in [MIPAV_Scripting.html#1336065 Figure 291]. The right column displays the part of the script corresponding to the dialog box options;
4 Press OK to start the algorithm.

Figure 291. The Extract Brain dialog box options and the corresponding script text. Here, "init_center_point list_float 114.22103,75.82523,94.18212" is an image specific


{| align="center"

File:Script BET DialogBox12.gif



|

ExtractBrain("input_image_1 image $image1", "orientation_type int 0", "do_use_sphere_estimation boolean false", "do_show_just_init_ellipse boolean false", "num_iterations int 100", "depth int 11", "image_ratio float 0.2", "stiffness float 0.15", "do_second_stage_erosion boolean false", "factor_above_median_to_erode float 0.0", "do_extract_paint boolean false", "do_init_with_center_of_mass boolean true", "init_center_point list_float 114.22103,75.82523,94.18212")

|}

After the algorithm finishes running and the result image appears on the screen, make the result image active and call the last algorithm - Fuzzy C-Means > Single Channel.

Recording the Fuzzy C-Means > Single Channel algorithm execution:

1 Call Algorithms > Segmentation > Fuzzy C-Means > Single Channel;
2 The Fuzzy C-Means dialog box opens;
3 Fill out the dialog box as shown in [MIPAV_Scripting.html#1336088 Figure 292]. The right column displays the part of the script corresponding to the dialog box options;
4 Press OK to start the algorithm.
Figure 292. The FUzzy C-Means dialog box options and the corresponding script text. Here, "centroids list_float 8318.767,20926.652,33534.54" is an image specific


{| align="center"

Scripting FuzzyC-Means.png



|

FuzzyCMeans("input_image_1 image $image1", "number_of_result_images int 4", "do_process_whole_image boolean true", "number_of_classes int 3", "exponent_q float 2.0", "do_crop_background boolean true", "threshold float 0.01", "end_tolerance float 0.01", "max_iterations int 200", "segmentation_type int 0", "centroids list_float 8318.767,20926.652,33534.54")

|}