:topic: Creating Data Views

.. index::
   triple: DREAM3D-NX; Visualization; Creating Data Views

.. _ApplyingReps:

Creating Data Views
##############################

**In this tutorial, we will be covering the various types of
representations that can be applied to geometries and filters.**

The available representations are:

-  **Outline**
-  **Points**
-  **Wireframe**
-  **Surface**
-  **2D Image/Slice**
-  **Volume**

Outline Representation
==============================

Outline provides a basic, non-detailed view of the data by rendering
only the bounding box of the geometry. It’s a useful way to see the
overall extent and position of the dataset without visualizing its
detailed structure.

.. image:: Images/60_ApplyingRepresentations/OutlineRep.png

The Outline representation has the following controls:

.. image:: Images/60_ApplyingRepresentations/OutlineRepControls.png

1. **Detach** - Detaches the color map from the geometry level so that a
   separate color map can be set on this representation.
2. **Solid Color** - Use this to pick a solid color to color the
   representation with.
3. **Opacity** - Sets the opacity for the representation, which allows
   the adjustment of the transparency of the representation.
4. **Show Data Axes Grid** - Displays an XYZ grid showing where the
   bounds of the representation start and end.
5. **Line Size** - Sets the line size for the representation
6. **Render Lines As Tubes** - Renders the lines as tubes, which can
   make it easier to see the lines.

Points Representation
==============================

Points representation displays the data as a set of individual points at
the vertices of the dataset. This can be useful when you want to see the
distribution of points or focus on specific locations within the data
without considering the connections between them.

+-----------------------------------+-----------------------------------+
| Points Representation             | Points Representation (Zoomed)    |
+===================================+===================================+
| |image1|                          | |image2|                          |
+-----------------------------------+-----------------------------------+

The Points representation has the following controls:

.. image:: Images/60_ApplyingRepresentations/PointsRepControls.png

1.  **Detach** - Detaches the color map from the geometry level so that
    a separate color map can be set on this representation.
2.  **Solid Color** - Use this to pick a solid color to color the
    representation with.
3.  **NaN Color** - Use this to change the color of NaN values.
4.  **Color By Array** - Pick the data array that will be used to color
    the dataset.
5.  **Color By Component** - Pick the data array component that will be
    used to color the dataset.
6.  **Preset** - Pick a preset color mapping (only usable if *Detach* is
    turned on).
7.  **Invert** - Invert the current color mapping (only usable if
    *Detach* is turned on).
8.  **Scale To Data** - Scale the data's color mapping to the ranges in 
    the actve color by array
9.  **Custom Range** - Scale the data's color mapping to a custom user 
    defined range.
10. **Map Scalars** - Maps scalar values in a dataset to colors using
    the selected color map. When enabled, it translates scalar data into
    visual form, allowing variations in the data to be observed through
    color.
11. **Opacity** - Sets the opacity for the representation, which allows
    the adjustment of the transparency of the representation.
12. **Show Data Axes Grid** - Displays an XYZ grid showing where the
    bounds of the representation start and end.
13. **Show Color Legend** - Shows/hides the color legend, the vertical
    bar to the right of the dataset.
14. **Point Size** - Sets the point size that all the points in the
    representation will use.
15. **Render Points As Spheres** - Renders the points as spheres, which
    can make it easier to see all the points.
16. **Default Settings** - Use this to save the current values of all the 
    settings (not specific to arrays) in the selected item as the default values 
    when adding a new point representation. You can restore these values back 
    to the application's default at any time by clicking the reset button in 
    the pop up dialog that appears when you press the button.

Wireframe Representation
==============================


Wireframe representation visualizes the data as lines connecting the
vertices, forming edges and faces but without filling them. It gives an
impression of the 3D structure and connectivity of the data without
obscuring the view of what might be inside.

+-----------------------------------+-----------------------------------+
| Wireframe Representation          | Wireframe Representation (Zoomed) |
+===================================+===================================+
| |image3|                          | |image4|                          |
+-----------------------------------+-----------------------------------+

The Wireframe representation has the following controls:

.. image:: Images/60_ApplyingRepresentations/WireframeRepControls.png

