Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
xml_script [2026/07/22 02:27] hermann |
xml_script [2026/07/22 20:27] (current) hermann |
||
|---|---|---|---|
| Line 48: | Line 48: | ||
| Each element in the DTD corresponds directly to a piece of the underlying functor graph described in [[basic_data_flow|Basic Data Flow]]: | Each element in the DTD corresponds directly to a piece of the underlying functor graph described in [[basic_data_flow|Basic Data Flow]]: | ||
| - | * ''script'' is the model as a whole — the root element, holding the model's own properties plus every top-level functor and container. | + | * ''script'' is the model as a whole — the root element, holding the model's own properties plus every top-level functor and container. |
| * ''functor'' is a single functor call, identified by its ''name'' attribute (such as ''LoadMap''). It holds its own properties, its input ports, and its output ports. | * ''functor'' is a single functor call, identified by its ''name'' attribute (such as ''LoadMap''). It holds its own properties, its input ports, and its output ports. | ||
| - | * ''containerfunctor'' is a functor that also holds nested functors and containers — the same element type can nest inside itself, since containers can be placed inside other containers. | + | * ''containerfunctor'' is a functor that also holds nested functors and containers — the same element type can nest inside itself, since containers can be placed inside other containers. |
| - | * ''property'' attaches metadata to whatever element contains it, as a ''key''/''value'' pair. Keys are always written fully expanded — there is no property alias as in the [[ego_script|EGO Script]] format. | + | * ''property'' attaches metadata to whatever element contains it, as a ''key''/''value'' pair. Keys are always written fully expanded — there is no property alias as in the [[ego_script|EGO Script]] format. |
| - | * ''inputport'' and ''outputport'' are a functor's connection points. An ''outputport'' declares an ''id''; an ''inputport'' elsewhere in the document references that ''id'' through its own ''peerid'' attribute to form a connection — the XML equivalent of two functors sharing a variable name in EGO Script. | + | * ''inputport'' and ''outputport'' are a functor's connection points. An ''outputport'' declares an ''id''; an ''inputport'' elsewhere in the document references that ''id'' through its own ''peerid'' attribute to form a connection — the XML equivalent of two functors sharing a variable name in EGO Script. |
| * ''internalinputport'' and ''internaloutputport'' work the same way, but connect a container to the functors nested inside it, rather than connecting two ordinary functors to each other. | * ''internalinputport'' and ''internaloutputport'' work the same way, but connect a container to the functors nested inside it, rather than connecting two ordinary functors to each other. | ||
| + | |||
| + | The DTD defines no equivalent of EGO Script's abbreviated calculator syntax. Every functor in the Calculate family — ''CalculateMap'', ''CalculateLookupTableValues'', and the others — is represented the same way as any other container: its operands are connected through explicit ''NumberMap''/''NumberTable''/''NumberValue'' hook functors, as shown in the ''CalculateMap'' example below. See [[ego_script#calculator_functor_shorthand|Calculator functor shorthand]] for the two syntactic forms EGO Script provides for this same underlying structure. | ||
| ==== Example ==== | ==== Example ==== | ||
| Line 66: | Line 68: | ||
| <property key="dff.version" value="8.12.0.20260626" /> | <property key="dff.version" value="8.12.0.20260626" /> | ||
| <property key="metadata.author" value="Dinamica EGO Team" /> | <property key="metadata.author" value="Dinamica EGO Team" /> | ||
| - | <property key="metadata.description" value="This is an example of map algebra expression written in Dinamica’s Calculate Map functor. This functor also performs contextual image operation, such as edge detection filters using nbConvol expression." /> | + | <property key="metadata.description" value="This is an example of map algebra expression written in Dinamica’s Calculate Map functor. This functor also performs contextual image operation, such as edge detection filters using nbConvol expression." /> |
| <property key="metadata.organization" value="CSR / UFMG" /> | <property key="metadata.organization" value="CSR / UFMG" /> | ||
| <property key="metadata.showproperties" value="yes" /> | <property key="metadata.showproperties" value="yes" /> | ||
| <property key="metadata.title" value="Apply Edge Detection Convolution Easier" /> | <property key="metadata.title" value="Apply Edge Detection Convolution Easier" /> | ||
| <functor name="LoadMap"> | <functor name="LoadMap"> | ||
| - | <property key="dff.functor.alias" value="input map" /> | + | <property key="dff.functor.alias" value="Input Map" /> |
| <inputport name="filename">"C:/Desenvolvimento/Centro-De-Sensoriamento-Remoto/lesson1/amazon_states.tif"</inputport> | <inputport name="filename">"C:/Desenvolvimento/Centro-De-Sensoriamento-Remoto/lesson1/amazon_states.tif"</inputport> | ||
| <inputport name="nullValue">.none</inputport> | <inputport name="nullValue">.none</inputport> | ||
| Line 89: | Line 91: | ||
| </functor> | </functor> | ||
| <functor name="SaveMap"> | <functor name="SaveMap"> | ||
| - | <property key="dff.functor.alias" value="saved map" /> | ||
| <inputport name="map" peerid="v3" /> | <inputport name="map" peerid="v3" /> | ||
| <inputport name="filename">"C:/Desenvolvimento/Centro-De-Sensoriamento-Remoto/dinamica/Release/output.ers"</inputport> | <inputport name="filename">"C:/Desenvolvimento/Centro-De-Sensoriamento-Remoto/dinamica/Release/output.ers"</inputport> | ||
| Line 99: | Line 100: | ||
| </functor> | </functor> | ||
| <containerfunctor name="CalculateMap"> | <containerfunctor name="CalculateMap"> | ||
| - | <property key="dff.functor.alias" value="edge map" /> | + | <property key="dff.functor.alias" value="Edge Map" /> |
| <property key="dff.functor.comment" value="Image convolution in Dinamica EGO" /> | <property key="dff.functor.comment" value="Image convolution in Dinamica EGO" /> | ||
| <inputport name="expression">[ nbConvol(i1, t1, 3, 3) ]</inputport> | <inputport name="expression">[ nbConvol(i1, t1, 3, 3) ]</inputport> | ||
| Line 126: | Line 127: | ||
| @version = 8.12.0.20260626 | @version = 8.12.0.20260626 | ||
| @author = Dinamica EGO Team | @author = Dinamica EGO Team | ||
| - | @description = This is an example of map algebra expression written in Dinamica’s Calculate Map functor. This functor also performs contextual image operation, such as edge detection filters using nbConvol expression. | + | @description = This is an example of map algebra expression written in Dinamica’s Calculate Map functor. This functor also performs contextual image operation, such as edge detection filters using nbConvol expression. |
| @organization = CSR / UFMG | @organization = CSR / UFMG | ||
| @showproperties = yes | @showproperties = yes | ||
| @title = Apply Edge Detection Convolution Easier | @title = Apply Edge Detection Convolution Easier | ||
| Script {{ | Script {{ | ||
| - | @alias = input map | ||
| inputMap := LoadMap "C:/Desenvolvimento/Centro-De-Sensoriamento-Remoto/lesson1/amazon_states.tif" .none .default 0 .none .none .none .none .none .none; | inputMap := LoadMap "C:/Desenvolvimento/Centro-De-Sensoriamento-Remoto/lesson1/amazon_states.tif" .none .default 0 .none .none .none .none .none .none; | ||
| Line 142: | Line 142: | ||
| // Image convolution in Dinamica EGO | // Image convolution in Dinamica EGO | ||
| - | @alias = edge map | ||
| edgeMap := # [ | edgeMap := # [ | ||
| nbConvol(#inputMap, %lookupTable0, 3, 3) | nbConvol(#inputMap, %lookupTable0, 3, 3) | ||
| ] .int32 0 .no .none; | ] .int32 0 .no .none; | ||
| - | @alias = saved map | ||
| SaveMap edgeMap "C:/Desenvolvimento/Centro-De-Sensoriamento-Remoto/dinamica/Release/output.ers" 0 .none .yes .none .yes; | SaveMap edgeMap "C:/Desenvolvimento/Centro-De-Sensoriamento-Remoto/dinamica/Release/output.ers" 0 .none .yes .none .yes; | ||
| }}; | }}; | ||
| </code> | </code> | ||