// // time: Tue Apr 8 11:46:52 1997 // // version: 3.1.1 (format), 3.1.4 (DX Beta) // // // Begin MDF // MODULE CappedIsosurfaceMacro // CATEGORY Macros // DESCRIPTION new macro // INPUT volume; field; (no default); The volume of data // INPUT isovalue; scalar or scalar list; (no default); The isovalue // INPUT gradient[visible:0]; vector field; (no default); gradient field (see Isosurface) // INPUT flag[visible:0]; flag; (no default); whether to compute normals (see Isosurface) // INPUT direction[visible:0]; integer; (no default); how to orient normals (see Isosurface) // INPUT capDir; value list or string list or object; 1; Does the enclosed volume represent values below (1) or above (0) the isovalue? // OUTPUT capped_iso; object; capped isosurface // End MDF // // comment: CappedIsosurface is used to generate a closed isosurface where the openings resulting when the isosurface intersects the boundary of the volume are closed by caps generated from the volume boundary. // workspace: width = 803, height = 654 // layout: snap = 0, width = 50, height = 50, align = NN // macro CappedIsosurfaceMacro( volume ,isovalue ,gradient ,flag ,direction ,capDir = 1 ) -> ( capped_iso ) { // // node Input[1]: x = 461, y = 4, inputs = 0, label = Input // parameter: position = 1, name = 'volume', value = '(no default)', descriptive = 1, description = ' The volume of data', required = 0, visible = 1 // CappedIsosurfaceMacro_Input_1_out_1 = volume; // // node Input[5]: x = 523, y = 2, inputs = 0, label = Input // parameter: position = 2, name = 'isovalue', value = '(no default)', descriptive = 1, description = ' The isovalue', required = 0, visible = 1 // CappedIsosurfaceMacro_Input_5_out_1 = isovalue; // // node Input[6]: x = 583, y = 4, inputs = 0, label = Input // parameter: position = 3, name = 'gradient', value = '(no default)', descriptive = 1, description = ' gradient field (see Isosurface)', required = 0, visible = 0 // CappedIsosurfaceMacro_Input_6_out_1 = gradient; // // node Input[7]: x = 645, y = 3, inputs = 0, label = Input // parameter: position = 4, name = 'flag', value = '(no default)', descriptive = 1, description = ' whether to compute normals (see Isosurface)', required = 0, visible = 0 // CappedIsosurfaceMacro_Input_7_out_1 = flag; // // node Input[8]: x = 709, y = 5, inputs = 0, label = Input // parameter: position = 5, name = 'direction', value = '(no default)', descriptive = 1, description = ' how to orient normals (see Isosurface)', required = 0, visible = 0 // CappedIsosurfaceMacro_Input_8_out_1 = direction; // // node Isosurface[1]: x = 592, y = 220, inputs = 6, label = Isosurface // input[4]: visible = 1 // input[5]: visible = 1 // input[6]: visible = 1 // CappedIsosurfaceMacro_Isosurface_1_out_1 = Isosurface( CappedIsosurfaceMacro_Input_1_out_1, CappedIsosurfaceMacro_Input_5_out_1, NULL, CappedIsosurfaceMacro_Input_6_out_1, CappedIsosurfaceMacro_Input_7_out_1, CappedIsosurfaceMacro_Input_8_out_1 ) [instance: 1, cache: 1]; // // node Attribute[1]: x = 389, y = 249, inputs = 2, label = Attribute // input[2]: defaulting = 0, visible = 1, type = 32, value = "Isosurface value" // CappedIsosurfaceMacro_Attribute_1_out_1 = Attribute( CappedIsosurfaceMacro_Isosurface_1_out_1, "Isosurface value" ) [instance: 1, cache: 1]; // // node ShowBoundary[2]: x = 457, y = 137, inputs = 2, label = ShowBoundary // CappedIsosurfaceMacro_ShowBoundary_2_out_1 = ShowBoundary( CappedIsosurfaceMacro_Input_1_out_1, NULL ) [instance: 2, cache: 1]; // // node Refine[1]: x = 291, y = 216, inputs = 2, label = Refine // input[2]: defaulting = 0, visible = 1, type = 32, value = "triangles" // CappedIsosurfaceMacro_Refine_1_out_1 = Refine( CappedIsosurfaceMacro_ShowBoundary_2_out_1, "triangles" ) [instance: 1, cache: 1]; // // node Band[2]: x = 229, y = 315, inputs = 4, label = Band // input[2]: defaulting = 1, visible = 1, type = 5, value = 0.0 // input[4]: defaulting = 0, visible = 1, type = 32, value = "original" // CappedIsosurfaceMacro_Band_2_out_1 = Band( CappedIsosurfaceMacro_Refine_1_out_1, CappedIsosurfaceMacro_Attribute_1_out_1, NULL, "original" ) [instance: 2, cache: 1]; // // node Input[9]: x = 92, y = 260, inputs = 0, label = Input // parameter: position = 6, name = 'capDir', value = '1', descriptive = 0, description = ' Does the enclosed volume represent values below (1) or above (0) the isovalue?', required = 0, visible = 1 // CappedIsosurfaceMacro_Input_9_out_1 = capDir; // // node Inquire[1]: x = 21, y = 375, inputs = 3, label = Inquire // input[2]: defaulting = 0, visible = 1, type = 32, value = "is null + 1" // CappedIsosurfaceMacro_Inquire_1_out_1 = Inquire( CappedIsosurfaceMacro_Input_9_out_1, "is null + 1", NULL ) [instance: 1, cache: 1]; // // node Switch[1]: x = 99, y = 470, inputs = 3, label = Switch // input[3]: defaulting = 0, visible = 1, type = 67108863, value = 1 // CappedIsosurfaceMacro_Switch_1_out_1 = Switch( CappedIsosurfaceMacro_Inquire_1_out_1, CappedIsosurfaceMacro_Input_9_out_1, 1 ) [instance: 1, cache: 1]; // // node Compute[4]: x = 192, y = 493, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 == 1 ? 2 : 1" // expression: value = a == 1 ? 2 : 1 // name[2]: value = a // CappedIsosurfaceMacro_Compute_4_out_1 = Compute( "$0 == 1 ? 2 : 1", CappedIsosurfaceMacro_Switch_1_out_1 ) [instance: 4, cache: 1]; // // node Include[1]: x = 147, y = 402, inputs = 6, label = Include // input[2]: defaulting = 1, visible = 1, type = 5, value = 0.0 // CappedIsosurfaceMacro_Include_1_out_1 = Include( CappedIsosurfaceMacro_Band_2_out_1, CappedIsosurfaceMacro_Attribute_1_out_1, NULL, NULL, NULL, NULL ) [instance: 1, cache: 1]; // // node Include[2]: x = 323, y = 401, inputs = 6, label = Include // input[2]: defaulting = 1, visible = 1, type = 5, value = 0.0 // input[3]: defaulting = 1, visible = 1, type = 5, value = 0.0 // CappedIsosurfaceMacro_Include_2_out_1 = Include( CappedIsosurfaceMacro_Band_2_out_1, NULL, CappedIsosurfaceMacro_Attribute_1_out_1, NULL, NULL, NULL ) [instance: 2, cache: 1]; // // node Switch[2]: x = 628, y = 507, inputs = 3, label = Switch // CappedIsosurfaceMacro_Switch_2_out_1 = Switch( CappedIsosurfaceMacro_Compute_4_out_1, CappedIsosurfaceMacro_Include_1_out_1, CappedIsosurfaceMacro_Include_2_out_1 ) [instance: 2, cache: 1]; // // node Collect[3]: x = 435, y = 494, inputs = 2, label = Collect // CappedIsosurfaceMacro_Collect_3_out_1 = Collect( CappedIsosurfaceMacro_Switch_2_out_1, CappedIsosurfaceMacro_Isosurface_1_out_1 ) [instance: 3, cache: 1]; // // node Transmitter[1]: x = 38, y = 482, inputs = 1, label = Cap // Cap = CappedIsosurfaceMacro_Switch_1_out_1; // // node Receiver[1]: x = 555, y = 494, inputs = 1, label = Cap // CappedIsosurfaceMacro_Receiver_1_out_1[cache: 0] = Cap; // // node Options[1]: x = 478, y = 584, inputs = 5, label = Options // input[2]: defaulting = 0, visible = 1, type = 32, value = "Isosurface value" // input[4]: defaulting = 0, visible = 1, type = 32, value = "CappedIsosurface capDIr" // CappedIsosurfaceMacro_Options_1_out_1 = Options( CappedIsosurfaceMacro_Collect_3_out_1, "Isosurface value", CappedIsosurfaceMacro_Attribute_1_out_1, "CappedIsosurface capDIr", CappedIsosurfaceMacro_Receiver_1_out_1 ) [instance: 1, cache: 1]; // // node Output[1]: x = 643, y = 590, inputs = 1, label = Output // parameter: position = 1, name = 'capped_iso', value = ' ', descriptive = 0, description = ' capped isosurface', required = 0, visible = 1 // capped_iso = CappedIsosurfaceMacro_Options_1_out_1; // // decorator Annotate pos=(518,294) size=285x188 style(Label), value = // annotation user_begin: 371 // annotation user: We Band the ShowBoundary of // annotation user: the volume at the isovalue to // annotation user: divide the boundary surface neatly at // annotation user: the isocontour. We then use Include to // annotation user: remove the portion of the boundary // annotation user: surface either above or below the // annotation user: isovalue. We use the Isosurface value // annotation user: attribute of the Isosurface result so // annotation user: that if no isovalue is given we use the // annotation user: same value as Isosurface chose as // annotation user: the default. // annotation user_end: // // decorator Annotate pos=(0,25) size=437x108 style(Label), value = // annotation user_begin: 344 // annotation user: CappedIsosurface is used to generate a closed isosurface // annotation user: where the openings resulting when the isosurface intersects // annotation user: the boundary of the volume are closed by caps generated // annotation user: from the volume boundary. Only one isovalue may be given. // annotation user: An additional parameter selects whether the enclosed volume // annotation user: represents data values above or below the isovalue. // annotation user_end: // // decorator Annotate pos=(0,594) size=458x60 style(Label), value = // annotation user_begin: 150 // annotation user: We add the Isosurface value attribute ointo the output, and in // annotation user: addition add a CappedIsosurface capDir attribute containing the // annotation user: capDir parameter value. // annotation user_end: // network: end of macro body } CappedIsosurfaceMacro_Input_1_out_1 = NULL; CappedIsosurfaceMacro_Input_5_out_1 = NULL; CappedIsosurfaceMacro_Input_6_out_1 = NULL; CappedIsosurfaceMacro_Input_7_out_1 = NULL; CappedIsosurfaceMacro_Input_8_out_1 = NULL; CappedIsosurfaceMacro_Isosurface_1_out_1 = NULL; CappedIsosurfaceMacro_Attribute_1_out_1 = NULL; CappedIsosurfaceMacro_ShowBoundary_2_out_1 = NULL; CappedIsosurfaceMacro_Refine_1_out_1 = NULL; CappedIsosurfaceMacro_Band_2_out_1 = NULL; CappedIsosurfaceMacro_Input_9_out_1 = NULL; CappedIsosurfaceMacro_Inquire_1_out_1 = NULL; CappedIsosurfaceMacro_Switch_1_out_1 = NULL; CappedIsosurfaceMacro_Compute_4_out_1 = NULL; CappedIsosurfaceMacro_Include_1_out_1 = NULL; CappedIsosurfaceMacro_Include_2_out_1 = NULL; CappedIsosurfaceMacro_Switch_2_out_1 = NULL; CappedIsosurfaceMacro_Collect_3_out_1 = NULL; CappedIsosurfaceMacro_Transmitter_1_out_1 = NULL; CappedIsosurfaceMacro_Receiver_1_out_1 = NULL; CappedIsosurfaceMacro_Options_1_out_1 = NULL;