Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lesson_3 [2019/08/13 12:52]
argemiro
lesson_3 [2020/02/13 21:08] (current)
danilo
Line 1: Line 1:
-{{ :logo_guidebook1.jpg?400 |}}+{{ :logo_logo.png?400 |}} 
 +\\
 \\ \\
 =====LESSON 3: Exploring the Map Viewer=====  ​ =====LESSON 3: Exploring the Map Viewer=====  ​
 \\ \\
-This lesson presents the **Dinamica EGO Map Viewer**, the tool designed to view and interpret map information. +The Dinamica EGO Map Viewer ​is a tool designed to view and interpret map information.
-\\+
 \\ \\
 The components of the **Map Viewer** interface are described in more detail in the following sections: The components of the **Map Viewer** interface are described in more detail in the following sections:
Line 10: Line 10:
 \\  \\ 
 === Main Window === === Main Window ===
- +\\ 
-The main window is where the most important ​information regarding the viewer state is located. On the left you have the toolbar ​related to the **viewer** state as a whole, on the right you have a list of loaded maps and tools to manage them. +The main window is where most information regarding the viewer state is located. On the left you have the toolbar ​of the Map Viewer ​as a whole, on the right you have a list of loaded maps and tools to manage them. 
 +\\
 {{ :​map_viewer:​map_viewer.jpg?​nolink |}} {{ :​map_viewer:​map_viewer.jpg?​nolink |}}
 \\ \\
 \\ \\
 +------
 === Toolbar === === Toolbar ===
-\\ 
 \\ \\
 Each toolbar button is described below: Each toolbar button is described below:
 +\\
 \\ \\
 {{:​map_viewer:​toolbar_num.png |}} {{:​map_viewer:​toolbar_num.png |}}
 1) Load new maps discarding the previous ones, load new maps at the top of the current map list, load new map replacing a selected one, load saved viewer state.\\ 1) Load new maps discarding the previous ones, load new maps at the top of the current map list, load new map replacing a selected one, load saved viewer state.\\
 \\ \\
-2) Save viewer state (save transformations,​ map stack settings, background color and movie maker settings.\\+2) Save viewer state (save transformations,​ map stack settings, background color and movie maker settings).\\
 \\ \\
 3) Save current visualization (including legend and overview map, if visible) as a bitmap image.\\ 3) Save current visualization (including legend and overview map, if visible) as a bitmap image.\\
Line 46: Line 47:
 12) Zoom to selection rectangle (selected rectangle will cover entire screen space available).\\ 12) Zoom to selection rectangle (selected rectangle will cover entire screen space available).\\
 \\ \\
-13) Pan (allow users to movement ​the current visualization area).\\+13) Pan (allow users to move the current visualization area).\\
 \\ \\
-14) Analise ​cells values in specified interval.\\+14) Analyze ​cells values in specified interval.\\
 \\ \\
-15) Previous view (if user is making many visualization steps, ​you can go back to last step using this button).\\  ​+15) Previous view (if the user is making many visualization steps, ​it is possible to go back to the last step using this button).\\  ​
 \\ \\
 16) Background color (change application background color).\\ 16) Background color (change application background color).\\
Line 57: Line 58:
 \\ \\
 18) Quit.\\ 18) Quit.\\
-====== Color Palette ​====== +\\ 
 +----- 
 +===== Color Palette ===== 
 +\\
 Allow users to select which color represents each cell in visualization area. Cells are first extracted from the map in their original values (in any range) and then re-sampled using the histogram curve. After that, their values fall in the [0, 255] range, which are mapped to palette colors. Allow users to select which color represents each cell in visualization area. Cells are first extracted from the map in their original values (in any range) and then re-sampled using the histogram curve. After that, their values fall in the [0, 255] range, which are mapped to palette colors.
 +\\ 
 +\\
 {{ :​map_viewer:​palette.png?​nolink&​500 |}} {{ :​map_viewer:​palette.png?​nolink&​500 |}}
 +\\
 +-----
 ===== Changing colors individually ===== ===== Changing colors individually =====
