CN110211212A - A kind of electromagnet data interaction formula visual analysis method based on VTK - Google Patents
A kind of electromagnet data interaction formula visual analysis method based on VTK Download PDFInfo
- Publication number
- CN110211212A CN110211212A CN201910484475.5A CN201910484475A CN110211212A CN 110211212 A CN110211212 A CN 110211212A CN 201910484475 A CN201910484475 A CN 201910484475A CN 110211212 A CN110211212 A CN 110211212A
- Authority
- CN
- China
- Prior art keywords
- class
- data
- parameter
- volume data
- function
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/50—Lighting effects
- G06T15/506—Illumination models
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
The electromagnet data interaction formula visual analysis method based on VTK that the present invention relates to a kind of, has built an electromagnet data interaction formula visual analysis system using VTK visual post process.Volume data gray distribution features are obtained by electromagnet data gray statistic histogram first, and threshold value, opacity and the color of contour surface are set accordingly, realize the Interactive Design of more contour surfaces, then the field strength distribution that function allows user to explore plane interested is sliced by multi-angle, then providing interactive marking Function for user be added to user can in render scenes analysis result as three dimensional indicia, finally enhance hatching effect using illumination design module, realizes multiple view, the high quality, interactive visual analysis of electromagnetism volume data.
Description
Technical field
The invention belongs to the iso-surface patch field of volume data, it is related to a kind of electromagnet data interaction formula based on VTK and visually divides
Analysis method.
Background technique
Iso-surface patch is a kind of important method of volume visualization, basic thought be by volume data field it is all be equal to
The data point for determining data value is found out, these points are then connected into face using geometric graphic element, this method and has rendering speed
The advantages that degree is very fast, occupying system resources are less.The feature of iso-surface patch maximum is to use surface fitting technology, in three-dimensional data
Contour surface is generated in, the drafting of 3-D image is carried out in conjunction with illumination model and texture model.
VTK is a for three dimensional computer graphics, image procossing and visual Software Development Kit.It is
Design and implementation on the basis of Object-Oriented Theory, kernel are constructed using C Plus Plus, are almost supported all at present
Mainstream operation system platform.The process of VTK program can be divided into visualization pipeline and rendering engine two parts, wherein visualizing pipeline
Including Source, Filter and Mapper three parts, Source refers to the general designation of the class for creating data or reading data,
Data are further processed in Filter, and Mapper converts data to geometric graphic element, and rendering engine then manages visualization
The data that line is sent into carry out Visualization, the final visualization for realizing science data.And VTK encapsulates many common calculations
Method greatly improves opening for user wherein just there is the common marching cubes algorithm of iso-surface patch (MC, Marching Cube)
Send out efficiency.
Iso-surface patch is one of important method of volume visualization, and VTK (Visualization Toolkit, visualization
Tool box) it is an efficient visual post process, both combination can be built to the volume visualization platform of profession.Needle
It is less to spatial electromagnetic volume data research to existing iso-surface patch system, and system interactive is not strong, user can not effectively carry out can
The problems such as depending on analysis.
Summary of the invention
Technical problems to be solved
In order to avoid the shortcomings of the prior art, the present invention proposes that a kind of electromagnet data interaction formula based on VTK can
Depending on analysis method, an electromagnet data interaction formula visual analysis method and step has been built using VTK, electromagnetic data face has been solved and draws
The problem that system display effect processed is single, interactivity is poor.
Technical solution
A kind of electromagnet data interaction formula visual analysis method based on VTK, it is characterised in that steps are as follows:
Step 1: initial body data is read by the vtkImageReader class in VTK Software Development Kit, it is then right
The data of importing carry out Laplce's smoothing processing, then carry out data type conversion, convert data to UnsignedChar
Type;Dimension, pixel separation, the datum mark of volume data are set when reading initial body data according to demand;
Step 2: traversal volume data generates volume data gray scale array according to the frequency of occurrences of different gray values;Array is turned
Be changed to vtkIntArray type, then convert vtkDataObject type for the array, then using the array as
The input of vtkBarChartActor class generates volume data gray-scale statistical histogram;
Step 3: being extracted on volume data contour surface in vtkMarchingCubes class, by SetValue function in histogram
Wave crest, the corresponding threshold value of setting at the corresponding gray value of trough, each contour surface is then added to an actor, is set
Different transparency, finally by the color of each contour surface of SetColor function sets;
Step 4: parallel light source being added by vtkLight class, utilizes such SetColor function sets light source face
Color, SetPosition function sets light source position, the SetIntensity function sets intensity of light source;
Step 5: by SetAmbient, SetDiffuse, SetSpecular in vtkActor class and
SetSpecularPower function is each actor, that is, each contour surface set environment backscatter extinction logarithmic ratio, diffusing reflection coefficient, mirror surface spectrum
Several and mirror surface optical index;
Step 6: using the transformation matrix of tangent plane as the input of vtkMatrix4x4 class, then utilizing such
The central point of SetElement function sets volume data carries out sectioning using vtkImageReslice class, and specified section mentions
Difference mode in taking;Finally by vtkLookupTable class setpoint color mapping table, pass through such SetTableValue
Function is that different gray values specify different color values in slice, generates two-dimensional slice image;
The transformation matrix of the tangent plane:
The transformation matrix of the section XOY is
The transformation matrix of the section XOZ is
The transformation matrix of YOZ plane is
Step 7: setting reference character string using vtkVectorText class, and the character string is converted to
Then reference character string is added to three-dimensional labeling object using vtkFollower class, adopted by vtkPolyDataMapper type
Color, AddPosition function sets labeling position, the mark contracting of SetScale function sets are marked with SetColor function sets
Put ratio;
Step 8: corresponding qvtkWidget component is added respectively for iso-surface patch, gray-scale statistical histogram and slice module,
Extract threshold value setup parameter, the opacity setup parameter, color setup parameter in iso-surface patch;It extracts in virtual sliced sheet drafting
Slice type parameter, slice translational movement parameter;It extracts and marks the mark text parameter in drawing, labeling position parameter;Extract light
Source strength parameter, light source position parameter;The interactive component of the Wire Parameters is added for parameter, realizes that electromagnet data interaction formula can
Depending on analysis.
Beneficial effect
A kind of electromagnet data interaction formula visual analysis method based on VTK proposed by the present invention, utilizes the visual chemical industry of VTK
Tool packet has built an electromagnet data interaction formula visual analysis system.It is obtained first by electromagnet data gray statistic histogram
Volumetric data gray distribution features, and threshold value, opacity and the color of contour surface are set accordingly, realize the interaction of more contour surfaces
Formula design, being then sliced function by multi-angle allows user to explore the field strength distribution of plane interested, then mentions for user
User is added to can using analysis result as three dimensional indicia in render scenes for interactive marking Function, is finally set using illumination
Counting module enhances hatching effect, realizes multiple view, the high quality, interactive visual analysis of electromagnetism volume data.
Beneficial effects of the present invention:
1. the present invention carries out statistics with histogram to electromagnet data gray, according to volume data intensity profile feature in key point
More contour surface threshold value settings are carried out, while providing the Interactive Design of opacity and color matching using QT control, are realized to electromagnetism
The interactive drawing of more contour surfaces of volume data.
2. the present invention can freely set the illumination tensor of light source position, intensity and contour surface, iso-surface patch is significantly improved
Rendering effect.
3. the present invention, to observation analysis is carried out inside electromagnetism volume data, helps user to obtain sense using multi-angle virtual sliced sheet
The field strength distribution feature of interest plane.
4. rendering field is added using the observation analysis result of user as three-dimensional labeling by interactive marking Function in the present invention
Visualization is combined with customer analysis, has been really achieved the visual analysis of electromagnetism volume data by Jing Zhong.
Detailed description of the invention
Fig. 1 systematic schematic diagram
Fig. 2 system interface
1 display effect of Fig. 3 scheme of colour
2 display effect of Fig. 4 scheme of colour
Fig. 5 threshold value sets 1 display effect of scheme
Fig. 6 YOZ planar slice effect
Fig. 7 XOY plane dicing effect
Fig. 8 XOZ planar slice effect
Specific embodiment
Now in conjunction with embodiment, attached drawing, the invention will be further described:
Detailed schematic diagram is as shown in Figure 1, the specific steps are as follows:
(1) initial body data is read by the vtkImageReader class in VTK, set the dimension of volume data as
63X63X63, pixel separation 1X1X1, datum mark are (0,0,0), then pass through vtkSmoothPolyDataFilter class pair
The data of importing carry out Laplce's smoothing processing, utilize such SetNumberOfIterations function setup smoothing factor
It is 2000, followed by vtkImageCast class using data type conversion is carried out, converts raw data into
UnsignedChar type.
(2) volume data is traversed, the frequency of occurrences of different gray values is counted, volume data gray scale array is generated, array is converted
For vtkIntArray type, and convert vtkDataObject type for the array, then using the array as
The input of vtkBarChartActor class generates volume data gray-scale statistical histogram.
(3) volume data contour surface is extracted by vtkMarchingCubes class, since the volume data type is
UnsignedChar, therefore the range of threshold value observes volume data gray-scale statistical histogram, passes through SetValue function from 0-255
Corresponding threshold value is set at the corresponding gray value of wave crest, trough of histogram, extracts 5 contour surfaces, corresponding gray value point
It Wei 65,100,150,200,255.Then each contour surface is added to an actor, passes through SetOpacity function sets
The transparency of 5 contour surfaces is respectively 0.1,0.2,0.3,0.4,1.0, finally by 5 contour surfaces of SetColor function sets
Color be respectively (1,0,0) (0.9,0.9,0) (0,1,0) (0,1,1) (0,0,1), i.e. 5 contour surfaces are respectively from inside to outside
Red, orange, green, cyan and blue.
(4) parallel light source is added by vtkLight class, is using such SetColor function sets light source colour
White, SetPosition function sets light source position are (0,10,10), and the SetIntensity function sets intensity of light source is
100。
(5) by SetAmbient, SetDiffuse, SetSpecular in vtkActor class and
SetSpecularPower function be the i.e. each contour surface set environment backscatter extinction logarithmic ratio of each actor be 0.2, diffusing reflection coefficient is
0.3, mirror surface backscatter extinction logarithmic ratio is 0.5 and mirror surface optical index 800.
(6) then the transformation matrix for setting section passes through using transformation matrix as the input of vtkMatrix4x4 class
The central point of the SetElement function sets volume data of vtkMatrix4x4 class, is cut using vtkImageReslice class
Piece operation, it is linear poor for specifying the difference mode in the extraction of section by SetInterpolationModeToLinear function
Value.Finally by vtkLookupTable class setpoint color mapping table, the SetTableValue function by such is in slice
Different gray values specify different color values, generate two-dimensional slice image.
Wherein:
The transformation matrix of the section XOY is
The transformation matrix of the section XOZ is
The transformation matrix of YOZ plane is
(7) reference character string is set by vtkVectorText class, which is converted to
Then reference character string is added three three-dimensional labeling objects point by vtkFollower class by vtkPolyDataMapper type
Not Wei " S1 " " S2 " " S3 ", by SetColor function sets mark color be yellow, pass through AddPosition function sets mark
Infuse position be respectively (38,30,10) (45,18,15) (35,10,30), SetScale function sets mark scaling be (2,
2,2)。
(8) corresponding qvtkWidget component is added respectively for iso-surface patch, gray-scale statistical histogram and virtual sliced sheet, extract
Threshold value setup parameter, opacity setup parameter, color setup parameter in iso-surface patch extract the slice in virtual sliced sheet drafting
Type parameter, slice translational movement parameter, extract and mark the mark text parameter in drawing, labeling position parameter, it is strong to extract light source
Parameter, light source position parameter are spent, adds corresponding interactive component for parameter.
Component see the table below with corresponding function:
Claims (1)
1. a kind of electromagnet data interaction formula visual analysis method based on VTK, it is characterised in that steps are as follows:
Step 1: initial body data being read by the vtkImageReader class in VTK Software Development Kit, then to importing
Data carry out Laplce's smoothing processing, then carry out data type conversion, convert data to UnsignedChar type;It reads
Take dimension, pixel separation, the datum mark for setting volume data when initial body data according to demand;
Step 2: traversal volume data generates volume data gray scale array according to the frequency of occurrences of different gray values;Array is converted to
VtkIntArray type then converts vtkDataObject type for the array, then using the array as
The input of vtkBarChartActor class generates volume data gray-scale statistical histogram;
Step 3: vtkMarchingCubes class extract volume data contour surface on, by SetValue function histogram wave
Corresponding threshold value is set at the corresponding gray value of peak, trough, each contour surface is then added to an actor, and setting is different
Transparency, finally by the color of each contour surface of SetColor function sets;
Step 4: parallel light source is added by vtkLight class, using such SetColor function sets light source colour,
SetPosition function sets light source position, the SetIntensity function sets intensity of light source;
Step 5: by SetAmbient, SetDiffuse, SetSpecular in vtkActor class and
SetSpecularPower function is each actor, that is, each contour surface set environment backscatter extinction logarithmic ratio, diffusing reflection coefficient, mirror surface spectrum
Several and mirror surface optical index;
Step 6: using the transformation matrix of tangent plane as the input of vtkMatrix4x4 class, then utilizing such SetElement
The central point of function sets volume data carries out sectioning using vtkImageReslice class, specifies the difference in the extraction of section
Mode;Finally by vtkLookupTable class setpoint color mapping table, the SetTableValue function by such is slice
Middle difference gray value specifies different color values, generates two-dimensional slice image;
The transformation matrix of the tangent plane:
The transformation matrix of the section XOY is
The transformation matrix of the section XOZ is
The transformation matrix of YOZ plane is
Step 7: setting reference character string using vtkVectorText class, and the character string is converted to
Then reference character string is added to three-dimensional labeling object using vtkFollower class, adopted by vtkPolyDataMapper type
Color, AddPosition function sets labeling position, the mark contracting of SetScale function sets are marked with SetColor function sets
Put ratio;
Step 8: adding corresponding qvtkWidget component respectively for iso-surface patch, gray-scale statistical histogram and slice module, extract
Threshold value setup parameter, opacity setup parameter, color setup parameter in iso-surface patch;Extract the slice in virtual sliced sheet drafting
Type parameter, slice translational movement parameter;It extracts and marks the mark text parameter in drawing, labeling position parameter;It is strong to extract light source
Spend parameter, light source position parameter;The interactive component of the Wire Parameters is added for parameter, realizes that electromagnet data interaction formula is visually divided
Analysis.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910484475.5A CN110211212A (en) | 2019-06-05 | 2019-06-05 | A kind of electromagnet data interaction formula visual analysis method based on VTK |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910484475.5A CN110211212A (en) | 2019-06-05 | 2019-06-05 | A kind of electromagnet data interaction formula visual analysis method based on VTK |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110211212A true CN110211212A (en) | 2019-09-06 |
Family
ID=67790901
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910484475.5A Pending CN110211212A (en) | 2019-06-05 | 2019-06-05 | A kind of electromagnet data interaction formula visual analysis method based on VTK |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110211212A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111028637A (en) * | 2019-12-27 | 2020-04-17 | 广东电网有限责任公司培训与评价中心 | Live-line work training method and system based on electric field visualization |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107045730A (en) * | 2017-03-06 | 2017-08-15 | 青岛鹏海软件有限公司 | A kind of multidimensional exhibition system and method for digital culture scene or image |
US20180253851A1 (en) * | 2017-03-06 | 2018-09-06 | Vektore Exploration Consulting Corporation | Device, system and method for digitally modeling rock specimens |
CN108765548A (en) * | 2018-04-25 | 2018-11-06 | 安徽大学 | Three-dimensional scene real-time reconstruction method based on depth camera |
-
2019
- 2019-06-05 CN CN201910484475.5A patent/CN110211212A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107045730A (en) * | 2017-03-06 | 2017-08-15 | 青岛鹏海软件有限公司 | A kind of multidimensional exhibition system and method for digital culture scene or image |
US20180253851A1 (en) * | 2017-03-06 | 2018-09-06 | Vektore Exploration Consulting Corporation | Device, system and method for digitally modeling rock specimens |
CN108765548A (en) * | 2018-04-25 | 2018-11-06 | 安徽大学 | Three-dimensional scene real-time reconstruction method based on depth camera |
Non-Patent Citations (3)
Title |
---|
PAULO DIAS ET AL: "Teaching 3D modelling and visualization using VTK", 《COMPUTERS & GRAPHICS》 * |
王晓宇: "基于Freehand超声图像的三维重建方法研究", 《中国优秀硕士学位论文全文数据库电子期刊 信息科技辑》 * |
贾艳丽: "基于VTK可视化技术的人体肺部动态建模", 《中国优秀硕士学位论文全文数据库电子期刊 信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111028637A (en) * | 2019-12-27 | 2020-04-17 | 广东电网有限责任公司培训与评价中心 | Live-line work training method and system based on electric field visualization |
CN111028637B (en) * | 2019-12-27 | 2022-01-25 | 广东电网有限责任公司培训与评价中心 | Live-line work training method and system based on electric field visualization |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Guo et al. | Wysiwyg (what you see is what you get) volume visualization | |
Maciejewski et al. | Structuring feature space: A non-parametric method for volumetric transfer function generation | |
Furukawa et al. | Appearance Based Object Modeling using Texture Database: Acquisition Compression and Rendering. | |
Wang et al. | Modeling anisotropic surface reflectance with example-based microfacet synthesis | |
Koudelka et al. | Acquisition, compression, and synthesis of bidirectional texture functions | |
Ebert et al. | Designing effective transfer functions for volume rendering from photographic volumes | |
CN104376594A (en) | Three-dimensional face modeling method and device | |
CN106127818B (en) | A kind of material appearance acquisition system and method based on single image | |
CN110349247A (en) | A kind of indoor scene CAD 3D method for reconstructing based on semantic understanding | |
CN103530907B (en) | Complicated three-dimensional model drawing method based on images | |
Nguyen et al. | A clustering-based system to automate transfer function design for medical image visualization | |
CN110211212A (en) | A kind of electromagnet data interaction formula visual analysis method based on VTK | |
Kim et al. | Image-based TF colorization with CNN for direct volume rendering | |
Igouchkine et al. | Multi-material volume rendering with a physically-based surface reflection model | |
Huang et al. | Based on statistical analysis and 3D region growing segmentation method of liver | |
CN117218192A (en) | Weak texture object pose estimation method based on deep learning and synthetic data | |
CN109636896A (en) | Skeleton and its bone plate three-dimension interaction methods of exhibiting based on WebGL | |
Marroquim et al. | Gpu-based cell projection for interactive volume rendering | |
dos Passos et al. | Sample-based synthesis of illustrative patterns | |
Woo et al. | Feature-driven data exploration for volumetric rendering | |
Xu et al. | Intrinsic omnidirectional image decomposition with illumination pre-extraction | |
CN104123710A (en) | Implement method of three-dimensional video camera system | |
Zhang et al. | Photorealistic 3D Volumetric Model Reconstruction by Voxel Coloring | |
Glaßer et al. | Visualization of 3D cluster results for medical tomographic image data | |
Na | Colour image reconstruction in indoor space based on machine vision |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20221111 |
|
AD01 | Patent right deemed abandoned |