1.  **Detach** - Detaches the color map from the geometry level so that
    a separate color map can be set on this representation.
2.  **Solid Color** - Use this to pick a solid color to color the
    representation with.
3.  **NaN Color** - Use this to change the color of NaN values.
4.  **Color By Array** - Pick the data array that will be used to color
    the dataset.
5.  **Color By Component** - Pick the data array component that will be
    used to color the dataset.
6.  **Preset** - Pick a preset color mapping (only usable if *Detach* is
    turned on).
7.  **Invert** - Invert the current color mapping (only usable if
    *Detach* is turned on).
8.  **Scale To Data** - Scale the data's color mapping to the ranges in 
    the actve color by array
9.  **Custom Range** - Scale the data's color mapping to a custom user 
    defined range.
10. **Map Scalars** - Maps scalar values in a dataset to colors using
    the selected color map. When enabled, it translates scalar data into
    visual form, allowing variations in the data to be observed through
    color.
11. **Opacity** - Sets the opacity for the representation, which allows
    the adjustment of the transparency of the representation.
12. **Line Size** - Sets the line size for the representation
13. **Render Lines As Tubes** - Renders the lines as tubes, which can
    make it easier to see the lines.
14. **Show Data Axes Grid** - Displays an XYZ grid showing where the
    bounds of the representation start and end.
15. **Show Color Legend** - Shows/hides the color legend, the vertical
    bar to the right of the dataset.
16. **Default Settings** - Use this to save the current values of all the 
    settings (not specific to arrays) in the selected item as the default values 
    when adding a new wireframe representation. You can restore these values back 
    to the application's default at any time by clicking the reset button in 
    the pop up dialog that appears when you press the button.

Surface Representation
==============================

Surface representation renders the exterior surfaces of the data as
filled cells, providing a complete view of the outer shape and contours.
It’s commonly used for visualizing the external form of simplnx
geometries.

.. image:: Images/60_ApplyingRepresentations/SurfaceRep.png

The Surface representation has the following controls:

.. image:: Images/60_ApplyingRepresentations/SurfaceRepControls.png

1.  **Detach** - Detaches the color map from the geometry level so that
    a separate color map can be set on this representation.
2.  **Solid Color** - Use this to pick a solid color to color the
    representation with.
3.  **NaN Color** - Use this to change the color of NaN values.
4.  **Color By Array** - Pick the data array that will be used to color
    the dataset.
5.  **Color By Component** - Pick the data array component that will be
    used to color the dataset.
6.  **Preset** - Pick a preset color mapping (only usable if *Detach* is
    turned on).
7.  **Invert** - Invert the current color mapping (only usable if
    *Detach* is turned on).
8.  **Scale To Data** - Scale the data's color mapping to the ranges in 
    the actve color by array
9.  **Custom Range** - Scale the data's color mapping to a custom user 
    defined range.
10. **Map Scalars** - Maps scalar values in a dataset to colors using
    the selected color map. When enabled, it translates scalar data into
    visual form, allowing variations in the data to be observed through
    color.
11. **Opacity** - Sets the opacity for the representation, which allows
    the adjustment of the transparency of the representation.
12. **Show Edges** - Shows the edges of the cells in the representation.
    This is equivalent to Paraview’s *Surface With Edges*
    representation.
13. **Line Size** - Sets the line size for the representation. This
    control is only enabled if *Show Edges* is enabled.
14. **Render Lines As Tubes** - Renders the lines as tubes, which can
    make it easier to see the lines.
15. **Show Data Axes Grid** - Displays an XYZ grid showing where the
    bounds of the representation start and end.
16. **Show Color Legend** - Shows/hides the color legend, the vertical
    bar to the right of the dataset.
17. **Default Settings** - Use this to save the current values of all the 
    settings (not specific to arrays) in the selected item as the default values 
    when adding a new surface representation. You can restore these values back 
    to the application's default at any time by clicking the reset button in 
    the pop up dialog that appears when you press the button.

2D Image/Slice Representation
==============================