- +\\  
-{{:​map_viewer:​palette_color.png?​nolink&​|}} ​The color corresponding to each individual value can be changed by clicking on the corresponding color rectangle. You can also check color index value by hovering your cursor over the color rectangle. {{:​map_viewer:​palette_color_hover.png?​nolink&​|}} +The color corresponding to each individual value can be changed by clicking on the corresponding color rectangle. You can also check color index value by hovering your cursor over the color rectangle. 
- +\\  
-<note important>​Values changed by [[histogram|histogram transformation]] may not correspond to palette colors as expected, specially when the user is trying to edit the colors for specific cells/​categories. To avoid this issue, remove the histogram transformation (set them to None) before editing the colors for specific cell values.</​note>​+\\ 
 +{{ :​map_viewer:​palette_color_hover.png |}} 
 +\\ 
 +<note important>​ 
 +Values changed by [[histogram|histogram transformation]] may not correspond to palette colors as expected, specially when the user is trying to edit the colors for specific cells/​categories. To avoid this issue, remove the histogram transformation (set them to None) before editing the colors for specific cell values.</​note>​
 ===== Generated palette ===== ===== Generated palette =====
- +\\ 
-You can also create a palette using a linear interpolation between two color values (gradient). All you have to do is click the gradient button and set your range. +You can also create a color palette using a linear interpolation between two color values (gradient). All you have to do is click the gradient button and set your range. 
- +\\ 
-{{:​map_viewer:​palette_gradient.png?​nolink&​|}} +\\ 
 +{{ :​map_viewer:​palette_gradient.png?​nolink&​ |}} 
 +\\ 
 +\\
 After that, you can click the interpolate button and the new palette view be generated. After that, you can click the interpolate button and the new palette view be generated.
 +------
 ===== Saving your work ===== ===== Saving your work =====
- +\\ 
-Keep in mind that palettes are not saved until the user chooses to do so. If you made any mistake, you can just click "cancel" and try again. If you click Ok, the palette will be changed locally, but will reset if you restart the application. +Keep in mind that palettes are not saved until the user chooses to do so. If you made any mistake, you can just click "Cancel" and try again. If you click "Ok", the palette will be changed locally, but will reset if you restart the application. 
 +\\ 
 +\\
 Saved palettes are stored on the disk in the user palette folder ''​Dinamica EGO/​Dmps'',​ so every time you reopen the map viewer, you will still have them. Changes made by the users in predefined palettes only affect their own instance of the application. To reset the predefined palettes to their default state, remove the user palette folder and restart the application. Saved palettes are stored on the disk in the user palette folder ''​Dinamica EGO/​Dmps'',​ so every time you reopen the map viewer, you will still have them. Changes made by the users in predefined palettes only affect their own instance of the application. To reset the predefined palettes to their default state, remove the user palette folder and restart the application.
- +\\ 
-<note tip>Tip: Usually, but not always, the user palette folder is ''​C:​\Users\<​User Name>​\Documents\Dinamica EGO\Dmps''​ on Windows</​note>​ +<note tip> 
-====== Histogram Editor ​====== +Usually, but not always, the user palette folder is ''​C:​\Users\<​User Name>​\Documents\Dinamica EGO\Dmps''​ on Windows 
 +</​note>​ 
 +----- 
 +===== Histogram Editor ===== 
 +\\
 The histogram window is responsible for assigning transformations from image original values (in any range) to palette range [0, 255]. The histogram curve will adjust any value smaller than the "​From:"​ limit to 0, and any value greater than the "​To:"​ limit to 255. Any other values will be mapped using the histogram curve to the "​Y"​ coordinate on the color palette on the left. The histogram window is responsible for assigning transformations from image original values (in any range) to palette range [0, 255]. The histogram curve will adjust any value smaller than the "​From:"​ limit to 0, and any value greater than the "​To:"​ limit to 255. Any other values will be mapped using the histogram curve to the "​Y"​ coordinate on the color palette on the left.
 +\\ 
 +\\
 [{{ :​map_viewer:​histogram.png?​nolink&​ |Histogram editor}}] [{{ :​map_viewer:​histogram.png?​nolink&​ |Histogram editor}}]
