Добавил:
kiopkiopkiop18@yandex.ru t.me/Prokururor I Вовсе не секретарь, но почту проверяю Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_585_Библиотеки_им_академика_М_И_Перельмана.pdf
Скачиваний:
0
Добавлен:
30.08.2026
Размер:
75 Мб
Скачать
,,
()
N-M+1
ab
()
()
()
()
,,
,,
()
()´()
()
{}
4 Introduction to3D Visualization ofAbdominal CT Images
103
plate image in another image. The match is successful when the template is detected in the source image; otherwise, if there is a template to be searched in the source image with identical size and orientation to its template, the template image and its target coordinate position in the source image can be found through calculating the correlation function. In short, the primary goal is to nd subgraphs and their location which are closet to the template image in the source image (Fig.4.3).
Assume the template T is translated on the source image
S. The subgraph template is called subgraph S
i,j
. i and j
are coordinates of the pixel in the upper left corner of the
where,
M
åå
mMn
==
11
M
,,
ij
DijSmn SmnTmn
,, ,,
=
()
é
Tmn
ë
2
ù
,
û
é
åå åå
ë
mMn
== ==
11
represents the total energy of
2
ù
()
û
M
mMn
11
ij
()´(
-
2
the template, which is a constant and is independent of (i, j);
MnM
åå
m,==
11
,
ij
é
Smn
ë
2
ù
is the energy of the subgraph to be
û
matched under the template cover, which changes slowly
M
,
with the position of (i, j);
2
ij
SmnTmn
åå
==
()
11mMn
´
rep-
resents the relationship between the template and the sub­graph, which changes with the change of (i, j). This value is the largest when T and Si, j match. Therefore, the correlation function can be dened as:
subgraph in S, which is dened as the reference point. The search range is limited to 1≤i, jN - M+1; the correlation function that measures the level of similarity between the template T and the subgraph Si j can be obtained by the fol­lowing similarity measures:
Assume:
M
ij
,
DijSmn Tmn
=
()
åå
mMn
==
11
é
()
ë
-
2
ù
,
û
(4.1)
By expanding the above formula, we can also write this equation as:
M
åå
==
mMn
11
,
=
()
é
Tmn
ë
åå
+
))
Rij
2
ù
,
û
M
mMn
åå
SmnTmn
==
11
M
==
11
mMn
,
ij
´
()
,
ij
é
Smn
()
ë
(4.2)
2
ù
,
û
(4.3)
This equation can be transformed into:
M
,
ij
,,
åå
R
=
åå
{}
== =
mMn
mMn
N
é
Smn
ë
11
SmnTmn
==
11
ij
,
2
ù
,
()
û
ååå
n
1
m
M
M
é
ë
=
1
Tmn
2
ù
,
û
(4.4)
When the template matches the source subgraphs, there is R(i, j)=1, otherwise R(i, j)<1. Obviously, the larger R(i, j) is, the more similar the template T and the subgraph Si, j.
Fig. 4.3 Source image (a) and Template (b)
M-1
N-M+1
X
M-1
subgraph
M
M
X
104
Fig. 4.4 Arterial phase image
S. Bao et al.
Region Based Methods
This method utilizes not only the information of pixels, but also the spatial positional relationship between pixels. The segmentation result is connected, which is a local segmenta­tion method.
Edge Based Methods
Edge based segmentation is the earliest method based on detection of edges. It mainly tries to solve the problem of image segmentation by using the characteristic that the gray value of the pixels on the edge is often severe.
Model Based Methods
Model based methods of segmentation is currently a controver­sial topic. It requires manual interaction and prior knowledge to place an initial model and select appropriate parameters.
4.2.1.2 Registration Steps
Step 1
Import a total of 396 arterial phase CT images into the sys­tem and randomly select one as the template (Fig.4.4).
Step 2
Use the template matching algorithm and match the tem­plate selected in Step 1 with all the images of the venous and portal venous phases (396 pictures in each phase) to get the similarity curve (Fig.4.5).
It can be observed from the two curves in Step 2 that the 297th picture is the most similar to the template in the venous phase, and the 101st picture is most similar to the template in the portal venous phase. According to the human physiological structure and CT scan requirements, the one with the largest similarity value should be the 101st picture if all the pictures in the venous phase match the template, while the experimental result shows the 297th. It can be conrmed that the scanning order of the images in the venous phase and that of the images in the arterial and portal venous phases are reversed.
Step 3
Perform three-dimensional reconstruction of triphasic CT scan of the liver, as shown in Fig.4.6:

