VTK learning notes: visual model

Visual model
Graphical model the main function of the graphics is used to describe the geometry of the scene, the main effect of visual line is the geometry data (such as the cube of the vertex coordinates) into a graphical data and is responsible for the construction of geometry, VTK using the geometry data into a data flow through the graphic data, there are two main basic classes and associated data transformation, they are vtkDataObject classes and class vtkProcessObject.
Data objects represent various types of data, VTKDataObject can be thought of as a binary chunk (BLOB) of data, and structured data can be thought of as a dataset (DataSet) (VTKDataSet class).
Process objects, also known as filters, process data objects according to some algorithm and optimize the data of data objects. Process objects represent the geometric shapes in the system. Data objects and process objects are connected together to form visualization
Pipelining (for example, a data flow network), Figure 1-4 is a description of a visual process.

Visual application with VTK is very convenient, it includes two basic parts. Firstly, an appropriate target graph is established to illustrate the data. Second, a data pipeline is created to process the data. Pipelines connect sources, Filters, and Mappers. The visualization model of VTK mainly includes two types of objects:
(1) Data objects
(a) Polygonal data (VTKployData): Represents geometry composed of vertices, lines, polygons, i.e. triangular surfaces, and supports a variety of atomic types, such as VTKvertex, VTK-ployvertex, VTKline, etc.
(b) StructurePoint Data (VTKStructurePoint): It is a geometry including surface shape and geometric shape.
(c) Unstructured point data (VTKUNSTRUCTUREPOINT): Specifies the appearance of the geometry; StructureGrid (VTKStructureGrid): Specifies the structure of the geometry.
(d) Unstructured Grid (VTKUNSTRUCTUREGRID): It can be a combination of any cell type.
(e) Data object inheritance relationships.
(2) Process objects
Process objects defined in VTK mainly include sources, Filters, Mappers, and data pipelines according to their Pipeline.
Source: VTKSource is the base class for all data sources, and its subclasses define many data Source types.
VTKFilter is the base class of various Filters, derived from VTKSource. It receives data from the Source and performs different Filter processing. Filters are the main components of VTK, and many subclasses are derived from its base class to implement graphical algorithms. To encapsulate it, users only need to write a simple program interface call, and can change the parameters to achieve the desired effect;
Mappers: VTKMapper is the base class for all Mappers, taking data from Filtes and mapping it to base primitives in the graphics library. There are multiple inheritance subclasses, depending on how you map.
 
To here, understand how the VTK display images, the general principle of the introduction of almost.
Since my research is 3D reconstruction of images, I still focus on data processing and analysis. For example, controlling the camera, controlling the light source and controlling the objects in the scene are all controlling the display effect, which does not involve the data processing of reconstruction, so it is directly passed.


Read More: