//
// time: Wed Apr 24 18:27:04 1996
//
// version: 2.0.2 (format), 2.1.0 (DX)
//
// MODULE main
// workspace: width = 1000, height = 1000
// layout: snap = 0, width = 50, height = 50, align = UL
//
macro main(
) -> (
) {
    // 
    // node Import[1]: x = 74, y = 55, inputs = 6, label = Import
    // input[1]: defaulting = 0, visible = 1, type = 32, value = "%DXFILE_"
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "%DATASET_"
    // input[3]: defaulting = 0, visible = 1, type = 32, value = "dx"
    //
main_Import_1_out_1 = 
    Import(
        main_Import_1_in_1,
        main_Import_1_in_2,
        main_Import_1_in_3,
        main_Import_1_in_4,
        main_Import_1_in_5,
        main_Import_1_in_6
    ) [instance: 1, cache: 1];
    // 
    // node Caption[3]: x = 292, y = 272, inputs = 9, label = Caption
    // input[1]: defaulting = 0, visible = 1, type = 32, value = "%DATASET_"
    //
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 AutoColor[1]: x = 91, y = 146, inputs = 10, label = AutoColor
    //
main_AutoColor_1_out_1,
main_AutoColor_1_out_2 = 
    AutoColor(
        main_Import_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 ColorBar[4]: x = 137, y = 240, inputs = 12, label = ColorBar
    //
main_ColorBar_4_out_1 = 
    ColorBar(
        main_AutoColor_1_out_2,
        main_ColorBar_4_in_2,
        main_ColorBar_4_in_3,
        main_ColorBar_4_in_4,
        main_ColorBar_4_in_5,
        main_ColorBar_4_in_6,
        main_ColorBar_4_in_7,
        main_ColorBar_4_in_8,
        main_ColorBar_4_in_9,
        main_ColorBar_4_in_10,
        main_ColorBar_4_in_11,
        main_ColorBar_4_in_12
    ) [instance: 4, cache: 1];
    // 
    // node Collect[21]: x = 207, y = 351, inputs = 2, label = Collect
    //
main_Collect_21_out_1 = 
    Collect(
        main_Caption_3_out_1,
        main_ColorBar_4_out_1
    ) [instance: 21, cache: 1];
    // 
    // node Collect[20]: x = 83, y = 341, inputs = 2, label = Collect
    //
main_Collect_20_out_1 = 
    Collect(
        main_AutoColor_1_out_1,
        main_Collect_21_out_1
    ) [instance: 20, cache: 1];
    // 
    // node Image[8]: x = 86, y = 433, inputs = 35, label = Image
    // input[1]: defaulting = 0, visible = 0, type = 1, value = 2
    // input[4]: defaulting = 0, visible = 0, type = 8, value = [0.769838 2.58829 1.61199]
    // input[5]: defaulting = 0, visible = 0, type = 8, value = [-6.98285 9.23504 13.8549]
    // input[6]: defaulting = 0, visible = 0, type = 5, value = 7.48144
    // input[7]: defaulting = 0, visible = 0, type = 1, value = 641
    // input[8]: defaulting = 0, visible = 0, type = 5, value = 1.037
    // input[9]: defaulting = 0, visible = 0, type = 8, value = [-0.235863 0.783586 -0.574771]
    // input[19]: defaulting = 0, visible = 0, type = 32, value = "Skalardaten1"
    // input[21]: defaulting = 0, visible = 0, type = 32, value = "tiff orient=portrait page=8.5x11.0 dpi=300"
    // input[22]: defaulting = 0, visible = 0, type = 1, value = 0
    // input[23]: defaulting = 1, visible = 0, type = 5, value = 26.4094
    // input[24]: defaulting = 0, visible = 0, type = 1, value = 1
    //
    // depth: value = 8
main_Image_8_out_1,
main_Image_8_out_2 = 
    Image(
        main_Image_8_in_1,
        main_Collect_20_out_1,
        main_Image_8_in_3,
        main_Image_8_in_4,
        main_Image_8_in_5,
        main_Image_8_in_6,
        main_Image_8_in_7,
        main_Image_8_in_8,
        main_Image_8_in_9,
        main_Image_8_in_10,
        main_Image_8_in_11,
        main_Image_8_in_12,
        main_Image_8_in_13,
        main_Image_8_in_14,
        main_Image_8_in_15,
        main_Image_8_in_16,
        main_Image_8_in_17,
        main_Image_8_in_18,
        main_Image_8_in_19,
        main_Image_8_in_20,
        main_Image_8_in_21,
        main_Image_8_in_22,
        main_Image_8_in_23,
        main_Image_8_in_24,
        main_Image_8_in_25,
        main_Image_8_in_26,
        main_Image_8_in_27,
        main_Image_8_in_28,
        main_Image_8_in_29,
        main_Image_8_in_30,
        main_Image_8_in_31,
        main_Image_8_in_32,
        main_Image_8_in_33,
        main_Image_8_in_34,
        main_Image_8_in_35
    ) [instance: 8, cache: 1];
// network: end of macro body
}
main_Import_1_in_1 = "%DXFILE_";
main_Import_1_in_2 = "%DATASET_";
main_Import_1_in_3 = "dx";
main_Import_1_in_4 = NULL;
main_Import_1_in_5 = NULL;
main_Import_1_in_6 = NULL;
main_Import_1_out_1 = NULL;
main_Caption_3_in_1 = "%DATASET_";
main_Caption_3_in_2 = NULL;
main_Caption_3_in_3 = NULL;
main_Caption_3_in_4 = NULL;
main_Caption_3_in_5 = NULL;
main_Caption_3_in_6 = NULL;
main_Caption_3_in_7 = NULL;
main_Caption_3_in_8 = NULL;
main_Caption_3_in_9 = NULL;
main_Caption_3_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_AutoColor_1_out_2 = NULL;
main_ColorBar_4_in_2 = NULL;
main_ColorBar_4_in_3 = NULL;
main_ColorBar_4_in_4 = NULL;
main_ColorBar_4_in_5 = NULL;
main_ColorBar_4_in_6 = NULL;
main_ColorBar_4_in_7 = NULL;
main_ColorBar_4_in_8 = NULL;
main_ColorBar_4_in_9 = NULL;
main_ColorBar_4_in_10 = NULL;
main_ColorBar_4_in_11 = NULL;
main_ColorBar_4_in_12 = NULL;
main_ColorBar_4_out_1 = NULL;
main_Collect_21_out_1 = NULL;
main_Collect_20_out_1 = NULL;
macro Image(
        useVector,
        object,
        where,
        to,
        from,
        width,
        resolution,
        aspect,
        up,
        options,
        AAenable = 1,
        AAlabels,
        AAticks,
        AAcorners,
        AAframe,
        AAadjust,
        AAcursor,
        RECenable = 1,
        RECfile,
        throttle,
        RECformat,
        perspective,
        viewAngle,
        buttonState = 1,
        buttonUpApprox = "none",
        buttonDownApprox = "none",
        buttonUpDensity = 1,
        buttonDownDensity = 1,
        renderMode = 1,
        backgroundColor,
        AAgrid,
        AAcolors,
        AAannotation,
        AAlabelscale,
        AAfont) -> (
        object,
        camera)
{
    autoCamera =
        AutoCamera(
            object,
            "front",
            object,
            resolution,
            aspect,
            [0,1,0],
            perspective,
            viewAngle,
            backgroundColor) [instance: 1];
    realCamera =
        Camera(
            to,
            from,
            width,
            resolution,
            aspect,
            up,
            perspective,
            viewAngle,
            backgroundColor) [instance: 1];
    camera = Switch(useVector, autoCamera, realCamera)[instance:1];
    AAobject =
        AutoAxes(
            object,
            camera,
            AAlabels,
            AAticks,
            AAcorners,
            AAframe,
            AAadjust,
            AAcursor,
            AAgrid,
            AAcolors,
            AAannotation,
            AAlabelscale,
            AAfont) [instance: 1];
    object = Switch(AAenable, object, AAobject)[instance:2];
    SWapproximation_options =
        Switch(
            buttonState,
            buttonUpApprox,
            buttonDownApprox) [instance: 3];
    SWdensity_options =
        Switch(
            buttonState,
            buttonUpDensity,
            buttonDownDensity) [instance: 4];
    HWapproximation_options =
        Format(
            "%s,%s",
            buttonDownApprox,
            buttonUpApprox) [instance: 1];
    HWdensity_options =
        Format(
            "%d,%d",
            buttonDownDensity,
            buttonUpDensity) [instance: 1];
    approximation_options = Switch(renderMode,
        SWapproximation_options, HWapproximation_options)[instance: 5];
    density_options = Switch(renderMode,
        SWdensity_options, HWdensity_options)[instance: 6];
    renderModeString = Switch(renderMode,
        "software", "hardware")[instance: 7];
    annoted_object =
        Options(
            object,
            "send boxes",
            0,
            "rendering approximation",
            approximation_options,
            "render every",
            density_options,
            "rendering mode",
            renderModeString) [instance: 1];
    NoRECobject, RECobject = Route(RECenable, annoted_object);
    Display(
        NoRECobject,
        camera,
        where,
        throttle) [instance: 1];
    image =
        Render(
            RECobject,
            camera) [instance: 1];
    Display(
        image,
        NULL,
        where,
        throttle) [instance: 2];
    WriteImage(
        image,
        RECfile,
        RECformat) [instance: 1];
}
main_Image_8_in_1 = 2;
main_Image_8_in_4 = [0.769838 2.58829 1.61199];
main_Image_8_in_5 = [-6.98285 9.23504 13.8549];
main_Image_8_in_6 = 7.48144;
main_Image_8_in_7 = 641;
main_Image_8_in_8 = 1.037;
main_Image_8_in_9 = [-0.235863 0.783586 -0.574771];
main_Image_8_in_10 = NULL;
main_Image_8_in_11 = NULL;
main_Image_8_in_12 = NULL;
main_Image_8_in_13 = NULL;
main_Image_8_in_14 = NULL;
main_Image_8_in_15 = NULL;
main_Image_8_in_16 = NULL;
main_Image_8_in_17 = NULL;
main_Image_8_in_19 = "Skalardaten1";
main_Image_8_in_20 = NULL;
main_Image_8_in_21 = "tiff orient=portrait page=8.5x11.0 dpi=300";
main_Image_8_in_22 = 0;
main_Image_8_in_23 = NULL;
main_Image_8_in_24 = 1;
main_Image_8_in_25 = NULL;
main_Image_8_in_26 = NULL;
main_Image_8_in_27 = NULL;
main_Image_8_in_28 = NULL;
main_Image_8_in_29 = NULL;
main_Image_8_in_30 = NULL;
main_Image_8_in_31 = NULL;
main_Image_8_in_32 = NULL;
main_Image_8_in_33 = NULL;
main_Image_8_in_34 = NULL;
main_Image_8_in_35 = NULL;
Executive("product version 2 1 0");
$sync;
main();