-===== Transformations ​===== +\\ 
- +------ 
-  * **None**: This option does not apply any transformation,​ leaving cell values ​"as is". +==== Transformations ==== 
 +\\ 
 +  * **None**: This option does not apply any transformation,​ leaving cell value "​as ​it is".
   * **Linear**: Linearly maps values between the "​from"​ and "​to"​ ranges.   * **Linear**: Linearly maps values between the "​from"​ and "​to"​ ranges.
- 
   * **Equalize**:​ Constructs an appropriate curve based on [[wp>​Equalization]].   * **Equalize**:​ Constructs an appropriate curve based on [[wp>​Equalization]].
- +\\ 
-====== Load a map ====== +------ 
- +==== Load a map ==== 
-There are actually ​four options for loading maps (or a group of maps, if you hold the CTRL key while selecting the filenames on the file chooser): +\\ 
 +There are currently ​four options for loading maps (or a group of maps, if you hold the CTRL key while selecting the filenames on the file browser): 
 +\\ 
 +\\
 {{ :​imagem67.png?​700 |}} {{ :​imagem67.png?​700 |}}
 +\\
 ^ Load map (cleaning map list)  | Erase the current map list (label "​Maps"​ on main dialog). ​ | ^ Load map (cleaning map list)  | Erase the current map list (label "​Maps"​ on main dialog). ​ |
 ^ Load map (keeping map list)  | Load the new map at the top of the current map list. Every incompatible map (different number of lines or columns) will be turned off (made non-visible). Keep in mind that if you open a incompatible map, the current transformation will be erased and the  default transformation restored. ​ | ^ Load map (keeping map list)  | Load the new map at the top of the current map list. Every incompatible map (different number of lines or columns) will be turned off (made non-visible). Keep in mind that if you open a incompatible map, the current transformation will be erased and the  default transformation restored. ​ |
 ^ Load map on selection ​ | Load the new map replacing the selected map. This option is only available if there is a map selected. All transformations (histogram, palette, pan, zoom) will be left untouched. The new map will try to match the active map layer selection ​ | ^ Load map on selection ​ | Load the new map replacing the selected map. This option is only available if there is a map selected. All transformations (histogram, palette, pan, zoom) will be left untouched. The new map will try to match the active map layer selection ​ |
 ^ Load viewer state  | Load an stored viewer state from a file, replacing the map stack, the background color, current palettes, histogram transformations and everything else.  | ^ Load viewer state  | Load an stored viewer state from a file, replacing the map stack, the background color, current palettes, histogram transformations and everything else.  |
- +=== Map loaded, what now? === 
-===== Map loaded, ​so what? ===== +\\
 After your map is loaded, its name will displayed on the "​Maps"​ list on the right side of the map viewer interface. After your map is loaded, its name will displayed on the "​Maps"​ list on the right side of the map viewer interface.
 \\ \\
 \\ \\
-Initially, the settings ​corresponding to a loaded map are **Collapsed**. To expand the settings panel, just click on its corresponding "​expand arrow"​.+Initially, the setting ​corresponding to a loaded map is **Collapsed**. To expand the settings panel, just click on its corresponding "​expand arrow"​.
 \\ \\
 +As you can see, this button is just a toggle between "​normal"​ mode and "​category"​ mode. Enabling the category mode ignores the map transformation and uses the category colors instead. Also, when showing legends in category mode, category colors and names are displayed instead of the legend range.
 \\ \\
