You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<figcaptionstyle="color:blue"(a)Quadricvisualization<a></a> <ahref="../../Cxx/Visualization/QuadricVisualization"title="QuadricVisualization"> See QuadricVisualization.cxx</a> and <ahref="../../Python/Visualization/QuadricVisualization"title="QuadricVisualization"> QuadricVisualization.py</a>.</figcaption>
41
+
<figcaptionstyle="color:blue"(a)Quadricvisualization<a></a> <ahref="https://kitware.github.io/vtk-examples/site/Cxx/Visualization/QuadricVisualization"title="QuadricVisualization"> See QuadricVisualization.cxx</a> and <ahref="https://kitware.github.io/vtk-examples/site/Python/Visualization/QuadricVisualization"title="QuadricVisualization"> QuadricVisualization.py</a>.</figcaption>
<figcaptionstyle="color:blue"><b>Figure 4-13</b>. Importing and exporting files in VTK. An importer creates a vtkRenderWindow that describes the scene. Exporters use an instance of vtkRenderWindow to obtain a description of the scene. <ahref="../../Cxx/IO/3DSImporter"title="3DSImporter"> See 3DSImporter.cxx</a> and <ahref="../../Python/IO/3DSImporter"title="3DSImporter"> 3DSImporter.py</a>.</figcaption>
362
+
<figcaptionstyle="color:blue"><b>Figure 4-13</b>. Importing and exporting files in VTK. An importer creates a vtkRenderWindow that describes the scene. Exporters use an instance of vtkRenderWindow to obtain a description of the scene. <ahref="https://kitware.github.io/vtk-examples/site/Cxx/IO/3DSImporter"title="3DSImporter"> See 3DSImporter.cxx</a> and <ahref="https://kitware.github.io/vtk-examples/site/Python/IO/3DSImporter"title="3DSImporter"> 3DSImporter.py</a>.</figcaption>
363
363
</figure>
364
364
365
365
**Figure 4-13** shows an image created from a *3D Studio* model and saved as a *Renderman* RIB file.
@@ -563,7 +563,7 @@ We will now demonstrate some of the features of the visualization pipeline with
<figcaptionstyle="color:blue"><b>Figure 4-19</b>. A simple sphere example. <ahref="../../Cxx/Rendering/ColoredSphere"title="ColoredSphere"> See ColoredSphere.cxx</a> and <ahref="../../Python/Rendering/ColoredSphere"title="ColoredSphere"> ColoredSphere.py</a>.</figcaption>
566
+
<figcaptionstyle="color:blue"><b>Figure 4-19</b>. A simple sphere example. <ahref="https://kitware.github.io/vtk-examples/site/Cxx/Rendering/ColoredSphere"title="ColoredSphere"> See ColoredSphere.cxx</a> and <ahref="https://kitware.github.io/vtk-examples/site/Python/Rendering/ColoredSphere"title="ColoredSphere"> ColoredSphere.py</a>.</figcaption>
567
567
</figure>
568
568
569
569
The execution of the pipeline occurs implicitly when we render the actor. Each actor asks its mapper to update itself. The mapper in turn asks its input to update itself. This process continues until a source object is encountered. Then the source will execute if modified since the last render.
@@ -587,7 +587,7 @@ The transform filter only operates on objects with explicit point coordinate rep
<figcaptionstyle="color:blue"><b>Figure 4-20</b>. The addition of a transform filter to the previous example. <ahref="../../Cxx/Rendering/TransformSphere"title="TransformSphere"> See TransformSphere.cxx</a> and <ahref="../../Python/Rendering/TransformSphere"title="TransformSphere"> TransformSphere.py</a>.</figcaption>
590
+
<figcaptionstyle="color:blue"><b>Figure 4-20</b>. The addition of a transform filter to the previous example. <ahref="https://kitware.github.io/vtk-examples/site/Cxx/Rendering/TransformSphere"title="TransformSphere"> See TransformSphere.cxx</a> and <ahref="https://kitware.github.io/vtk-examples/site/Python/Rendering/TransformSphere"title="TransformSphere"> TransformSphere.py</a>.</figcaption>
591
591
</figure>
592
592
593
593
The C++ compiler enforces the proper connections of sources, filters, and mappers. To decide which objects are compatible, we check the type specification of the SetInput() method. If the input object returns an output object or a subclass of that type, the two objects are compatible and may be connected.
@@ -601,7 +601,7 @@ The C++ compiler enforces the proper connections of sources, filters, and mapper
<figcaptionstyle="color:blue"><b>Figure 4-21</b>. An example of multiple inputs and outputs.<ahref="../../Cxx/Rendering/Mace"title="Mace"> See Mace.cxx</a> and <ahref="../../Python/Rendering/Mace"title="Mace"> Mace.py</a>.</figcaption>
604
+
<figcaptionstyle="color:blue"><b>Figure 4-21</b>. An example of multiple inputs and outputs.<ahref="https://kitware.github.io/vtk-examples/site/Cxx/Rendering/Mace"title="Mace"> See Mace.cxx</a> and <ahref="https://kitware.github.io/vtk-examples/site/Python/Rendering/Mace"title="Mace"> Mace.py</a>.</figcaption>
605
605
</figure>
606
606
607
607
The visualization network branches at vtkGlyph3D. If either branch is modified, then this filter will re-execute. Network updates must branch in both directions, and both branches must be up to date when vtkGlyph3D executes. These requirements are enforced by the Update() method, and pose no problem to the implicit execution method.
@@ -615,7 +615,7 @@ The visualization network branches at vtkGlyph3D. If either branch is modified,
<figcaptionstyle="color:blue"><b>Figure 4-22</b>. A network with a loop (LoopShrk.cxx). VTK 5.0 does not allow you to execute a looping visualization network; this was possible in previous versions of VTK.<ahref="../../Cxx/Visualization/LoopShrink"title="LoopShrink"> See LoopShrink.cxx</a> and <ahref="../../Python/Visualization/LoopShrink"title="LoopShrink"> LoopShrink.py</a>.</figcaption> </figure>
618
+
<figcaptionstyle="color:blue"><b>Figure 4-22</b>. A network with a loop (LoopShrk.cxx). VTK 5.0 does not allow you to execute a looping visualization network; this was possible in previous versions of VTK.<ahref="https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LoopShrink"title="LoopShrink"> See LoopShrink.cxx</a> and <ahref="https://kitware.github.io/vtk-examples/site/Python/Visualization/LoopShrink"title="LoopShrink"> LoopShrink.py</a>.</figcaption> </figure>
619
619
620
620
After vtkSphereSource generates an initial geometry (in response to a render request), the input of vtkShrinkFilter is changed to the output of the vtkElevationFilter. Because of the feedback loop, vtkShrinkFilter will always re-execute. Thus, the behavior of the network is to re-execute each time a render is performed. Because the shrink filter is reapplied to the same data, the polygons become smaller and smaller and eventually disappear.
<figcaption style="color:blue"><b>Figure 5-17</b>. Creation of polygonal cube. <a href="../../Cxx/GeometricObjects/Cube" title="Cube"> See Cube.cxx</a> and <a href="../../Python/GeometricObjects/Cube" title="Cube"> Cube.py</a>.</figcaption>
502
+
<figcaption style="color:blue"><b>Figure 5-17</b>. Creation of polygonal cube. <a href="https://kitware.github.io/vtk-examples/site/Cxx/GeometricObjects/Cube" title="Cube"> See Cube.cxx</a> and <a href="https://kitware.github.io/vtk-examples/site/Python/GeometricObjects/Cube" title="Cube"> Cube.py</a>.</figcaption>
503
503
</figure>
504
504
505
505
**Create a Polygonal Dataset.** In our first example we create a polygonal representation of a cube. The cube is defined by eight points and six quadrilateral faces. We also create eight scalar values associated with the eight vertices of the cube. **Figure 5-17** shows the key C++ code fragments used to create the data, and the resulting image.
@@ -529,7 +529,7 @@ The answer is no. Certain data objects in VTK are reference counted to conserve
<figcaption style="color:blue"><b>Figure 5-18</b>. Creating a image data dataset. Scalar data is generated from the equation for a sphere. Volume dimensions are 26^3. <a href="../../Cxx/StructuredPoints/Vol" title="Vol"> See Vol.cxx</a> and <a href="../../Python/StructuredPoints/Vol" title="Vol"> Vol.py</a>.</figcaption>
532
+
<figcaption style="color:blue"><b>Figure 5-18</b>. Creating a image data dataset. Scalar data is generated from the equation for a sphere. Volume dimensions are 26^3. <a href="https://kitware.github.io/vtk-examples/site/Cxx/StructuredPoints/Vol" title="Vol"> See Vol.cxx</a> and <a href="https://kitware.github.io/vtk-examples/site/Python/StructuredPoints/Vol" title="Vol"> Vol.py</a>.</figcaption>
533
533
</figure>
534
534
535
535
In this example we create scalar data along with the image data dataset. The scalar values are computed from the implicit function for a sphere
<figcaption style="color:blue"><b>Figure 5-19</b>. Creating a structured grid dataset of a semicylinder. Vectors are created whose magnitude is proportional to radius and oriented in tangential direction.<a href="../../Cxx/StructuredGrid/SGrid" title="SGrid"> See SGrid.cxx</a> and <a href="../../Python/StructuredGrid/SGrid" title="SGrid"> SGrid.py</a>.</figcaption>
576
+
<figcaption style="color:blue"><b>Figure 5-19</b>. Creating a structured grid dataset of a semicylinder. Vectors are created whose magnitude is proportional to radius and oriented in tangential direction.<a href="https://kitware.github.io/vtk-examples/site/Cxx/StructuredGrid/SGrid" title="SGrid"> See SGrid.cxx</a> and <a href="https://kitware.github.io/vtk-examples/site/Python/StructuredGrid/SGrid" title="SGrid"> SGrid.py</a>.</figcaption>
577
577
</figure>
578
578
579
579
We arbitrarily choose the number of points in the tangential direction to be thirteen, the number of points in the radial direction to be eleven, and the number of points in the axis direction to be eleven (i.e., dimensions are $13 \times 11 \times 11$).
@@ -597,7 +597,7 @@ The creation of a structured grid dataset is partially explicit and partially im
<figcaption style="color:blue"><b>Figure 5-20</b>. Creating a rectilinear grid dataset. The coordinates along each axis are defined using an instance of vtkDataArray.<a href="../../Cxx/RectilinearGrid/RGrid" title="RGrid"> See RGrid.cxx</a> and <a href="../../Python/RectilinearGrid/RGrid" title="RGrid"> RGrid.py</a>.</figcaption>
600
+
<figcaption style="color:blue"><b>Figure 5-20</b>. Creating a rectilinear grid dataset. The coordinates along each axis are defined using an instance of vtkDataArray.<a href="https://kitware.github.io/vtk-examples/site/Cxx/RectilinearGrid/RGrid" title="RGrid"> See RGrid.cxx</a> and <a href="https://kitware.github.io/vtk-examples/site/Python/RectilinearGrid/RGrid" title="RGrid"> RGrid.py</a>.</figcaption>
601
601
</figure>
602
602
603
603
For maximum flexibility when creating rectilinear grids, in VTK we use three vtkDataArray objects to define the axes arrays. This means that different native data type (e.g., unsigned char, int, float, and so on) can be used for each axes.
@@ -623,7 +623,7 @@ The topological dimension of the dataset is implied by the specified dimensions.
<figcaption style="color:blue"><b>Figure 5-21</b>. Creating a structured grid dataset of a semicylinder. Vectors are created whose magnitude is proportional to radius and oriented in tangential direction.<a href="../../Cxx/UnstructuredGrid/UGrid" title="UGrid"> See UGrid.cxx</a> and <a href="../../Python/UnstructuredGrid/UGrid" title="UGrid"> UGrid.py</a>.</figcaption>
626
+
<figcaption style="color:blue"><b>Figure 5-21</b>. Creating a structured grid dataset of a semicylinder. Vectors are created whose magnitude is proportional to radius and oriented in tangential direction.<a href="https://kitware.github.io/vtk-examples/site/Cxx/UnstructuredGrid/UGrid" title="UGrid"> See UGrid.cxx</a> and <a href="https://kitware.github.io/vtk-examples/site/Python/UnstructuredGrid/UGrid" title="UGrid"> UGrid.py</a>.</figcaption>
627
627
</figure>
628
628
629
629
To summarize the process of creating an instance of vtkUnstructuredGrid, we follow five steps. We assume the name of vtkUnstructuredGrid instance is ugrid.
0 commit comments