4.2.2 Image Segmentation

4.2.2.1 Segmentation Methods inMedical Image
Processing
Pixel Based Methods
This approach only considers the pixels themselves in the image but does not utilize additional information such as spatial position information and texture information. Thus, this method is generally used for preprocessing of images.
Combination ofMultiple Algorithms
Combine the advantages of multiple algorithms to achieve accurate segmentation.
A new three-dimensional adaptive region growing seg­mentation algorithm is proposed; based on the character­istics of abundant abdominal viscera as well as complex texture structure, small grayscale difference, and indistinct edge of images, combined with similar features of adjacent CT images. This can accurately, quickly, and automatically extract tissues and organs including the liver, gallbladder, spleen, and pancreas from CT sequence imaging.
4.2.2.2 Similarity Features ofCT Sequence
Images
To better guide the segmentation of the next layer of slices, it is necessary to take full advantage of the similarity features between adjacent slices. Figure 4.9 is a set of consecutive liver CT sequence images. It can be seen from the gure that when the interval between adjacent layers is very small (The current 64-slice spiral CT scan is very thin, generally accu­rate to 0.5mm), the target regions of the CT sequence image has the following features (Fig.4.7):
• Very little deformation occurs between the adjacent lay-
ers, which means the liver boundary of adjacent layers has
a similarity in shape.
• The average grayscale intensity of each layer of liver is
similar.
• The location of each layer of liver in the image is rela-
tively stable.
• The liver area of adjacent layer is similar.
• The grayscale distribution of each layer of liver is
consistent.
Therefore, all the layers except the rst layer can take the segmentation result of the upper layer as the initial contour value.
[]
[]
..
a
4 Introduction to3D Visualization ofAbdominal CT Images
Fig. 4.5 Matching similarity curve. (a) Template matching with venous phase; (b) Template matching with portal venous phase
b
105
4.2.2.3 Serialized Segmentation Model
To achieve serialized segmentation, it is necessary to make
• Continue the above search and merge process until there
are no merged pixels that can be merged.
full use of the advantages of the model-based segmentation method. Currently, there are three main programs that are commonly used:
• The segmentation result of the preceding image would serve as the prior knowledge of the subsequent image, that is, the initial contour value.
• Sequence images are partitioned into different groups, and each group shares an articial initialization prole.
• In three-dimensional space segmentation, the sequence image is regarded as a set of voxels.
The region growing algorithm has two main problems. One is the selection of initial seed points. Seed points selection must satisfy certain criteria, which means they should represent the characteristics of the regions of inter­est. The other is a similarity criterion. This approach can determine whether the pixel neighbors should be added to the regions of interest. Some criteria generally used are grayscale (average intensity or variance), texture, and shape, while the others are based on statistical parameters.
To address these issues, an adaptive region growing model for image segmentation has been proposed: rst, regarding
4.2.2.4 Adaptive Region Growing Algorithm
The basic idea of region growth is to assemble pixels that have similar properties to form a region (Pattana etal. 2020). Procedures are as follows:
the selection of the initial seed points, the 3×3 neighborhood of the seed point as the initial seed region instead of the sin­gle seed point of the traditional algorithm was adopted, so as to avoid wrong choice of the seed point and inuence of noise; secondly, a new similarity criterion based on the simi-
• Set a seed point as the starting point for region growing in the target area to be segmented.
larity criterion of local average grayscale and local average gradient was proposed, as shown in Eq. (4.5):
• Search for pixels with similar characteristics degree that meets the specied growth criteria and merge them into the region that seed point locates at.
t
[]
ma mb
-Ñ<
x
t
�� ��
Iy
()
x
t
[]
<+Ñ
x
t
(4.5)
x
• Set the merged pixel as a new seed point.
106
ab
cd
S. Bao et al.
e
Fig. 4.6 3D reconstruction triphasic liver images. (a) The liver at the hepatic artery stage; (b) The liver at the venous stage; (c) The liver at the portal venous stage; (d) Results before registration; (e) Results after registration
[]
[]
ab
4 Introduction to3D Visualization ofAbdominal CT Images
c
107
Fig. 4.7 Adjacent CT images. (a) The rst layer; (b) The second layer; (c) The third layer
where
in
t
represents the average gray value of the pixel
m
x
the area adjacent to the seed point,
t
��Ñ
and the area
x
(initial contour value). The segmentation results are shown in Fig.4.8.
Segmentation results indicate that the adaptive region growing segmentation algorithm is effective in improving segmentation accuracy. Firstly, the internal cavity of the
adjacent
(y). ɑ and β are the constant coefcients that can be adjusted manually. It can be seen from Eq. (4.5) that our similarity criterion is completely adaptive, allowing a certain variation of intensity between the gray values of pixel y and the local mean value, and this changed intensity is a function based on local gradient. If the change exceeds this maximum value,
to the seed point represents the gray value of pixel I
liver is obviously reduced; secondly, the liver edge contour is smoother, and close to the actual contour of the liver.
Regarding segmentation of various intrahepatic ducts, the third scheme of serialized segmentation model was adopted, which means a voxel-based three-dimensional adaptive region growing algorithm. The segmentation results are shown in Figs.4.9 and 4.10.
points with elevations out of range will be considered outli­ers and be eliminated.