-After expanding the settings panel, your map will look like this on the map stack. For maps also providing category information,​ it will look like this: 
 \\ \\
 +------
 +==== Map information ====
 \\ \\
-{{ :imagem68.png?700 |}}+You can retrieve map information by clicking on the icon "​i"​ (Layer information).
 \\ \\
 \\ \\
-As you can see, this button is just a toggle between "​normal"​ mode and "​category"​ mode. Enabling the category mode ignores the map transformation and uses the category colors instead. Also, when showing legends in category mode, category colors and names are displayed instead of the legend range.+{{ :​map_viewer:​map_info.png?​nolink&​ |}}
 \\ \\
 +This information comes from Dinamica EGO itself, the available rows can vary from map to map.
 \\ \\
-===== Map information ===== 
- 
-You can retrieve map information by clicking on the icon "​i"​ (Layer information) 
- 
-{{ :​map_viewer:​map_info.png?​nolink&​ |}} 
- 
-This information comes from Dinamica EGO itself, the available rows can vary from map to map. 
- 
 <note tip> <note tip>
-Tip: It is possible to assign aliases to maps and map groups. You can set the alias on the top part of the information dialog.+It is possible to assign aliases to maps and map groups. You can set the alias on the top part of the information dialog.
 </​note>​ </​note>​
- +------ 
-===== Map functions ​===== +==== Map functions ==== 
- +\\ 
-The functions you have for **each** map are described below: +The functions you have for each map are described below: 
 +\\
 {{:​map_viewer:​loaded_map_buttons.png?​nolink&​ |}} {{:​map_viewer:​loaded_map_buttons.png?​nolink&​ |}}
-1) Change map layer. If your map has many layers, you can select the active layer to be shown. Only one layer can be use at time.\\+1) Change map layer. If your map has many layers, you can select the active layer to be shown. Only one layer can be used at time.\\
 2) Change map [[color_palette|palette]].\\ 2) Change map [[color_palette|palette]].\\
 3) Opacity (by default, viewer show opaque maps, but you can set a transparency threshold for better visualization).\\ 3) Opacity (by default, viewer show opaque maps, but you can set a transparency threshold for better visualization).\\
Line 148: Line 162:
 8) Toggle map visibility.\\ 8) Toggle map visibility.\\
 9) Remove map from [[map_viewer_interface|stack]]\\ 9) Remove map from [[map_viewer_interface|stack]]\\
-====== How to Make a Movie ====== +----- 
 +==== How to Make a Movie ==== 
 +\\
 Map Viewer can be used to generated movies (in [[wp>​MPEG-4_Part_14|mp4 format]]) from a set of maps. This is useful because: Map Viewer can be used to generated movies (in [[wp>​MPEG-4_Part_14|mp4 format]]) from a set of maps. This is useful because:
- +\\ 
-  * You can make presentations and display temporal changes in interactive way. +  * You can make presentations and display temporal changes in an interactive way.
   * Output movies can be read by any devices and/or applications that support mp4, it isn't tied to map formats or Dinamica EGO itself.   * Output movies can be read by any devices and/or applications that support mp4, it isn't tied to map formats or Dinamica EGO itself.
- 
   * Generated frames for movie can be saved separated in PNG, that way you can also use your favorite movie creation tool.   * Generated frames for movie can be saved separated in PNG, that way you can also use your favorite movie creation tool.
- 
-===== Movie files ===== 
- 
-On a computer, movies are just a series of frames (or pictures) that get replaced in a particular time frequency. 
 \\ \\
 +=== Movie files ===
 +\\
 +On a computer, movies are just a series of frames (or pictures) that are displayed in a particular order.
 +\\
 +Usually, when you see formats as (.mp4) it means that you have a set of images and a sound file tied together. Movies produced by the Map Viewer follow the same definition. The user is required to load the maps (which are going to be the images in the movie) ​wanted ​to be displayed and then configure the viewer main area as if it was the movie itself. Transformations (zoom, pan) are kept on the movie, as well as histogram curves, palettes for each images and transparency.
 +\\
 +=== Making a movie ===
 +\\
 +   - User load the maps to display on the movie. Check out [[Load a map]], if you are unsure about how to load maps.
 +   - Transformations are configured, [[histogram]] curves are defined and [[color palette]] set.
 +   - The movie maker is invoked.
 \\ \\
