// // time: Wed Apr 24 07:49:24 1996 // // version: 3.0.0 (format), 3.1.0 (DX) // // // Begin MDF // MODULE ClosedIsosurface // CATEGORY Macros // DESCRIPTION "caps" any holes in an isosurface where the isosurface meets the boundary of the data // INPUT data; field; (none); data field // INPUT isovalue; scalar or scalar list; (none); isovalue to use for isosurface and boundary // INPUT larger_inside; value list or field; 1; larger values are inside (1) or outside(0) the isosurface? // INPUT invert_normals; value list or field; 1; invert the normals on the closing sections (1) or not (0) // OUTPUT surface; group; closed isosurface // End MDF // // comment: This macro "caps the holes" in an isosurface. These holes may be present if the isosurface intersects the boundary of the data set. The macro uses ShowBoundary, Band, and Include to determine the necessary caps for the isosurface. The user needs to specify whether the "inside" of the isosurface contains values larger than, or smaller than, the isovalue given. // comment: (C) COPYRIGHT International Business Machines Corp. 1996. // comment: All Rights Reserved. // comment: Licensed Materials - Property of IBM // comment: // comment: Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of IBM not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. // comment: // comment: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THE SOFTWARE, BOTH INDIVIDUALLY AND AS ONE OR MORE GROUPS, "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IBM DOES NOT WARRANT AGAINST THE INFRINGMENT OF PATENTS, COPYRIGHT OR ANY OTHER INTELLECTUAL PROPERTY RIGHTS OF OTHERS. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE, BOTH INDIVIDUALLY AND AS ONE OR MORE GROUPS, IS WITH YOU. // workspace: width = 601, height = 632 // layout: snap = 0, width = 50, height = 50, align = NN // macro ClosedIsosurface( data ,isovalue ,larger_inside = 1 ,invert_normals = 1 ) -> ( surface ) { // // node Input[1]: x = 24, y = 12, inputs = 0, label = Input // parameter: position = 1, name = 'data', value = ' ', descriptive = 0, description = 'data field', required = 1, visible = 1 // ClosedIsosurface_Input_1_out_1 = data; // // node Input[2]: x = 240, y = 22, inputs = 0, label = Input // parameter: position = 2, name = 'isovalue', value = ' ', descriptive = 0, description = 'isovalue to use for isosurface and boundary', required = 1, visible = 1 // ClosedIsosurface_Input_2_out_1 = isovalue; // // node Isosurface[1]: x = 46, y = 155, inputs = 6, label = Isosurface // ClosedIsosurface_Isosurface_1_out_1 = Isosurface( ClosedIsosurface_Input_1_out_1, ClosedIsosurface_Input_2_out_1, NULL, NULL, NULL, NULL ) [instance: 1, cache: 1]; // // node Input[4]: x = 269, y = 348, inputs = 0, label = Input // parameter: position = 4, name = 'invert_normals', value = '1', descriptive = 0, description = 'invert the normals on the closing sections (1) or not (0)', required = 0, visible = 1 // ClosedIsosurface_Input_4_out_1 = invert_normals; // // node Compute[2]: x = 272, y = 428, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0+1" // expression: value = a+1 // name[2]: value = a // ClosedIsosurface_Compute_2_out_1 = Compute( "$0+1", ClosedIsosurface_Input_4_out_1 ) [instance: 2, cache: 1]; // // node ShowBoundary[1]: x = 128, y = 158, inputs = 2, label = ShowBoundary // ClosedIsosurface_ShowBoundary_1_out_1 = ShowBoundary( ClosedIsosurface_Input_1_out_1, NULL ) [instance: 1, cache: 1]; // // node Input[3]: x = 350, y = 9, inputs = 0, label = Input // parameter: position = 3, name = 'larger_inside', value = '1', descriptive = 0, description = 'larger values are inside (1) or outside(0) the isosurface?', required = 0, visible = 1 // ClosedIsosurface_Input_3_out_1 = larger_inside; // // node Compute[4]: x = 442, y = 37, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0+1" // expression: value = a+1 // name[2]: value = a // ClosedIsosurface_Compute_4_out_1 = Compute( "$0+1", ClosedIsosurface_Input_3_out_1 ) [instance: 4, cache: 1]; // // node Switch[4]: x = 314, y = 169, inputs = 3, label = Switch // input[2]: defaulting = 0, visible = 1, type = 16777248, value = {"high"} // input[3]: defaulting = 0, visible = 1, type = 16777248, value = {"low"} // ClosedIsosurface_Switch_4_out_1 = Switch( ClosedIsosurface_Compute_4_out_1, {"high"}, {"low"} ) [instance: 4, cache: 1]; // // node Band[1]: x = 199, y = 236, inputs = 4, label = Band // input[4]: defaulting = 1, visible = 1, type = 32, value = "original" // ClosedIsosurface_Band_1_out_1 = Band( ClosedIsosurface_ShowBoundary_1_out_1, ClosedIsosurface_Input_2_out_1, NULL, ClosedIsosurface_Switch_4_out_1 ) [instance: 1, cache: 1]; // // node Switch[1]: x = 426, y = 169, inputs = 3, label = Switch // ClosedIsosurface_Switch_1_out_1 = Switch( ClosedIsosurface_Compute_4_out_1, NULL, ClosedIsosurface_Input_2_out_1 ) [instance: 1, cache: 1]; // // node Switch[2]: x = 528, y = 166, inputs = 3, label = Switch // ClosedIsosurface_Switch_2_out_1 = Switch( ClosedIsosurface_Compute_4_out_1, ClosedIsosurface_Input_2_out_1, NULL ) [instance: 2, cache: 1]; // // node Include[1]: x = 364, y = 359, inputs = 5, label = Include // ClosedIsosurface_Include_1_out_1 = Include( ClosedIsosurface_Band_1_out_1, ClosedIsosurface_Switch_1_out_1, ClosedIsosurface_Switch_2_out_1, NULL, NULL ) [instance: 1, cache: 1]; // // node Mark[1]: x = 520, y = 390, inputs = 2, label = Mark // input[2]: defaulting = 0, visible = 1, type = 32, value = "normals" // ClosedIsosurface_Mark_1_out_1 = Mark( ClosedIsosurface_Include_1_out_1, "normals" ) [instance: 1, cache: 1]; // // node Compute[1]: x = 521, y = 472, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "-$0" // expression: value = -a // name[2]: value = a // ClosedIsosurface_Compute_1_out_1 = Compute( "-$0", ClosedIsosurface_Mark_1_out_1 ) [instance: 1, cache: 1]; // // node Unmark[1]: x = 479, y = 552, inputs = 2, label = Unmark // ClosedIsosurface_Unmark_1_out_1 = Unmark( ClosedIsosurface_Compute_1_out_1, NULL ) [instance: 1, cache: 1]; // // node Switch[3]: x = 373, y = 463, inputs = 3, label = Switch // ClosedIsosurface_Switch_3_out_1 = Switch( ClosedIsosurface_Compute_2_out_1, ClosedIsosurface_Include_1_out_1, ClosedIsosurface_Unmark_1_out_1 ) [instance: 3, cache: 1]; // // node Collect[1]: x = 142, y = 484, inputs = 2, label = Collect // ClosedIsosurface_Collect_1_out_1 = Collect( ClosedIsosurface_Isosurface_1_out_1, ClosedIsosurface_Switch_3_out_1 ) [instance: 1, cache: 1]; // // node Output[1]: x = 125, y = 569, inputs = 1, label = Output // parameter: position = 1, name = 'surface', value = ' ', descriptive = 0, description = 'closed isosurface', required = 0, visible = 1 // surface = ClosedIsosurface_Collect_1_out_1; // network: end of macro body } ClosedIsosurface_Input_1_out_1 = NULL; ClosedIsosurface_Input_2_out_1 = NULL; ClosedIsosurface_Isosurface_1_out_1 = NULL; ClosedIsosurface_Input_4_out_1 = NULL; ClosedIsosurface_Compute_2_out_1 = NULL; ClosedIsosurface_ShowBoundary_1_out_1 = NULL; ClosedIsosurface_Input_3_out_1 = NULL; ClosedIsosurface_Compute_4_out_1 = NULL; ClosedIsosurface_Switch_4_out_1 = NULL; ClosedIsosurface_Band_1_out_1 = NULL; ClosedIsosurface_Switch_1_out_1 = NULL; ClosedIsosurface_Switch_2_out_1 = NULL; ClosedIsosurface_Include_1_out_1 = NULL; ClosedIsosurface_Mark_1_out_1 = NULL; ClosedIsosurface_Compute_1_out_1 = NULL; ClosedIsosurface_Unmark_1_out_1 = NULL; ClosedIsosurface_Switch_3_out_1 = NULL; ClosedIsosurface_Collect_1_out_1 = NULL;