4.2.3 3D Reconstruction

4.2.2.5 Image Segmentation oftheLiver andIts Ducts
Regarding the liver sequence image segmentation, the rst scheme of serialized segmentation model was adopted, which means the segmentation result of the preceding image would serve as the prior knowledge of the subsequent image
Through sensors, the computer can collect information (sam­pling data) from external sources. The task of reconstruction is to restore the 3D shape of the object (prototype) from the acquired sampling data. Three-dimensional reconstruction methods of medical images can be divided into two catego-
108
ab
ef
S. Bao et al.
ries: the surface rendering approach and the volume render­ing approach. Surface rendering is an approach to generate iso-surface of the spatial data eld through surface modeling technology, and then use surface illumination models to draw the image. Volume rendering methods directly generate 3D
dimensional object and it is convenient for plane shearing and cube cutting to observe the internal structure of the object and improve user interaction. Therefore, for medical images with complex anatomy, volume rendering methods are generally
used for the three-dimensional display of the structure. objects from a discreetly sampled 3D data set through volu­metric illumination models. Surface rendering can quickly and effectively draw the surface of a three- dimensional object, but the internal structure information is lost; volume rendering involves a complicated calculation process and a relatively slow reconstruction speed, however, it can naturally display the surface as well as internal structure of the three-
4.2.3.1 Introduction toVisualization Toolkit
The Visualization Toolkit (VTK) developed by the United
States Kitware Inc. is an open source, freely available soft-
ware system for 3D computer graphics, image processing,
and visualization. VTK consists of a C++ class library and
supports a series of visualization algorithms and advanced
c
d
Fig. 4.8 Segmentation experiment. (a) CT image of the 164th slice; (b) Traditional algorithm segmentation; (c) Adaptive algorithm seg­mentation; (d) CT image of the 195th slice; (e) Traditional algorithm
segmentation; (f) Adaptive algorithm segmentation; (g) CT scan of the
164th slice; (h) Traditional algorithm segmentation; (i) Adaptive algo-
rithm segmentation
gh
4 Introduction to3D Visualization ofAbdominal CT Images
i
109
Fig. 4.8 (continued)
modeling techniques. It has integrated many algorithms such as Monte Carlo (MC) algorithm and ray-casting algorithm.
VTK is constructed on C++ language, including three major functions: 3D computer graphics, image processing, and visualization. It comprises C++ class library, and also supports common scripting languages including TCL/TK, Java, and Python. VTK can support and process data in many formats, such as regular/irregular point sets, image, and vol­ume. For reading les in a variety of data formats and their transformations, VTK provides abundant and exible classes such as those inherited from vtkImageReader include vtk­BMPReader and vtkPNGReader, and superclasses such as vtkImageReader and vtklmagewriter; for reading and writing images in other formats, VTK provides classes such as vtk­DicomReader and vtkDicomWriter that can read and write DICOM 3.0 les. VTK encapsulates numerous frequently­used graphics operations and image processing algorithms into different classes, which are easily understood. It con­tains many excellent image processing and graphics genera­tion algorithms, which have been widely used in scientic research and engineering; meanwhile, it has become a popu­lar platform for development of medical image visualization (Fig.4.11). In image processing and visualization, especially in medical image processing, VTK has unrivalled perfor­mance over other software, mainly in the following aspects:
• Powerful 3D graphics rendering functionality, supports voxel-based volume rendering, and also retains traditional surface rendering; thus, signicantly improving the visu­alization effect while making full use of the existing graphics database and graphics hardware.
• Good ow streaming and caching capability because of its pipeline architecture, and thus the constraints on memory limitations have been resolved when dealing with large data.
• Platform and underlying graphics library independent, and can support multiple coloring, such as OpenGL.
• The device-independent of VTK ensures its cross­platform portability It has the function of code conversion between various programming languages and works on Windows or Unix systems.
• Denes many macros that can greatly simplify program­ming and enhance consistent object behavior.
• VTK has abundant data types to support the processing of a variety of data types. It provides a mechanism to encap­sulate 3D data eld visualization algorithms and digital image processing algorithms, which can easily transform and operate data sets.
• The most striking feature is VTK source code, which is easy for users to improve and extend the toolkit itself. These codes can be freely obtained from http://www.vtk.org
110
S. Bao et al.
a
right hepatic vein
a
middle hepatic vein
left hepatic vein
b
b
right branch
of portal vein
left branch of
portal vein
Fig. 4.9 Dilated bile duct and stones. The red arrows point to the site of strictures, (a) dilated bile duct; (b) stones
VTK adopts a process chain (pipeline) architecture. The output from each routine becoming the input for the fol­lowing process The pipeline consists of objects to represent data (data objects) and objects to operate on data (process objects). The application of classes in VTK uses this pipeline mechanism to realize visualization of data.
The pipeline consists of subroutines: vtkSource, vtkFilter, vtkMapper, vtkActor, and vtkRender. Each operates sequen­tially hence it is a “pipeline.” The subclass vtkSource is an abstract object that species behavior and interface of source objects, which can save various input data in this class or its subclasses. vtkFilter converts the input data into a format suitable for an algorithm to achieve conversion between dif­ferent data types, or to input various data objects into vtkFil-
Fig. 4.10 3D images. (a) the hepatic vein; (b) the portal vein
ter converting into another data object. vtkMapper then maps the data from vtkFilter and species the corresponding data mapping process for vtkActor, which renders the scene in the real-world coordination system. The vtkRender coordinates the rendering process involving lights, cameras, and actors.
4.2.3.2 Surface Reconstruction for3D Geometric Modeling
By using the MC surface rendering algorithm, 3D recon­struction of various organs and tissues of the abdomen can be carried out. These models are saved in the form of les to provide three-dimensional model data for subsequent simulation operations (a volume rendering algorithm based on ray casting method can be adopted). Three-dimensional reconstruction of the abdominal organs can reproduce rich anatomical structure of various organs and three-dimen­sional spatial information between various organs to provide powerful tools for medical diagnosis, as shown in Fig.4.11.
11
ab
4 Introduction to3D Visualization ofAbdominal CT Images
111
Fig. 4.11 Surface rendering effect of abdominal viscera
1. Inferior vena cava
2. Right hepatic vein
3. Liver
4. Hepatic portal vein
5. Common hepatic artery
6. Gallbladder
7. Abdominal aorta
8. Dilated bile duct
9. Spleen
10. Common bile duct
11. Pancreas
1
7
2
3
4
5
6
8
9
10
Fig. 4.12 Volume rendering effect of abdominal viscera. (a) Ventral side; (b) Back side
4.2.3.3 Volume Reconstruction for3D Geometric Modeling
An abdominal CT image composed of 512x5l2x390x8 bits without undergoing segmentation was tested by ray casting within VTK, which has achieved a satisfactory rendering
effect as shown in Fig.4.12. The results of the volume ren­dering can clearly show the overall situation of the whole three-dimensional data eld, especially the liver region of the abdomen. Correspondingly, it can provide a guide for segmentation of the liver.
112
S. Bao et al.
4.3 Realization of3D Visualization System Image
4.3.1 Introduction toSystem Functions
The system function module is shown in Fig.4.13.
4.3.2 The Module forImage Importing
In this module, a le in BMP format can be imported. The hospital usually provides CT image data in DICOM le format; however, since the format of CT image is complex, CT images should be converted into grayscale BMP les by using the built-in software to reduce the workload of soft­ware development. The process of conversion from 12-bit CT images to BMP 8-bit image format, would lead to infor­mation loss. In consideration of different scan sequences in various periods, a ashback function via rendering memo­rization was added to the module for image importing to ensure that the three-phase reconstruction results match mutually. Meanwhile, properties such as point coordinates and inter-slice distance can be specied.
After importing sequence images, data were saved by using vtkStructuredPointS class in VTK. Similar to a 3D array, this class can quickly access the pixel values of any position in the array, which provides convenience for the sagittal, coronal, and cross-sectional display of volume data. The pseudo code for reading BMP sequences into VTK is depicted below:
Long intnOsetl; / / inter-slice oset
Long int nOset2;//on-slice oset
VtkDoubleArray*pBMPScalars=NULL;
vtkBMPReader*pBMPReader=vtkBMPReader::New();//
Create a BMP Reader for reading BMP images
VtkDoubleArray*pScalars=vtkDoubleArray::New();
vtkStructuredPoints*pStructuredPoints=vtkStruct
uredPoints::New();// Create a vtkStructured-
Points class for storing BMP image pixel
information
m_pStructuredPoints->SetDimensions(nDatax,nData
y,nDataz);//Specify their dimensions, where
nDatax, nDatay, nDataz represent the image width,
height and number of layers, respectively
m_pStructuredPoints->SetOrigin(0,0,0);//Specify
the origin
m_pStructuredPoints->SetSpacing(1,1,1);//
Specify the ratio of x, y, z in three
directions
pScalars->Allocate(nDatax*nDatay*nDataz);//
Allocating space
pScalars->SetNumberOfComponents(1);
pScalars->SetNumberOfTuples(nDatax*nDatay*nDa
taz);
For(intnStart=0;nStart<nDataz;nStart++)
{
pBMPReader->SetFileName(nStart lename);//
Specify the le name, nStart
Filename refers to the le name of the nStart
sheet
pBMPReader->Update();//Read data
pBMPScalars(vtkDoubleArray*)
pBMPReader->GetOutput0->GetPointD
Ata()->GetScalars0;
nOset l=nStart*nDatax*nDatay;//inter-slice
distance
For(inti=0;i<nDatay;i++)//For any picture, it
must be calculated in order to
Convert data into m_ _ pStructuredPoints format
For(int j=0.j<nDatax;j++)
{
intnOset=inDatax+j;
nOset2=nOsetl+nOset;//recorded location
information
doublenScalar=pBMPScalars-
>GetComponent(nOset,0);
pScalars->InsertValue(nOffset2,nScalar);//
Insert grayscale information at the specied
position
}
}
m_pStructuredPoints->GetPointData0-
>SetScalars(pScalars);
pScalars->Delete();
pBMPReader->Delete();
Fig. 4.13 System function modules
4.3.3 The Module forImage Segmentation
Image processing algorithms mainly include region grow­ing and threshold segmentation methods. Region growing involves the selection of initial seed points and uses dif­ferent segmentation approaches for segmenting different tissues. The vtkStructurePoints class was used to preserve