-Usually, when you see formats like (.mp4) it just means you have a set of images and a sound file tied together. With that in mind, movies produced by the Map Viewer follow the same definition. The user is required to load the maps (which are going to be the images in the movie) he wants to display and then configure the viewer main area as if it was the movie itself. Transformations (zoom, pan) are kept on the movie, as well as histogram curves, palettes for each images and transparency. 
- 
-===== Making a movie ===== 
- 
-  * User load the maps he/she wants to display on the movie. Check out [[Load a map]], if you are unsure about how to load maps. 
- 
-  * Transformations are configured, [[histogram]] curves are defined and [[color palette]] set. 
- 
-  * The movie maker is invoked. 
 {{ :​movie:​movie_maker_button.png?​nolink&​ |}} {{ :​movie:​movie_maker_button.png?​nolink&​ |}}
 +\\
   * As soon as the movie maker wizard pops up, the user is prompted to select frames to be replaced (left column) and frames to replace them after each frame (right column).   * As soon as the movie maker wizard pops up, the user is prompted to select frames to be replaced (left column) and frames to replace them after each frame (right column).
 +\\
 {{ :​movie:​movie_1.png?​nolink&​ |}} {{ :​movie:​movie_1.png?​nolink&​ |}}
- +\\ 
-  * Next, user configure ​the time between each frame (a preview of the replace speed will be shown).+  * Next, the user configures ​the time between each frame (a preview of the replace speed will be shown). 
 +\\
 {{ :​movie:​movie_2.png?​nolink&​ |}} {{ :​movie:​movie_2.png?​nolink&​ |}}
- +\\ 
-  * Finally, user select ​the final path for the output movie file (the .mp4) and if he/she desires to keep generated frames.+  * Finally, ​the user selects ​the final path for the output movie file (the .mp4) and if he/she desires to keep generated frames. 
 +\\
 {{ :​movie:​movie_3.png?​nolink&​ |}} {{ :​movie:​movie_3.png?​nolink&​ |}}
 +\\
   * After clicking next, the user will be prompted to wait while the movie is being generated.   * After clicking next, the user will be prompted to wait while the movie is being generated.
 {{ :​movie:​movie_4.png?​nolink&​ |}} {{ :​movie:​movie_4.png?​nolink&​ |}}
- +\\ 
-  ​* ​A good way to keep progress is to watch the changes in frame names, on the Map column in main interface. A notification will pop up when the process finishes.+<note tip> 
 +A good way to keep progress is to watch the changes in frame names, on the Map column in main interface. A notification will pop up when the process finishes. 
 +</​note>​ 
 +\\
 {{ :​movie:​movie_5.png?​nolink&​ |}} {{ :​movie:​movie_5.png?​nolink&​ |}}
-====== Map Alias ====== 
- 
-The Dinamica EGO Map Viewer now offers support for map aliases. By supporting map aliases, map viewer can assign more meaning to the information being displayed. 
 \\ \\
 +------
 +==== Map Alias ====
 +\\
 +The Dinamica EGO Map Viewer now offers support for map aliases. By supporting map aliases, map viewer can assign meaningful information to what is being displayed.
 +\\
 +\\
 +<note important>​
 +The aliases assigned by the map viewer are not used by other components of Dinamica EGO and have no impact on the simulations.
 +</​note>​
 +\\
 +-----
 +=== Setting up alias ===
 \\ \\
