// // time: Wed Apr 9 15:35:39 1997 // // version: 3.1.1 (format), 3.1.4 (DX Beta) // // // // macro reference (direct): Image2 Image2Macro.net include "Image2Macro.net" // // MODULE main // // comment: This visual program uses Image2Macro, which reproduces much of the functionality of the Image tool in the User Interface. However Image2Macro (or a macro like it) could be used independently of the user interface as well. // comment: // comment: Image2Macro uses SuperviseState and SuperviseWindow together with Display to enable direct user interaction with the object in the window. // page assignment: image order=3, windowed=0, showing=1 // page assignment: object order=2, windowed=0, showing=0 // workspace: width = 781, height = 439 // layout: snap = 0, width = 50, height = 50, align = NN // macro main( ) -> ( ) { // // node Construct[1]: x = 47, y = 20, inputs = 4, label = Construct // input[1]: defaulting = 0, visible = 1, type = 16777224, value = {[-1 -1 -1]} // input[2]: defaulting = 0, visible = 1, type = 16777224, value = {[2 2 2]} // input[3]: defaulting = 0, visible = 1, type = 8, value = [2 2 2] // input[4]: defaulting = 0, visible = 1, type = 16777245, value = {1 .. 8} // page group: object // main_Construct_1_out_1 = Construct( main_Construct_1_in_1, main_Construct_1_in_2, main_Construct_1_in_3, main_Construct_1_in_4 ) [instance: 1, cache: 1]; // // node ShowBoundary[1]: x = 20, y = 99, inputs = 2, label = ShowBoundary // page group: object // main_ShowBoundary_1_out_1 = ShowBoundary( main_Construct_1_out_1, main_ShowBoundary_1_in_2 ) [instance: 1, cache: 1]; // // node AutoColor[1]: x = 54, y = 182, inputs = 10, label = AutoColor // page group: object // main_AutoColor_1_out_1, main_AutoColor_1_out_2 = AutoColor( main_ShowBoundary_1_out_1, main_AutoColor_1_in_2, main_AutoColor_1_in_3, main_AutoColor_1_in_4, main_AutoColor_1_in_5, main_AutoColor_1_in_6, main_AutoColor_1_in_7, main_AutoColor_1_in_8, main_AutoColor_1_in_9, main_AutoColor_1_in_10 ) [instance: 1, cache: 1]; // // node Transmitter[27]: x = 77, y = 288, inputs = 1, label = object // page group: object // object = main_AutoColor_1_out_1; // // node Receiver[33]: x = 0, y = 113, inputs = 1, label = object // page group: image // main_Receiver_33_out_1[cache: 0] = object; // // node Selector[1]: x = 66, y = 62, inputs = 7, label = Selector // input[1]: defaulting = 0, visible = 0, type = 32, value = "Selector_1" // input[2]: defaulting = 0, visible = 0, type = 32, value = "software" // input[3]: defaulting = 0, visible = 0, type = 29, value = 0 // input[4]: defaulting = 1, visible = 1, type = 16777248, value = { "hardware" "software" } // input[5]: defaulting = 1, visible = 0, type = 16777245, value = { 1 0 } // output[1]: visible = 1, type = 29, value = 0 // output[2]: visible = 1, type = 32, value = "software" // page group: image // // // node Reset[2]: x = 735, y = 111, inputs = 6, label = Reset // input[1]: defaulting = 0, visible = 0, type = 32, value = "main_Reset_2_out_1" // input[2]: defaulting = 0, visible = 0, type = 29, value = 0 // input[3]: defaulting = 0, visible = 0, type = 3, value = 0 // input[4]: defaulting = 1, visible = 0, type = 29, value = 1 // input[5]: defaulting = 1, visible = 0, type = 29, value = 0 // output[1]: visible = 1, type = 29, value = 0 // page group: image // toggle : 0 // // // node Selector[2]: x = 195, y = 179, inputs = 7, label = Selector // input[1]: defaulting = 0, visible = 0, type = 32, value = "Selector_2" // input[2]: defaulting = 0, visible = 0, type = 32, value = "black" // input[3]: defaulting = 0, visible = 0, type = 29, value = 0 // input[4]: defaulting = 1, visible = 1, type = 16777248, value = { "red" "blue" "black" "white" "grey" } // input[5]: defaulting = 1, visible = 0, type = 16777245, value = { 1 1 0 0 0 } // output[1]: visible = 1, type = 29, value = 0 // output[2]: visible = 1, type = 32, value = "black" // page group: image // // // node Toggle[1]: x = 266, y = 177, inputs = 6, label = Toggle // input[1]: defaulting = 0, visible = 0, type = 32, value = "Toggle_1" // input[2]: defaulting = 0, visible = 0, type = 29, value = 0 // input[3]: defaulting = 0, visible = 0, type = 3, value = 0 // input[4]: defaulting = 1, visible = 1, type = 29, value = 1 // input[5]: defaulting = 1, visible = 1, type = 29, value = 0 // output[1]: visible = 1, type = 29, value = 0 // page group: image // toggle : 0 // // // node String[1]: x = 387, y = 244, inputs = 0, label = String // output[1]: visible = 1, type = 32, value = "image" // page group: image // // // node String[2]: x = 452, y = 252, inputs = 0, label = String // output[1]: visible = 1, type = 32, value = "tiff" // page group: image // // // node Integer[1]: x = 520, y = 259, inputs = 11, label = Integer // input[1]: defaulting = 0, visible = 0, type = 32, value = "Integer_1" // input[3]: defaulting = 0, visible = 0, type = 1, value = 320 // input[5]: defaulting = 1, visible = 0, type = 1, value = -1000000 // input[6]: defaulting = 1, visible = 0, type = 1, value = 1000000 // input[7]: defaulting = 1, visible = 0, type = 5, value = 1.0 // input[9]: defaulting = 1, visible = 0, type = 1, value = 0 // output[1]: visible = 1, type = 1, value = 320 // page group: image // // // node Scalar[2]: x = 591, y = 248, inputs = 11, label = Scalar // input[1]: defaulting = 0, visible = 0, type = 32, value = "Scalar_2" // input[3]: defaulting = 0, visible = 0, type = 5, value = 0.75 // input[5]: defaulting = 1, visible = 0, type = 5, value = -1000000.0 // input[6]: defaulting = 1, visible = 0, type = 5, value = 1000000.0 // input[7]: defaulting = 1, visible = 0, type = 5, value = 1.0 // input[9]: defaulting = 1, visible = 0, type = 1, value = 5 // output[1]: visible = 1, type = 5, value = 0.75 // page group: image // // // node Toggle[2]: x = 324, y = 222, inputs = 6, label = Toggle // input[1]: defaulting = 0, visible = 0, type = 32, value = "Toggle_2" // input[2]: defaulting = 0, visible = 0, type = 29, value = 0 // input[3]: defaulting = 0, visible = 0, type = 3, value = 0 // input[4]: defaulting = 1, visible = 1, type = 29, value = 1 // input[5]: defaulting = 1, visible = 1, type = 29, value = 0 // output[1]: visible = 1, type = 29, value = 0 // page group: image // toggle : 0 // // // node Selector[3]: x = 662, y = 245, inputs = 7, label = Selector // input[1]: defaulting = 0, visible = 0, type = 32, value = "Selector_3" // input[2]: defaulting = 0, visible = 0, type = 32, value = "Rotate: operates like left-button rotation in image tool" // input[3]: defaulting = 0, visible = 0, type = 29, value = 0 // input[4]: defaulting = 1, visible = 1, type = 16777248, value = { "Pan: drag mouse on object to move" "Zoom:drag up to zoom in, drag down to zoom out" "Rotate: operates like left-button rotation in image tool" } // input[5]: defaulting = 1, visible = 0, type = 16777245, value = { 1 2 0 } // output[1]: visible = 1, type = 29, value = 0 // output[2]: visible = 1, type = 32, value = "Rotate: operates like left-button rotation in image tool" // page group: image // // // node Image2[1]: x = 0, y = 377, inputs = 31, label = Image2 // input[2]: visible = 1 // input[4]: visible = 1 // input[5]: visible = 1 // input[7]: visible = 1 // input[8]: visible = 1 // input[9]: visible = 1 // input[10]: visible = 1 // input[11]: visible = 1 // input[12]: visible = 1 // input[13]: defaulting = 0, visible = 1, type = 16777248, value = {"apples" "oranges" "bananas"} // page group: image // main_Image2_1_out_1, main_Image2_1_out_2, main_Image2_1_out_3 = Image2( main_Receiver_33_out_1, main_Selector_1_out_2, main_Image2_1_in_3, main_Reset_2_out_1, main_Selector_2_out_2, main_Image2_1_in_6, main_Toggle_1_out_1, main_String_1_out_1, main_String_2_out_1, main_Integer_1_out_1, main_Scalar_2_out_1, main_Toggle_2_out_1, main_Image2_1_in_13, main_Image2_1_in_14, main_Image2_1_in_15, main_Image2_1_in_16, main_Image2_1_in_17, main_Image2_1_in_18, main_Image2_1_in_19, main_Image2_1_in_20, main_Image2_1_in_21, main_Image2_1_in_22, main_Image2_1_in_23, main_Image2_1_in_24, main_Image2_1_in_25, main_Image2_1_in_26, main_Image2_1_in_27, main_Image2_1_in_28, main_Image2_1_in_29, main_Selector_3_out_1, main_Image2_1_in_31 ) [instance: 1, cache: 1]; // // decorator Annotate pos=(187,72) size=258x28 style(Label), value = // annotation user_begin: 36 // annotation user: This page creates an object to view. // annotation user_end: // page group: object // // decorator Annotate pos=(155,24) size=459x140 style(Label), value = // annotation user_begin: 423 // annotation user: This page calls Image2Macro (in samples/macros) // annotation user: which reproduces much of the functionality of the Image tool. // annotation user: Note however, that Image2Macro (or a macro like it created by // annotation user: the user) could be used *without* the user interace. // annotation user: // annotation user: To run this program, open the control panels, go into execute on // annotation user: change mode, and then experiment with the interaction modes in // annotation user: the control panel. // annotation user_end: // page group: image // network: end of macro body } main_Construct_1_in_1 = {[-1 -1 -1]}; main_Construct_1_in_2 = {[2 2 2]}; main_Construct_1_in_3 = [2 2 2]; main_Construct_1_in_4 = {1 .. 8}; main_Construct_1_out_1 = NULL; main_ShowBoundary_1_in_2 = NULL; main_ShowBoundary_1_out_1 = NULL; main_AutoColor_1_in_2 = NULL; main_AutoColor_1_in_3 = NULL; main_AutoColor_1_in_4 = NULL; main_AutoColor_1_in_5 = NULL; main_AutoColor_1_in_6 = NULL; main_AutoColor_1_in_7 = NULL; main_AutoColor_1_in_8 = NULL; main_AutoColor_1_in_9 = NULL; main_AutoColor_1_in_10 = NULL; main_AutoColor_1_out_1 = NULL; main_Transmitter_27_out_1 = NULL; main_Receiver_33_out_1 = NULL; main_Selector_1_in_1 = "Selector_1"; main_Selector_1_in_2 = "software" ; main_Selector_1_in_3 = 0 ; 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 = "software" ; main_Reset_2_in_1 = "main_Reset_2_out_1"; main_Reset_2_in_2 = 0; main_Reset_2_in_3 = 0; main_Reset_2_in_4 = NULL; main_Reset_2_in_5 = NULL; main_Reset_2_in_6 = NULL; main_Reset_2_out_1 = 0; main_Selector_2_in_1 = "Selector_2"; main_Selector_2_in_2 = "black" ; main_Selector_2_in_3 = 0 ; main_Selector_2_in_4 = NULL; main_Selector_2_in_5 = NULL; main_Selector_2_in_6 = NULL; main_Selector_2_in_7 = NULL; main_Selector_2_out_2 = "black" ; main_Toggle_1_in_1 = "Toggle_1"; main_Toggle_1_in_2 = 0; main_Toggle_1_in_3 = 0; main_Toggle_1_in_4 = NULL; main_Toggle_1_in_5 = NULL; main_Toggle_1_in_6 = NULL; main_Toggle_1_out_1 = 0; main_String_1_out_1 = "image"; main_String_2_out_1 = "tiff"; main_Integer_1_in_1 = "Integer_1"; main_Integer_1_in_2 = NULL; main_Integer_1_in_3 = 320 ; main_Integer_1_in_4 = NULL; main_Integer_1_in_5 = NULL; main_Integer_1_in_6 = NULL; main_Integer_1_in_7 = NULL; main_Integer_1_in_8 = NULL; main_Integer_1_in_9 = NULL; main_Integer_1_in_10 = NULL; main_Integer_1_in_11 = NULL; main_Integer_1_out_1 = 320 ; main_Scalar_2_in_1 = "Scalar_2"; main_Scalar_2_in_2 = NULL; main_Scalar_2_in_3 = 0.75 ; main_Scalar_2_in_4 = NULL; main_Scalar_2_in_5 = NULL; main_Scalar_2_in_6 = NULL; main_Scalar_2_in_7 = NULL; main_Scalar_2_in_8 = NULL; main_Scalar_2_in_9 = NULL; main_Scalar_2_in_10 = NULL; main_Scalar_2_in_11 = NULL; main_Scalar_2_out_1 = 0.75 ; main_Toggle_2_in_1 = "Toggle_2"; main_Toggle_2_in_2 = 0; main_Toggle_2_in_3 = 0; main_Toggle_2_in_4 = NULL; main_Toggle_2_in_5 = NULL; main_Toggle_2_in_6 = NULL; main_Toggle_2_out_1 = 0; main_Selector_3_in_1 = "Selector_3"; main_Selector_3_in_2 = "Rotate: operates like left-button rotation in image tool" ; main_Selector_3_in_3 = 0 ; main_Selector_3_in_4 = NULL; main_Selector_3_in_5 = NULL; main_Selector_3_in_6 = NULL; main_Selector_3_in_7 = NULL; main_Selector_3_out_1 = 0 ; main_Image2_1_in_3 = NULL; main_Image2_1_in_6 = NULL; main_Image2_1_in_13 = {"apples" "oranges" "bananas"}; main_Image2_1_in_14 = NULL; main_Image2_1_in_15 = NULL; main_Image2_1_in_16 = NULL; main_Image2_1_in_17 = NULL; main_Image2_1_in_18 = NULL; main_Image2_1_in_19 = NULL; main_Image2_1_in_20 = NULL; main_Image2_1_in_21 = NULL; main_Image2_1_in_22 = NULL; main_Image2_1_in_23 = NULL; main_Image2_1_in_24 = NULL; main_Image2_1_in_25 = NULL; main_Image2_1_in_26 = NULL; main_Image2_1_in_27 = NULL; main_Image2_1_in_28 = NULL; main_Image2_1_in_29 = NULL; main_Image2_1_in_31 = NULL; Executive("product version 3 1 4"); $sync main();