2D Image/Slice is a specialized representation that cuts through the data using a plane
or other geometric shape, showing a cross-section. It allows you to
inspect internal structures at specific locations without the need to
render the whole volume, providing insight into what’s inside. *This representation
is achieved by texture mapping the data in the render window and thus it is recommended 
to use this representation wherever possible for (large) image geometries.*

.. image:: Images/60_ApplyingRepresentations/SliceRep.png

This representation has the following controls:

.. image:: Images/60_ApplyingRepresentations/SliceRepControls.png

1.  **Detach** - Detaches the color map from the geometry level so that
    a separate color map can be set on this representation.
2.  **Solid Color** - Use this to pick a solid color to color the
    representation with.
3.  **NaN Color** - Use this to change the color of NaN values.
4.  **Color By Array** - Pick the data array that will be used to color
    the dataset.
5.  **Color By Component** - Pick the data array component that will be
    used to color the dataset.
6.  **Preset** - Pick a preset color mapping (only usable if *Detach* is
    turned on).
7.  **Invert** - Invert the current color mapping (only usable if
    *Detach* is turned on).
8.  **Scale To Data** - Scale the data's color mapping to the ranges in 
    the actve color by array
9.  **Custom Range** - Scale the data's color mapping to a custom user 
    defined range.
10. **Map Scalars** - Maps scalar values in a dataset to colors using
    the selected color map. When enabled, it translates scalar data into
    visual form, allowing variations in the data to be observed through
    color.
11. **Opacity** - Sets the opacity for the representation, which allows
    the adjustment of the transparency of the representation.
12. **Slice Direction** - Sets the 2D plane that the resulting slice
    will come from. Changing this control resets the *Slice Number*
    control.
13. **Slice Number** - Sets the slice number that will be shown on
    application of this filter.
14. **Show Data Axes Grid** - Displays an XYZ grid showing where the
    bounds of the representation start and end.
15. **Show Color Legend** - Shows/hides the color legend, the vertical
    bar to the right of the dataset.
16. **Default Settings** - Use this to save the current values of all the 
    settings (not specific to arrays) in the selected item as the default values 
    when adding a new slice representation. You can restore these values back 
    to the application's default at any time by clicking the reset button in 
    the pop up dialog that appears when you press the button.


Volume Representation
==============================

Volume representation visualizes the entire 3D structure, including
internal features, by mapping scalar values to color and opacity. It’s
often used with simplnx 3D data where understanding the internal
variations and structures is essential.

.. image:: Images/60_ApplyingRepresentations/VolumeRep.png

The Volume representation has the following controls:

.. image:: Images/60_ApplyingRepresentations/VolumeRepControls.png

1.  **Color By Array** - Pick the data array that will be used to color
    the dataset.
2.  **Color By Component** - Pick the data array component that will be
    used to color the dataset.
3.  **Reset** - Resets the *Color Table Line Graph* back to its default
    state.
4.  **Preset** - Pick a preset color mapping (for volume rendering only).
5.  **Invert** - Invert the current color mapping (for volume rendering only).
6.  **Scale To Data** - Scale the data's color mapping to the ranges in 
    the actve color by array
7.  **Color Table Line Graph** - Customize the visualization by using
    points on the line graph to adjust the color mapping.
8.  **Custom Data Range Sliders** - Scale the data's color mapping to a custom user 
    defined range.
9.  **Show Data Axes Grid** - Displays an XYZ grid showing where the
    bounds of the representation start and end.
10. **Show Color Legend** - Shows/hides the color legend, the vertical
    bar to the right of the dataset.
11. **Default Settings** - Use this to save the current values of all the 
    settings (not specific to arrays) in the selected item as the default values 
    when adding a new volume representation. You can restore these values back 
    to the application's default at any time by clicking the reset button in 
    the pop up dialog that appears when you press the button.


.. |image1| image:: Images/60_ApplyingRepresentations/PointsRep.png
.. |image2| image:: Images/60_ApplyingRepresentations/PointsRepZoom.png
.. |image3| image:: Images/60_ApplyingRepresentations/WireframeRep.png
.. |image4| image:: Images/60_ApplyingRepresentations/WireframeRepZoom.png