-<note important>​The aliases assigned by the map viewer are not used by other components of Dinamica EGO and have no impact on the simulations.</​note>​ 
- 
-===== Setting up alias ===== 
- 
   * You need a loaded map to assign an alias, if you are unsure about how to load maps, please check [[load_a_map|Load a map]].   * You need a loaded map to assign an alias, if you are unsure about how to load maps, please check [[load_a_map|Load a map]].
- 
   * With a map loaded, click on the information icon ({{:​map_viewer:​map_information_icon.png?​nolink&​|}}) to show selected map information.   * With a map loaded, click on the information icon ({{:​map_viewer:​map_information_icon.png?​nolink&​|}}) to show selected map information.
- 
   * A dialog will popup and you will be able to change the map alias by writing the new alias on the top text field.   * A dialog will popup and you will be able to change the map alias by writing the new alias on the top text field.
 +\\
 {{ :​map_viewer:​map_info.png?​nolink&​ |}} {{ :​map_viewer:​map_info.png?​nolink&​ |}}
 +\\
   * The alias will be changed when you hit the "Apply map alias" ({{:​map_viewer:​apply_map_alias.png?​nolink&​|}}) or "​Restore original alias" ({{:​map_viewer:​restore_original_alias.png?​nolink&​|}}) icons.   * The alias will be changed when you hit the "Apply map alias" ({{:​map_viewer:​apply_map_alias.png?​nolink&​|}}) or "​Restore original alias" ({{:​map_viewer:​restore_original_alias.png?​nolink&​|}}) icons.
- 
   * You can also change the map alias by double clicking the map name/alias on the "​Maps"​ window.   * You can also change the map alias by double clicking the map name/alias on the "​Maps"​ window.
 +\\
 {{ :​map_viewer:​change_alias.gif?​nolink&​ |}} {{ :​map_viewer:​change_alias.gif?​nolink&​ |}}
 +\\
   * After changing the map alias, you will see the new alias every time a map filename would be shown instead (legend, map information dialog, movie maker).   * After changing the map alias, you will see the new alias every time a map filename would be shown instead (legend, map information dialog, movie maker).
 +\\
 {{ :​map_viewer:​map_alias_showing.png?​nolink&​ |}} {{ :​map_viewer:​map_alias_showing.png?​nolink&​ |}}
-====== Command Line ====== 
- 
-The map viewer can be used as a command line tool to load "​.egov"​ files and save the resulting "​.png"​ image representing the stack of maps. 
 \\ \\
 +-----
 +==== Command Line ====
 +\\
 +The map viewer can be used as a command line tool to load "​.egov"​ files and save the resulting "​.png"​ image representing the stack of maps.
 \\ \\
- 
 The command line syntax is: The command line syntax is:
- +\\ 
-  "<​Folder where Dinamica EGO is installed>​\DinamicaMapViewer"​ <egov filename>​ <​resulting png filename>​ [png width] [png height] +''​"<​Folder where Dinamica EGO is installed>​\DinamicaMapViewer"​ <egov filename>​ <​resulting png filename>​ [png width] [png height]''​ 
 +\\
 ^ Parameter ^  Description ​ ^ ^ Parameter ^  Description ​ ^
 | egov filename ​ | The filename where the egov file is located. ​ | | egov filename ​ | The filename where the egov file is located. ​ |
Line 231: Line 250:
  
 Example: Example:
-   +\\   
-  "​C:​\Program Files\Dinamica EGO\DinamicaMapViewer"​ "​c:​\Maps\maps.egov"​ "​c:​\Outputs\result.png"​ 800 600 +''​"​C:​\Program Files\Dinamica EGO\DinamicaMapViewer"​ "​c:​\Maps\maps.egov"​ "​c:​\Outputs\result.png"​ 800 600''​ 
 +\\ 
 +\\ 
 +Congratulations,​ you have successfully completed this lesson! 
 +\\ 
 +\\ 
 +☞[[:​lesson_4 | Next Lesson]] 
 +\\ 
 +☞[[:​guidebook_start| Back to Guidebook Start]] ​