// // time: Wed Apr 9 15:47:29 1997 // // version: 3.1.1 (format), 3.1.4 (DX Beta) // // // MODULE main // // comment: This visual program shows one use of the Morph module. The radio style selector interactor controls which operatoin the Morph module applies to a field consisting of 1's and 0's. // comment: // comment: for "erode", a pixel is true (white) only if all the elements under the box mask are true, otherwise it is false (black). // comment: // comment: for "dilate", a pixel is true (white) if any of the elements under the box mask are true, otherwise it is false (black). // comment: // comment: "open" is equivalent to "erode" followed by "dilate". // comment: // comment: "close" is equivalent to "dilate" followed by "erode". // workspace: width = 542, height = 497 // layout: snap = 0, width = 50, height = 50, align = CC // macro main( ) -> ( ) { // // node Construct[2]: x = 175, y = 21, inputs = 4, label = Construct // input[1]: defaulting = 0, visible = 1, type = 16777224, value = {[0 0]} // input[2]: defaulting = 0, visible = 1, type = 16777224, value = {[1 1]} // input[3]: defaulting = 0, visible = 1, type = 8, value = [5 5] // main_Construct_2_out_1 = Construct( main_Construct_2_in_1, main_Construct_2_in_2, main_Construct_2_in_3, main_Construct_2_in_4 ) [instance: 2, cache: 1]; // // node Isolate[1]: x = 282, y = 30, inputs = 2, label = Isolate // input[2]: defaulting = 0, visible = 1, type = 5, value = .98 // main_Isolate_1_out_1 = Isolate( main_Construct_2_out_1, main_Isolate_1_in_2 ) [instance: 1, cache: 1]; // // node Color[1]: x = 103, y = 108, inputs = 5, label = Color // input[2]: defaulting = 0, visible = 1, type = 32, value = "white" // main_Color_1_out_1 = Color( main_Isolate_1_out_1, main_Color_1_in_2, main_Color_1_in_3, main_Color_1_in_4, main_Color_1_in_5 ) [instance: 1, cache: 1]; // // node AutoCamera[1]: x = 165, y = 190, inputs = 9, label = AutoCamera // input[4]: defaulting = 0, visible = 1, type = 1, value = 300 // input[5]: defaulting = 0, visible = 1, type = 5, value = 1.5 // main_AutoCamera_1_out_1 = AutoCamera( main_Color_1_out_1, main_AutoCamera_1_in_2, main_AutoCamera_1_in_3, main_AutoCamera_1_in_4, main_AutoCamera_1_in_5, main_AutoCamera_1_in_6, main_AutoCamera_1_in_7, main_AutoCamera_1_in_8, main_AutoCamera_1_in_9 ) [instance: 1, cache: 1]; // // node Caption[3]: x = 20, y = 34, inputs = 9, label = Caption // input[1]: defaulting = 0, visible = 1, type = 32, value = "Caption" // input[2]: defaulting = 0, visible = 1, type = 8, value = [.5 0] // input[6]: defaulting = 0, visible = 1, type = 1, value = 80 // input[7]: defaulting = 0, visible = 1, type = 32, value = "roman_tser" // main_Caption_3_out_1 = Caption( main_Caption_3_in_1, main_Caption_3_in_2, main_Caption_3_in_3, main_Caption_3_in_4, main_Caption_3_in_5, main_Caption_3_in_6, main_Caption_3_in_7, main_Caption_3_in_8, main_Caption_3_in_9 ) [instance: 3, cache: 1]; // // node Collect[1]: x = 13, y = 187, inputs = 2, label = Collect // main_Collect_1_out_1 = Collect( main_Caption_3_out_1, main_Color_1_out_1 ) [instance: 1, cache: 1]; // // node Render[1]: x = 43, y = 288, inputs = 3, label = Render // main_Render_1_out_1 = Render( main_Collect_1_out_1, main_AutoCamera_1_out_1, main_Render_1_in_3 ) [instance: 1, cache: 1]; // // node Rename[2]: x = 125, y = 309, inputs = 3, label = Rename // input[2]: defaulting = 0, visible = 1, type = 32, value = "colors" // main_Rename_2_out_1 = Rename( main_Render_1_out_1, main_Rename_2_in_2, main_Rename_2_in_3 ) [instance: 2, cache: 1]; // // node Compute[1]: x = 210, y = 346, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "mag($0)" // expression: value = mag(a) // name[2]: value = a // main_Compute_1_out_1 = Compute( main_Compute_1_in_1, main_Rename_2_out_1 ) [instance: 1, cache: 1]; // // node Selector[1]: x = 301, y = 232, inputs = 7, label = Selector // input[1]: defaulting = 0, visible = 0, type = 32, value = "Selector_1" // input[2]: defaulting = 0, visible = 0, type = 32, value = "erode" // input[3]: defaulting = 0, visible = 0, type = 29, value = 1 // input[4]: defaulting = 1, visible = 1, type = 16777248, value = { "erode" "open" "dilate" "close" } // input[5]: defaulting = 1, visible = 0, type = 16777245, value = { 1 2 3 4 } // output[1]: visible = 1, type = 29, value = 1 // output[2]: visible = 1, type = 32, value = "erode" // // // node Morph[1]: x = 298, y = 349, inputs = 3, label = Morph // main_Morph_1_out_1 = Morph( main_Compute_1_out_1, main_Selector_1_out_2, main_Morph_1_in_3 ) [instance: 1, cache: 1]; // // node Compute[2]: x = 386, y = 353, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "float([$0, $0, $0])" // expression: value = float([a, a, a]) // name[2]: value = a // main_Compute_2_out_1 = Compute( main_Compute_2_in_1, main_Morph_1_out_1 ) [instance: 2, cache: 1]; // // node Display[1]: x = 61, y = 420, inputs = 4, label = Display // depth: value = 24 // window: position = (0.3586,0.0898), size = 0.2453x0.5078 // main_Display_1_out_1[cache: 2] = Display( main_Render_1_out_1, main_Display_1_in_2, main_Display_1_in_3, main_Display_1_in_4 ) [instance: 1, cache: 1]; // // node Rename[1]: x = 470, y = 354, inputs = 3, label = Rename // input[2]: defaulting = 0, visible = 1, type = 32, value = "data" // input[3]: defaulting = 0, visible = 1, type = 32, value = "colors" // main_Rename_1_out_1 = Rename( main_Compute_2_out_1, main_Rename_1_in_2, main_Rename_1_in_3 ) [instance: 1, cache: 1]; // // node Display[2]: x = 476, y = 435, inputs = 4, label = Display // depth: value = 24 // window: position = (0.6141,0.0889), size = 0.2453x0.5078 // main_Display_2_out_1[cache: 2] = Display( main_Rename_1_out_1, main_Display_2_in_2, main_Display_2_in_3, main_Display_2_in_4 ) [instance: 2, cache: 1]; // network: end of macro body } main_Construct_2_in_1 = {[0 0]}; main_Construct_2_in_2 = {[1 1]}; main_Construct_2_in_3 = [5 5]; main_Construct_2_in_4 = NULL; main_Construct_2_out_1 = NULL; main_Isolate_1_in_2 = .98; main_Isolate_1_out_1 = NULL; main_Color_1_in_2 = "white"; main_Color_1_in_3 = NULL; main_Color_1_in_4 = NULL; main_Color_1_in_5 = NULL; main_Color_1_out_1 = NULL; main_AutoCamera_1_in_2 = NULL; main_AutoCamera_1_in_3 = NULL; main_AutoCamera_1_in_4 = 300; main_AutoCamera_1_in_5 = 1.5; main_AutoCamera_1_in_6 = NULL; main_AutoCamera_1_in_7 = NULL; main_AutoCamera_1_in_8 = NULL; main_AutoCamera_1_in_9 = NULL; main_AutoCamera_1_out_1 = NULL; main_Caption_3_in_1 = "Caption"; main_Caption_3_in_2 = [.5 0]; main_Caption_3_in_3 = NULL; main_Caption_3_in_4 = NULL; main_Caption_3_in_5 = NULL; main_Caption_3_in_6 = 80; main_Caption_3_in_7 = "roman_tser"; main_Caption_3_in_8 = NULL; main_Caption_3_in_9 = NULL; main_Caption_3_out_1 = NULL; main_Collect_1_out_1 = NULL; main_Render_1_in_3 = NULL; main_Render_1_out_1 = NULL; main_Rename_2_in_2 = "colors"; main_Rename_2_in_3 = NULL; main_Rename_2_out_1 = NULL; main_Compute_1_in_1 = "mag($0)"; main_Compute_1_out_1 = NULL; main_Selector_1_in_1 = "Selector_1"; main_Selector_1_in_2 = "erode" ; main_Selector_1_in_3 = 1 ; main_Selector_1_in_4 = NULL; main_Selector_1_in_5 = NULL; main_Selector_1_in_6 = NULL; main_Selector_1_in_7 = NULL; main_Selector_1_out_2 = "erode" ; main_Morph_1_in_3 = NULL; main_Morph_1_out_1 = NULL; main_Compute_2_in_1 = "float([$0, $0, $0])"; main_Compute_2_out_1 = NULL; main_Display_1_in_2 = NULL; main_Display_1_in_3 = "X24,,"; main_Display_1_in_4 = NULL; main_Rename_1_in_2 = "data"; main_Rename_1_in_3 = "colors"; main_Rename_1_out_1 = NULL; main_Display_2_in_2 = NULL; main_Display_2_in_3 = "X24,,"; main_Display_2_in_4 = NULL; Executive("product version 3 1 4"); $sync main();