JP7206846B2 - volume rendering device - Google Patents

volume rendering device Download PDF

Info

Publication number
JP7206846B2
JP7206846B2 JP2018218917A JP2018218917A JP7206846B2 JP 7206846 B2 JP7206846 B2 JP 7206846B2 JP 2018218917 A JP2018218917 A JP 2018218917A JP 2018218917 A JP2018218917 A JP 2018218917A JP 7206846 B2 JP7206846 B2 JP 7206846B2
Authority
JP
Japan
Prior art keywords
image
tomographic
voxel
opacity
pixel
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.)
Active
Application number
JP2018218917A
Other languages
Japanese (ja)
Other versions
JP2020086806A (en
Inventor
敏雄 茂出木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2018218917A priority Critical patent/JP7206846B2/en
Publication of JP2020086806A publication Critical patent/JP2020086806A/en
Application granted granted Critical
Publication of JP7206846B2 publication Critical patent/JP7206846B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Apparatus For Radiation Diagnosis (AREA)
  • Image Generation (AREA)

Description

本開示は、2次元の断層画像を複数枚用いて、3次元的に可視化するためのボリュームレンダリング技術に関する。 The present disclosure relates to volume rendering technology for three-dimensional visualization using a plurality of two-dimensional tomographic images.

従来、CT、MRI、PETなど医療画像診断機器(モダリティ)により所定のスライス間隔で連続的に撮像され、DICOM形式等でPACS(Picture Archiving and Communication Systems)等の医療情報システムに保管されている複数の断層画像を基に、臓器等を3次元的に可視化することが行われている。 Conventionally, multiple images are taken continuously at predetermined slice intervals by medical imaging diagnostic equipment (modality) such as CT, MRI, and PET, and stored in a medical information system such as PACS (Picture Archiving and Communication Systems) in DICOM format. Three-dimensional visualization of organs and the like is performed based on the tomographic image.

3Dコンピュータグラフィックス分野においては、レンダリング像を256色などの限定色で生成し、ハードウェア実装のカラーマップ(カラー・ルックアップテーブル)を対話形式に変更してレンダリング像の色をリアルタイムに変更する手法が用いられている(特許文献1参照)。 In the field of 3D computer graphics, a rendering image is generated with limited colors such as 256 colors, and the colors of the rendering image are changed in real time by interactively changing the color map (color lookup table) implemented in hardware. method is used (see Patent Document 1).

また、カラーマップに依存しないVISボリューム(信号値、陰影輝度値、不透明度強度係数の3パラメータをもつボクセル)でレンダリングする方法も提案されている(特許文献2参照)。 A method of rendering with a VIS volume (a voxel having three parameters of a signal value, a shadow luminance value, and an opacity intensity coefficient) that does not depend on a color map has also been proposed (see Patent Document 2).

特開平1-321577号公報JP-A-1-321577 特許第2651787号公報Japanese Patent No. 2651787

しかしながら、特許文献1に記載の技術では、変更できるのはRGB値のみであり、ボリュームレンダリングで重要な、不透明度を表現したα値を制御することは開示されていない。また、特許文献2に記載の技術では、信号値に対してカラーマップを適用して再レンダリングする場合に比べ、処理負荷の抑制は限定的である。 However, the technique described in Patent Document 1 can only change the RGB values, and does not disclose controlling the α value expressing opacity, which is important in volume rendering. Moreover, in the technology described in Patent Document 2, suppression of the processing load is more limited than in the case of re-rendering by applying a color map to signal values.

そこで、本開示は、複数の断層画像に対してカラーマップを適用して、レンダリング画像を生成する際、レンダリング画像の生成処理の速度を向上させることが可能なボリュームレンダリング装置を提供することを課題とする。 Therefore, an object of the present disclosure is to provide a volume rendering apparatus capable of improving the speed of rendering image generation processing when generating a rendering image by applying a color map to a plurality of tomographic images. and

本開示は、上記課題を解決する手段を複数含んでいるが、その一例を挙げるならば、
所定の対象物について所定の間隔で撮影された複数の2次元の断層画像に基づいて、信号値に対して色成分の値と不透明度を対応付けて定義されたカラ-マップを参照してレンダリング画像を生成するためのボリュームレンダリング装置であって、
前記各断層画像の各画素のうち、前記カラ-マップを参照して得られた不透明度が0でない画素が存在する領域に3次元の各軸方向において外接する領域である不透明外接領域を算出する不透明外接領域算出手段と、
前記各断層画像のうち、前記不透明外接領域に対応する領域をボクセル化領域とし、前記カラ-マップを参照して当該ボクセル化領域の各画素の信号値を変換し、画素値として色成分および不透明度が定義された2次元の要素画像が所定の間隔で重ねて配置されたボクセル画像を作成するボクセル画像作成手段と、
前記ボクセル画像を用いてレンダリング画像を生成するレンダリング手段と、を有する。
The present disclosure includes multiple means for solving the above problems, but if one example is given,
Rendering with reference to a color map defined by associating color component values and opacity with signal values, based on multiple 2D tomographic images of a given object taken at given intervals. A volume rendering device for generating an image, comprising:
calculating an opaque circumscribed region, which is a region that circumscribes in each three-dimensional axial direction the region in which pixels having non-zero opacity obtained by referring to the color map exist among the pixels of each of the tomographic images; opaque circumscribed area calculation means;
Among the tomographic images, a region corresponding to the opaque circumscribed region is defined as a voxelized region, and the signal value of each pixel in the voxelized region is converted by referring to the color map, and color components and non-color components are obtained as pixel values. voxel image creation means for creating a voxel image in which two-dimensional element images with defined transparency are superimposed at predetermined intervals;
and rendering means for generating a rendered image using the voxel image.

また、本開示では、
前記ボリュームレンダリング装置として、コンピュータを機能させるためのプログラムを提供する。
Also, in this disclosure:
A program for causing a computer to function as the volume rendering device is provided.

また、本開示では、
所定の対象物について所定の間隔で撮影された複数の2次元の断層画像の各画素に対応し、あらかじめ定義されたカラ-マップを参照して定められた各ボクセルで構成されるボクセル構造体のボクセルデータであって、
xyz各軸の最外周となる境界面のボクセルは全て不透明度が0であり、境界面に隣接する面において、少なくとも1つの不透明度が0でないボクセルを有しているボクセルデータを提供する。
Also, in this disclosure:
A voxel structure composed of voxels determined by referring to a predefined color map corresponding to each pixel of a plurality of two-dimensional tomographic images of a predetermined object photographed at predetermined intervals. voxel data,
All the voxels on the outermost perimeter of the xyz axes have an opacity of 0, providing voxel data having at least one non-zero opacity voxel on a surface adjacent to the boundary.

本開示によれば、複数の断層画像に対してカラーマップを適用して、レンダリング画像を生成する処理を高速に行うことが可能となる。 According to the present disclosure, it is possible to apply a color map to a plurality of tomographic images and perform processing for generating rendering images at high speed.

複数の断層画像と、ボリュームレンダリング像として生成されるカラーのレンダリング画像を示す図である。FIG. 3 is a diagram showing a plurality of tomographic images and a color rendering image generated as a volume rendering image; 本開示の一実施形態に係るボリュームレンダリング装置100のハードウェア構成図である。1 is a hardware configuration diagram of a volume rendering device 100 according to an embodiment of the present disclosure; FIG. 本実施形態に係るボリュームレンダリング装置の構成を示す機能ブロック図である。1 is a functional block diagram showing the configuration of a volume rendering device according to an embodiment; FIG. 本実施形態に係るボリュームレンダリング装置の処理動作を示すフローチャートである。4 is a flowchart showing processing operations of the volume rendering device according to the embodiment; 本実施形態で用いるカラーマップを示す図である。It is a figure which shows the color map used by this embodiment. 図4に示したステップS30における不透明外接領域算出処理を複数のCPUコアで並行して行う場合を示すフローチャートである。FIG. 5 is a flow chart showing a case where opaque circumscribed area calculation processing in step S30 shown in FIG. 4 is performed in parallel by a plurality of CPU cores. FIG. 図6のステップS330における断層画像群に対する不透明外接領域の算出処理を示すフローチャートである。FIG. 7 is a flow chart showing calculation processing of an opaque circumscribed region for a group of tomographic images in step S330 of FIG. 6. FIG. 図6のステップS360における断層画像群全体の不透明外接領域の算出処理を示すフローチャートである。FIG. 7 is a flow chart showing calculation processing of an opaque circumscribed region of the entire group of tomographic images in step S360 of FIG. 6. FIG. ROIと不透明外接領域を比較した図である。FIG. 11 compares ROIs and opaque circumscribing regions; 図4に示したステップS40におけるボクセル画像作成処理等を並行して行う場合を示すフローチャートである。5 is a flowchart showing a case where voxel image creation processing and the like in step S40 shown in FIG. 4 are performed in parallel. 図6に示したステップS510、S530における要素画像の作成処理を示すフローチャートである。FIG. 7 is a flowchart showing element image creation processing in steps S510 and S530 shown in FIG. 6; FIG. 3Dテクスチャマッピングにおける対応付けを示す図である。FIG. 4 is a diagram showing correspondence in 3D texture mapping; 3Dテクスチャマッピング方式の処理を行う場合の、レンダリング手段70の構成を示す図である。FIG. 4 is a diagram showing the configuration of the rendering means 70 when performing 3D texture mapping method processing; 本実施形態のレンダリング手段70による投影画面設定の一例を示す説明図である。4 is an explanatory diagram showing an example of projection screen setting by rendering means 70 of the present embodiment; FIG. 3Dテクスチャマッピング方式によるレンダリング処理の詳細を示すフローチャートである。4 is a flowchart showing details of rendering processing by a 3D texture mapping method; コンピュータによりボリュームレンダリング装置100を実現する場合の並列化処理を示す図である。FIG. 4 is a diagram showing parallel processing when the volume rendering device 100 is implemented by a computer; コンピュータによりボリュームレンダリング装置100を実現する場合の並列化処理のソフトウェアによる流れを示す図である。FIG. 4 is a diagram showing a software flow of parallel processing when the volume rendering device 100 is implemented by a computer.

以下、本開示の好適な実施形態について図面を参照して詳細に説明する。
本開示は、複数の断層画像に基づいて、信号値に対して色成分の値と不透明度を対応付けて定義されたカラ-マップを参照してレンダリング画像を生成するものである。図1は、複数の断層画像と、レンダリング画像を示す図である。図1(a)は複数の断層画像、図1(b)は1枚の断層画像、図1(c)はレンダリング画像である。図1(a)(b)に示す断層画像は、DICOM形式のものを示している。図1(a)は、370枚の断層画像群であり、図1(b)は、そのうちの1枚を拡大したものである。後述する実施形態のボリュームレンダリング装置では、図1(a)に示したような複数の断層画像に対してレンダリング処理を実行して、図1(c)に示したような1枚のレンダリング画像を生成する。図1(c)に示したレンダリング画像は、512×512画素であって、1画素についてRGB各色8ビットの計24ビットで表現したものである。
Preferred embodiments of the present disclosure will be described in detail below with reference to the drawings.
The present disclosure generates a rendering image by referring to a color map defined by associating color component values and opacities with signal values based on a plurality of tomographic images. FIG. 1 is a diagram showing a plurality of tomographic images and a rendering image. FIG. 1(a) shows a plurality of tomographic images, FIG. 1(b) shows a single tomographic image, and FIG. 1(c) shows a rendering image. The tomographic images shown in FIGS. 1A and 1B are in DICOM format. FIG. 1(a) is a group of 370 tomographic images, and FIG. 1(b) is an enlarged view of one of them. A volume rendering apparatus according to an embodiment, which will be described later, executes rendering processing on a plurality of tomographic images as shown in FIG. Generate. The rendered image shown in FIG. 1(c) has 512×512 pixels, and each pixel is represented by a total of 24 bits of 8 bits for each color of RGB.

<1.装置構成>
図2は、本開示の一実施形態に係るボリュームレンダリング装置100のハードウェア構成図である。本実施形態に係るボリュームレンダリング装置100は、汎用のコンピュータで実現することができ、図2に示すように、CPU(Central Processing Unit)1と、コンピュータのメインメモリであるRAM(Random Access Memory)2と、CPU1が実行するプログラムやデータを記憶するためのハードディスク、SSD(Solid State Drive),フラッシュメモリ等の大容量の記憶装置3と、キーボード、マウス等の指示入力I/F(インターフェース)4と、データ記憶媒体等の外部装置とデータ通信するためのデータ入出力I/F(インターフェース)5と、液晶ディスプレイ等の表示デバイスである表示部6と、グラフィックスに特化した演算処理部であるGPU(Graphics Processing Unit)7と、表示部6に表示する画像を保持するフレームメモリ8と、を備え、互いにバスを介して接続されている。GPU7による演算結果はフレームメモリ8に書き込まれるため、GPU7とフレームメモリ8は、表示部6へのインタフェースを備えたビデオカードに搭載されて汎用のコンピュータにバス経由で装着されていることが多い。
<1. Device configuration>
FIG. 2 is a hardware configuration diagram of the volume rendering device 100 according to an embodiment of the present disclosure. The volume rendering apparatus 100 according to this embodiment can be realized by a general-purpose computer, and as shown in FIG. , a large-capacity storage device 3 such as a hard disk, SSD (Solid State Drive), flash memory, etc. for storing programs and data executed by the CPU 1, and an instruction input I / F (interface) 4 such as a keyboard, mouse, etc. , a data input/output I/F (interface) 5 for data communication with an external device such as a data storage medium, a display unit 6 which is a display device such as a liquid crystal display, and an arithmetic processing unit specializing in graphics. A GPU (Graphics Processing Unit) 7 and a frame memory 8 for holding an image to be displayed on the display unit 6 are provided, and are connected to each other via a bus. Since the calculation result by the GPU 7 is written to the frame memory 8, the GPU 7 and the frame memory 8 are often mounted on a video card having an interface to the display unit 6 and attached to a general-purpose computer via a bus.

本実施形態において、CPU1は、マルチコアCPUであり、複数のCPUコアを有し、並列処理が可能となっている。図2の例では、RAM2が1つだけ示されているが、CPU1の各CPUコアが、1つのRAM2にアクセスするように構成されている。なお、CPU1は複数であってもよい。またマルチコアCPUは、各々のCPUコアが論理的に複数の実行スレッドを受け入れるCPUであってもよい。 In this embodiment, the CPU 1 is a multi-core CPU, has a plurality of CPU cores, and is capable of parallel processing. Although only one RAM2 is shown in the example of FIG. 2, each CPU core of the CPU1 is configured to access one RAM2. Note that the number of CPUs 1 may be plural. A multi-core CPU may also be a CPU in which each CPU core logically accepts multiple threads of execution.

図3は、本実施形態に係るボリュームレンダリング装置の構成を示す機能ブロック図である。図3において、10は断層画像読込手段、20はカラーマップ読込手段、30はROIクリッピング設定手段、40はマスク設定手段、50は不透明外接領域算出手段、60はボクセル画像作成手段、61は不透明度補正手段、62は陰影付加手段、70はレンダリング手段、80はレンダリング画像出力手段である。 FIG. 3 is a functional block diagram showing the configuration of the volume rendering device according to this embodiment. 3, 10 is tomographic image reading means, 20 is color map reading means, 30 is ROI clipping setting means, 40 is mask setting means, 50 is opaque circumscribed area calculation means, 60 is voxel image creation means, and 61 is opacity. 62 is shading means; 70 is rendering means; and 80 is rendered image output means.

断層画像読込手段10は、CT、MRI、PETなどの医用画像診断機器により収集および蓄積されたPACSから、記憶媒体や入力部を経由して、複数の断層画像を読み込む手段である。断層画像は、対象物に対して所定の間隔で撮影されて得られたものであり、各画素に信号値が付与された2次元の断層画像である。カラーマップ読込手段20は、図示されていないカラーマップ作成手段により、あらかじめ作成されたカラーマップを記憶媒体や入力部から、カラーマップを読み込む手段である。ROIクリッピング設定手段30は、読み込んだ複数の断層画像のうち、ボクセル画像の作成対象を、関心領域であるROIとして設定する手段である。マスク設定手段40は、読み込んだ複数の断層画像のうち、表示させない領域をマスク設定する手段である。不透明外接領域算出手段50は、信号値に対して色成分の値と不透明度を対応付けて定義されたカラーマップを参照して、複数の断層画像の各画素に不透明度を対応付けて、その不透明度に基づいて不透明外接領域を算出する手段である。詳しくは後述するが、不透明外接領域とは、不透明度が0でない画素が存在する範囲に3次元の各軸方向において外接する領域である。 The tomographic image reading means 10 is means for reading a plurality of tomographic images from PACS collected and stored by medical image diagnostic equipment such as CT, MRI, and PET via a storage medium and an input unit. A tomographic image is obtained by photographing an object at predetermined intervals, and is a two-dimensional tomographic image in which a signal value is assigned to each pixel. The color map reading means 20 is a means for reading a color map created in advance by a color map creating means (not shown) from a storage medium or an input section. The ROI clipping setting means 30 is a means for setting an ROI, which is a region of interest, as a voxel image creation target among a plurality of read tomographic images. The mask setting means 40 is a means for setting a mask for an area not to be displayed among the plurality of read tomographic images. The opaque circumscribing region calculating means 50 refers to a color map defined by associating color component values and opacities with signal values, associates opacities with respective pixels of a plurality of tomographic images, and calculates the A means of calculating an opaque bounding area based on opacity. Although the details will be described later, the opaque circumscribing area is an area that circumscribes a range in which pixels whose opacity is not 0 exists in each three-dimensional axial direction.

ボクセル画像作成手段60は、信号値に対して色成分の値と不透明度を対応付けて定義されたカラーマップを参照して、複数の断層画像の各画素と対応付けて3次元に配置した各ボクセルに対して、色成分の値と不透明度を与えることによりボクセル画像を作成する手段である。ボクセル画像作成手段60は、さらに不透明度補正手段61、陰影付加手段62を備えている。不透明度補正手段61は、所定のテーブルを用いてボクセル画像の各画素の不透明度αを補正する手段である。陰影付加手段62は、ボクセル画像の各ボクセルの(R,G,B)で構成される色成分に対して、そのボクセルの近傍のボクセルの不透明度αを基に、そのボクセルにおける勾配ベクトルを算出し、算出した勾配ベクトルを用いて、陰影値を算出し、色成分(R,G,B)の各値に陰影値を乗算した値に置き換える手段である。 The voxel image creating means 60 refers to a color map defined by associating color component values and opacities with signal values, and refers to each pixel of a plurality of tomographic images arranged three-dimensionally. This is a means of creating a voxel image by giving color component values and opacity to voxels. The voxel image creating means 60 further comprises opacity correcting means 61 and shadow adding means 62 . The opacity correction means 61 is means for correcting the opacity α of each pixel of the voxel image using a predetermined table. The shading means 62 calculates a gradient vector for the color component (R, G, B) of each voxel of the voxel image based on the opacity α of voxels in the vicinity of the voxel. Then, using the calculated gradient vector, the shade value is calculated, and each value of the color components (R, G, B) is multiplied by the shade value to replace the value.

断層画像読込手段10およびカラーマップ読込手段20は、CPU1が補助しながら、主にデータ入出力I/F5において実現される。ROIクリッピング設定手段30およびマスク設定手段40は、CPU1が補助しながら、主に指示入力I/F4において実現される。不透明外接領域算出手段50、ボクセル画像作成手段60、不透明度補正手段61、陰影付加手段62は、CPU1が、記憶装置3に記憶されているプログラムを実行することにより実現される。レンダリング手段70は、CPU1が補助しながら、主にGPU7においてプログラムを実行することにより実現される。レンダリング画像出力手段80は、CPU1が補助しながら、主にフレームメモリ8と表示部6において実現される。 The tomographic image reading means 10 and the color map reading means 20 are realized mainly in the data input/output I/F 5 with the assistance of the CPU 1 . The ROI clipping setting means 30 and the mask setting means 40 are realized mainly in the instruction input I/F 4 with the assistance of the CPU 1 . The opaque circumscribed area calculation means 50 , the voxel image creation means 60 , the opacity correction means 61 and the shadow addition means 62 are implemented by the CPU 1 executing programs stored in the storage device 3 . The rendering means 70 is implemented mainly by executing a program on the GPU 7 with the assistance of the CPU 1 . The rendered image output means 80 is realized mainly in the frame memory 8 and the display section 6 with the assistance of the CPU 1 .

図3に示した各構成手段は、現実には図2に示したように、コンピュータおよびその周辺機器等のハードウェアに専用のプログラムを搭載することにより実現される。すなわち、コンピュータが、専用のプログラムに従って各手段の内容を実行することになる。なお、本明細書において、コンピュータとは、CPU、GPU等の演算処理部を有し、データ処理が可能な装置を意味し、パーソナルコンピュータなどの汎用コンピュータだけでなく、GPUを搭載するタブレットなどの携帯端末や様々な装置に組み込まれたコンピュータも含む。 Each component shown in FIG. 3 is actually implemented by installing a dedicated program in hardware such as a computer and its peripherals, as shown in FIG. That is, the computer executes the contents of each means according to a dedicated program. In this specification, a computer means a device that has an arithmetic processing unit such as a CPU or GPU and is capable of data processing. It also includes computers embedded in mobile terminals and various devices.

<2.処理動作>
次に、図2、図3に示したボリュームレンダリング装置の処理動作について説明する。図4は、本実施形態に係るボリュームレンダリング装置の処理動作を示すフローチャートである。まず、断層画像読込手段10が、複数の断層画像を読み込む。複数の断層画像は、図1(a)に示したような態様のものである。本実施形態では、DICOM形式の断層画像群Do(x,y,z)(-32768≦Do(x,y,z)≦32767,0≦x≦Sx-1,0≦y≦Sy-1,0≦z≦Sz-1; 解像度:Rxy,Rz)を読み込むものとする。断層画像群Do(x,y,z)は1画素が16ビットで記録されるため、-32768~32767の信号値Do(x,y,z)が記録されている。断層画像群Do(x,y,z)は、x座標のサイズ(画素数)がSx、y座標のサイズ(画素数)がSyの断層画像が、Sz枚積層されたものである。なお、以後の説明では、断層画像の枚数SzをMとも表現する。図1(b)における1枚の断層画像の左右方向がx軸、上下方向がy軸に対応し、図1(a)に示した複数の断層画像を当該断層画像のDICOMヘッダに記録されている所定のスライス間隔(隣接する断層画像のImage Positionタグ情報の差分)で重ねた場合の積層方向がz軸に対応する。
<2. Processing operation>
Next, processing operations of the volume rendering apparatus shown in FIGS. 2 and 3 will be described. FIG. 4 is a flowchart showing processing operations of the volume rendering apparatus according to this embodiment. First, the tomographic image reading means 10 reads a plurality of tomographic images. The plurality of tomographic images are in the form shown in FIG. 1(a). In this embodiment, a DICOM format tomographic image group Do (x, y, z) (-32768≤Do (x, y, z)≤32767, 0≤x≤Sx-1, 0≤y≤Sy-1, 0≦z≦Sz−1; resolution: Rxy, Rz). Since one pixel of the tomographic image group Do(x, y, z) is recorded with 16 bits, signal values Do(x, y, z) of -32768 to 32767 are recorded. The tomographic image group Do (x, y, z) is obtained by stacking Sz tomographic images each having an x-coordinate size (number of pixels) of Sx and a y-coordinate size (number of pixels) of Sy. In the following description, the number of tomographic images Sz is also expressed as M. The horizontal direction of one tomographic image in FIG. 1(b) corresponds to the x-axis, and the vertical direction corresponds to the y-axis. The lamination direction when superimposed at a predetermined slice interval (difference in Image Position tag information of adjacent tomographic images) corresponds to the z-axis.

DICOM形式の複数の断層画像を読み込んだら、ROIクリッピング設定手段30が、ROIクリッピング設定を行う(ステップS10)。ROIとはRegion of Interestの略であり、本明細書では3次元空間における関心領域を意味する(学術的には、ROIは2次元領域を指し、3次元領域の場合、VOI(Volume of Interest)と称するが、医用画像業界では3次元領域でもROIが多用される)。ここでは、レンダリング画像およびボクセル画像の作成対象とする範囲を示す。ROIをクリッピング(切り取り)して設定することにより、3次元的に任意の位置で被写体を断裁したボリュームレンダリング像を生成することができ、体表や骨に隠れた臓器や臓器の内部を描出するのに用いられる。ステップS40以降の処理において、所定の範囲にボクセル画像作成対象が限定されるように、ステップS10においてROIを設定する。この設定は、xyz各軸方向のそれぞれの座標範囲を数値で指定することにより行われる。数値の指定は、直接行ってもよいし、マウス等により画面上で位置を指示し、指示入力I/F4を介して数値に変換することにより行ってもよい。 After reading a plurality of DICOM-format tomographic images, the ROI clipping setting means 30 sets the ROI clipping (step S10). ROI is an abbreviation for Region of Interest, and in this specification means a region of interest in a three-dimensional space (scientifically, ROI refers to a two-dimensional region, and in the case of a three-dimensional region, VOI (Volume of Interest) , but in the medical imaging industry, ROI is often used even in a three-dimensional area). Here, the ranges for which rendering images and voxel images are to be created are shown. By clipping (cutting) and setting the ROI, it is possible to generate a volume rendering image in which the subject is cropped at any desired position three-dimensionally, and to depict the internal organs and organs hidden behind the body surface and bones. used for In the processing after step S40, the ROI is set in step S10 so that the voxel image creation target is limited to a predetermined range. This setting is performed by specifying each coordinate range in each of the xyz axis directions with numerical values. The numeric value may be specified directly, or may be specified by pointing a position on the screen with a mouse or the like and converting it into a numeric value via the instruction input I/F 4 .

読み込んだ各断層画像のx軸方向の左端に対応する座標をXso、x軸方向の右端に対応する座標をXeo、y軸方向の上端に対応する座標をYso、y軸方向の下端に対応する座標をYeo、第1スライス(先頭:第1番目)の断層画像に対応する座標をZso、最終スライス(末尾:第M番目)の断層画像に対応する座標をZeoとすると、Xso≦Xs<Xe≦Xeo、Yso≦Ys<Ye≦Yeo、Zso≦Zs<Ze≦Zeoを満たす[Xs,Xe]、[Ys,Ye]、[Zs,Ze]の直方体で定義される範囲をROIと定義し処理対象として特定する。すなわち、レンダリング画像を生成する対象となるボクセル画像領域を指定する6つの座標Xs,Xe,Ys,Ye,Zs,Zeが定義される。この6つの座標により、xyz各軸に沿った辺をもつ直方体が定義され、その直方体の内部がクリッピングされたROIとなる。本実施形態では、後述のステップS30において不透明外接領域を算出するが、この不透明外接領域もxyz各軸の所定の範囲で定義される直方体形状の領域としている。 Xso is the coordinate corresponding to the left end in the x-axis direction of each read tomographic image, Xeo is the coordinate corresponding to the right end in the x-axis direction, Yso is the coordinate corresponding to the upper end in the y-axis direction, and Yso is the coordinate corresponding to the lower end in the y-axis direction. Let Yeo be the coordinates, Zso be the coordinates corresponding to the tomographic image of the first slice (first: first), and Zeo be the coordinates corresponding to the last slice (end: Mth) tomographic image. A range defined by a rectangular parallelepiped of [Xs, Xe], [Ys, Ye], and [Zs, Ze] satisfying ≦Xeo, Yso≦Ys<Ye≦Yeo, Zso≦Zs<Ze≦Zeo is defined as an ROI and processed. Identify as a target. That is, six coordinates Xs, Xe, Ys, Ye, Zs, and Ze are defined that specify the voxel image area for which the rendering image is to be generated. These six coordinates define a rectangular parallelepiped with sides along the xyz axes, and the inside of the rectangular parallelepiped becomes the clipped ROI. In this embodiment, an opaque circumscribed area is calculated in step S30, which will be described later, and this opaque circumscribed area is also a rectangular parallelepiped area defined by a predetermined range on each of the xyz axes.

ステップS10におけるROIクリッピング設定の結果、処理対象の画素数が(Xeo-Xso+1)×(Yeo-Yso+1)×(Zeo-Zso+1)画素から、(Xe-Xs+1)×(Ye-Ys+1)×(Ze-Zs+1)画素に削減されることになる。ROIクリッピング設定手段30によるステップS10のROIクリッピング設定を行うことにより、観察対象の臓器を露出させたボリュームレンダリング像が得られるという効果に加え、処理対象の画素が減って処理負荷を抑え応答性を向上させることができるという二重のメリットがあるため、設定される場合が多いが、必須の処理ではなく省略することも可能である。尚、ステップS10のROIクリッピング設定の段階では、ROIクリッピングを適用する範囲を定義するだけで、具体的なROIのクリッピング処理は、ステップS40以降の各処理で実行される。各々の処理において、ボクセル画像のROI内に限定して演算が行われることにより処理負荷が軽減され、ステップS60のレンダリング処理でクリッピング(断裁)されたボリュームレンダリング像が生成される。 As a result of the ROI clipping setting in step S10, the number of pixels to be processed is (Xeo−Xso+1)×(Yeo−Yso+1)×(Zeo−Zso+1) pixels, and (Xe−Xs+1)×(Ye−Ys+1)×(Ze− Zs+1) pixels. By performing the ROI clipping setting in step S10 by the ROI clipping setting means 30, in addition to the effect of obtaining a volume rendering image in which the organ to be observed is exposed, the number of pixels to be processed is reduced, thereby suppressing the processing load and improving the responsiveness. Since there is a double merit that it can be improved, it is often set, but it is possible to omit it because it is not an essential process. At the stage of ROI clipping setting in step S10, only the range to which ROI clipping is applied is defined, and specific ROI clipping processing is executed in each processing after step S40. In each process, the processing load is reduced by performing calculations only within the ROI of the voxel image, and a clipped (cut) volume rendering image is generated in the rendering process of step S60.

ROIクリッピング設定手段30により、ROIクリッピング設定が行われたら、次に、マスク設定手段40が、マスク設定を行う(ステップS20)。マスク設定とは、断層画像の各画素を表示させるか否かの設定である。マスク設定の手法は、特に限定されないが、本実施形態では、ステップS10において読み込んだ断層画像群をMPR画像(アキシャル・コロナル・サジタルの3画面)として画面表示するとともに、本明細書に記載の方法または公知の手法により作成されるボリュームレンダリング像を表示させ、これら2次元投影された複数の画像の中から最も指示がしやすい画像を選択し、選択した画像の2次元領域を指示しながら、マスクして表示させない範囲とマスクせずに表示させる領域を特定する。このマスク設定により、断層画像群に対応した3次元空間におけるマスクデータが得られる。マスクデータMask(x,y,z)は、断層画像群Do(x,y,z)の各画素に対応して“0”か“1”かのいずれかの値が設定されたものである。このような3次元マスクを作成する処理は必須の処理に近いが、省略することも可能である。観察対象の臓器を描出する方法として、上述のROIクリッピングもあるが、3次元マスクに比べ操作が簡便であり、処理負荷も減少するため、ROIクリッピング処理も併用される頻度が多い。ROIクリッピング設定手段30、マスク設定手段40により表示させるべき特定の領域が設定されることになるが、両手段で設定されている場合は、いずれも表示すべき領域として設定された領域が有効領域となり、いずれか一方が設定されている場合は、設定された領域が有効領域となる。ROIクリッピング設定手段30、マスク設定手段40のどちらも用いられない場合は、読み込まれた断層画像群の全領域が有効領域となる。 After the ROI clipping setting is performed by the ROI clipping setting means 30, the mask setting means 40 next performs mask setting (step S20). A mask setting is a setting as to whether or not to display each pixel of a tomographic image. The mask setting method is not particularly limited, but in this embodiment, the group of tomographic images read in step S10 is displayed on the screen as an MPR image (three screens of axial, coronal, and sagittal), and the method described in this specification is displayed. Alternatively, a volume rendering image created by a known method is displayed, an image that is easiest to indicate is selected from a plurality of these two-dimensionally projected images, and a two-dimensional region of the selected image is indicated while masking. to specify the range that should not be displayed and the area that should be displayed without masking. With this mask setting, mask data in a three-dimensional space corresponding to the group of tomographic images is obtained. The mask data Mask (x, y, z) is set to either "0" or "1" corresponding to each pixel of the tomographic image group Do (x, y, z). . Although the process of creating such a three-dimensional mask is almost essential, it can be omitted. Although the above-mentioned ROI clipping is also available as a method of depicting an organ to be observed, the ROI clipping process is often used in combination because the operation is simpler than that of the three-dimensional mask and the processing load is reduced. A specific area to be displayed is set by the ROI clipping setting means 30 and the mask setting means 40. If both are set, the area set as the area to be displayed is the effective area. , and if either one is set, the set area becomes the valid area. When neither the ROI clipping setting means 30 nor the mask setting means 40 is used, the entire area of the loaded tomographic image group becomes the effective area.

次に、不透明外接領域算出手段50が、不透明外接領域の算出処理を行う(ステップS30)。不透明外接領域とは、不透明度が0でない画素が存在する範囲に3次元の各軸方向において外接する領域である。不透明外接領域は不透明度が0でない画素が存在する範囲に外接する領域であれば、外接する辺(線分)の方向は特に限定されない。この外接する辺は直線に限定されず曲線であってもよい。しかし、断層画像の2つの座標軸の方向と、断層画像を積層した方向に沿った辺で規定される直方体の内部の領域とすることが好ましい。具体的な処理としては、カラーマップ読込手段20から読み込んだカラーマップを用いて、クリッピング設定後の断層画像のROIに含まれる各画素の信号値に対して対応する不透明度を付与し、付与した不透明度に基づいて不透明外接領域を算出する。図5は、本実施形態で用いるカラーマップを示す図である。図5において、信号値は、断層画像の各画素に記録された信号値であり、R、G、Bは、それぞれ赤、緑、青の色成分であり、αはそのボクセルの表示の程度を規定する不透明度である。図5は、断層画像の信号値が16ビットで記録され、-32768~32767の値をとる場合のカラーマップである。なお、CT画像の場合は、水(water)成分を0として-2048から2048の範囲に正規化される場合が多い。図5に示すように、カラーマップには、断層画像の各画素の信号値に対して、R、G、Bの各色成分と不透明度αが対応付けられている。このカラーマップは、ボクセル画像作成手段60によるボクセル画像作成処理においても用いられる(後述:ステップS40)。ステップS30における不透明外接領域の算出処理においては、カラーマップのうち不透明度αのみを用いる。カラーマップを参照して得られた不透明度αを用いることにより、断層画像においてα=0となる不透明な画素が存在する領域を不透明外接領域として算出することができる。この不透明外接領域に対応する領域をボクセル化領域として、ステップS40においてボクセル画像を作成する。「不透明外接領域に対応する領域」として、不透明外接領域をそのままボクセル化の対象とするボクセル化領域とすることもできるが、本実施形態では、後述するように、不透明外接領域を1画素分広げた領域を、不透明外接領域に対応するボクセル化領域としている。 Next, the opaque circumscribed area calculation means 50 performs opaque circumscribed area calculation processing (step S30). An opaque circumscribing area is an area that circumscribes a range in which pixels whose opacity is not 0 exists in each three-dimensional axial direction. The direction of the circumscribing side (line segment) is not particularly limited as long as the opaque circumscribing region is a region circumscribing the range in which pixels whose opacity is not 0 exist. This circumscribing side is not limited to a straight line and may be a curved line. However, it is preferable to set the region inside a rectangular parallelepiped defined by the directions of the two coordinate axes of the tomographic images and the side along the direction in which the tomographic images are stacked. As a specific process, using the color map read from the color map reading means 20, the opacity corresponding to the signal value of each pixel included in the ROI of the tomographic image after clipping setting is applied. Calculate the opaque bounding area based on the opacity. FIG. 5 is a diagram showing a color map used in this embodiment. In FIG. 5, the signal value is the signal value recorded in each pixel of the tomographic image, R, G, and B are the color components of red, green, and blue, respectively, and α is the degree of display of the voxel. Opacity to specify. FIG. 5 is a color map when signal values of a tomographic image are recorded in 16 bits and take values from -32768 to 32767. FIG. In the case of a CT image, it is often normalized to a range from -2048 to 2048 with the water component set to 0. As shown in FIG. 5, in the color map, the signal value of each pixel of the tomographic image is associated with each of the R, G, and B color components and the opacity α. This color map is also used in voxel image creation processing by the voxel image creation means 60 (described later: step S40). In the process of calculating the opaque circumscribed area in step S30, only the opacity α of the color map is used. By using the opacity α obtained by referring to the color map, it is possible to calculate, as an opaque circumscribed region, an area in which there are opaque pixels where α=0 in the tomographic image. A voxel image is created in step S40 using the area corresponding to this opaque circumscribed area as a voxelized area. As the "region corresponding to the opaque circumscribing region", the opaque circumscribing region can be used as it is as a voxelized region to be voxelized. The area that is covered by the rectangle is defined as the voxelized area corresponding to the opaque circumscribed area.

次に、ボクセル画像作成手段60が、ボクセル画像作成処理を行う(ステップS40)。ボクセル画像とは、断層画像の各画素が3次元空間にボクセルとして配置されたボクセル構造体である。ステップS40における具体的な処理としては、カラーマップ読込手段20から読み込んだカラーマップを用いて、クリッピング設定後の断層画像のROI範囲に含まれる各画素の信号値に対して対応する値を付与し、ステップS30において算出されたボクセル化領域に含まれるボクセル画像を作成する。図5に示したようなカラーマップを用いて、断層画像の各画素に対応するボクセル画像の各ボクセルに対して、その画素の信号値に対応するR、G、Bの各色成分と不透明度αをボクセル値として与えることにより、フルカラーのボリュームレンダリング像を生成するためのボクセル画像を作成することができる。 Next, the voxel image creation means 60 performs voxel image creation processing (step S40). A voxel image is a voxel structure in which each pixel of a tomographic image is arranged as a voxel in a three-dimensional space. As a specific process in step S40, a value corresponding to the signal value of each pixel included in the ROI range of the tomographic image after clipping setting is added using the color map read from the color map reading means 20. , to create a voxel image included in the voxelized area calculated in step S30. Using the color map as shown in FIG. 5, for each voxel of the voxel image corresponding to each pixel of the tomographic image, each color component of R, G, and B corresponding to the signal value of that pixel and the opacity α is given as a voxel value, a voxel image for generating a full-color volume rendering image can be created.

図5に示したようなカラーマップを用いることにより、断層画像において所定の信号値を有する箇所を、任意の色成分、任意の不透明度で表現することができる。断層画像においては、臓器、器官等の部位に応じて信号値が異なるため、ボリュームレンダリング像において、カラーマップを定義することにより、信号値の相違に基づいて、人為的に、特定の臓器を色分けしたり、特定の器官を透明にして背後に隠れた臓器を露出させたりすることができる。特定の部位の不透明度αを最大値(α=255)に設定すれば、その部位だけが明瞭に表示され、その部位の奥に位置する部位は描出されない。逆に特定の部位の不透明度αを最小値(α=0)に設定すれば、その部位は不可視(透明)になり、その部位の奥に位置する部位が露出される。特定の部位の不透明度αを中間調(0<α<255)に設定すれば、その部位が半透明で表示され、その奥に位置する部位が透かし合成されて表示される。また、色成分R、G、Bとしては、目的とする部位を視認し易くするための任意の値を設定することができる。 By using a color map such as that shown in FIG. 5, a portion having a predetermined signal value in a tomographic image can be expressed with an arbitrary color component and an arbitrary opacity. In a tomographic image, since signal values differ according to parts such as organs, specific organs can be artificially colored based on differences in signal values by defining a color map in a volume rendering image. or make certain organs transparent to reveal hidden organs behind them. If the opacity α of a specific part is set to the maximum value (α=255), only that part will be clearly displayed, and the parts located behind that part will not be rendered. Conversely, if the opacity α of a specific portion is set to the minimum value (α=0), that portion becomes invisible (transparent), and the portion located behind that portion is exposed. If the opacity α of a specific portion is set to a halftone (0<α<255), that portion is displayed semi-transparently, and the portion located behind it is displayed as a watermark. Moreover, as the color components R, G, and B, arbitrary values can be set so as to facilitate visual recognition of the target portion.

したがって、カラーマップは、観察対象の部位ごとに設定しておくことができ、同じ断層画像群に対しても、異なるカラーマップを使用することにより、異なるボリュームレンダリング像が得られることになる。すなわち、肺用のカラーマップを用いれば、肺の部分が目立ったボリュームレンダリング像が得られ、心臓用のカラーマップを用いれば、心臓の部分が目立ったボリュームレンダリング像が得られる。ただし、各臓器の信号値分布は互いにオーバーラップしていることもあるため、特定の臓器のみを描出するカラーマップを作成することはできないことが多い。例えば、心臓用のカラーマップでは肋骨・胸骨も同時に描出され、心臓はこれらの骨に隠れてしまうため、ROIクリッピングを設定して肋骨を仮想的に断裁するなどの工夫が必要になる。 Therefore, a color map can be set for each site to be observed, and different volume rendering images can be obtained by using different color maps for the same group of tomographic images. That is, if the color map for lungs is used, a volume rendering image in which the lung portion is conspicuous is obtained, and if the color map for heart is used, a volume rendering image in which the heart portion is conspicuous is obtained. However, since the signal value distribution of each organ may overlap each other, it is often impossible to create a color map that renders only a specific organ. For example, in the color map for the heart, the ribs and sternum are also drawn at the same time, and the heart is hidden by these bones.

本実施形態では、指示入力I/F4を介した操作により、使用中のカラーマップに変更を加えたり、異なるカラーマップを読み込んだりすることが可能となっている。そして、ボリュームレンダリング装置は、変更されたカラーマップまたは新たに読み込まれたカラーマップを参照して、ボリュームレンダリング像として提示するためのレンダリング画像を生成する。本実施形態のボリュームレンダリング装置は、レンダリング画像を高速で生成することが可能であるため、カラーマップの変更に対してリアルタイムにボリュームレンダリング像を更新できる。 In this embodiment, it is possible to change the color map in use or load a different color map by operating via the instruction input I/F 4 . The volume rendering device then refers to the changed color map or the newly loaded color map to generate a rendered image to be presented as a volume rendered image. Since the volume rendering apparatus of this embodiment can generate a rendering image at high speed, it can update the volume rendering image in real time in response to changes in the color map.

ステップS40においては、ボクセル画像作成手段60が、複数の断層画像のXs<x<XeかつYs<y<YeかつZs<z<Zeの範囲内であって、かつステップS30において算出されたボクセル化領域に含まれる各画素(x,y,z)における信号値を用いてカラーマップを参照し、信号値に対応する色成分であるR、G、Bと、不透明度αの値を取得し、その値を対応するボクセルの値とする。複数枚の断層画像における全ての画素に対して、この処理を行うことにより、複数枚の断層画像に対応した3次元のボクセル画像が得られる。これにより、ボクセル画像の各ボクセルの値は、R、G、B、αの4つとなる。各色成分R、G、B、αはそれぞれ1画素につき8ビットで記録されるため、ボクセル画像においては、1画素32ビットで記録されることになる。 In step S40, the voxel image generating means 60 performs voxelization of the plurality of tomographic images within the range of Xs<x<Xe, Ys<y<Ye, and Zs<z<Ze and calculated in step S30. Referencing the color map using the signal value of each pixel (x, y, z) included in the region, obtaining the values of the color components R, G, B and the opacity α corresponding to the signal value, Let that value be the value of the corresponding voxel. By performing this process on all pixels in a plurality of tomographic images, a three-dimensional voxel image corresponding to the plurality of tomographic images can be obtained. As a result, each voxel in the voxel image has four values of R, G, B, and α. Since each color component R, G, B, and α is recorded with 8 bits per pixel, each pixel is recorded with 32 bits in the voxel image.

本実施形態では、ステップS30における不透明外接領域の算出処理、ステップS40におけるボクセル画像作成処理は、複数のCPUコアにより並行して行われる。ここで、ステップS30における不透明外接領域の算出処理の詳細について説明する。図6は、ステップS30における不透明外接領域の算出処理等を並行して行う場合を示すフローチャートである。不透明外接領域算出手段50は、ステップS10で読み込んだ断層画像群をN個(N≧2の整数)に分割し、各CPUコアで並列処理を行う。(x,y)座標を備えた各断層画像が積層された方向がz軸方向となるため、z座標の値に応じてN個に分割する。具体的には、各断層画像群の先頭の断層画像の座標をZ1、末尾の断層画像の座標をZ2とし、先頭座標Z1、末尾座標Z2に、読み込んだ断層画像を割り当てていく。例えば、1番目のCPUコアには、Z1=Zs、Z2=Zs+(Ze-Zs+1)/N-1が設定される。各断層画像群には、断層画像が順に配置されているが、一端を先頭、他端を末尾としている。 In this embodiment, the opaque circumscribed area calculation process in step S30 and the voxel image creation process in step S40 are performed in parallel by a plurality of CPU cores. Here, the details of the calculation process of the opaque circumscribed area in step S30 will be described. FIG. 6 is a flow chart showing a case where the processing for calculating the opaque circumscribed area and the like in step S30 are performed in parallel. The opaque circumscribed area calculation means 50 divides the tomographic image group read in step S10 into N (an integer of N≧2), and performs parallel processing in each CPU core. Since the direction in which each tomographic image having (x, y) coordinates is stacked is the z-axis direction, it is divided into N pieces according to the value of the z-coordinate. Specifically, the coordinates of the leading tomographic image of each tomographic image group are set to Z1, and the coordinates of the trailing tomographic image are set to Z2, and the read tomographic images are assigned to the leading coordinate Z1 and the trailing coordinate Z2. For example, Z1=Zs and Z2=Zs+(Ze-Zs+1)/N-1 are set for the first CPU core. In each tomographic image group, tomographic images are arranged in order, with one end being the head and the other end being the tail.

次に、処理対象とする断層画像群に対する不透明外接領域を算出する(ステップS330)。ステップS330における処理は、N個のCPUコアにより並行して処理が行われる。ステップS330における処理の詳細については後述する。 Next, an opaque circumscribed region is calculated for the group of tomographic images to be processed (step S330). The processing in step S330 is performed in parallel by N CPU cores. Details of the processing in step S330 will be described later.

ステップS330における断層画像群に対する不透明外接領域の算出を終えたら、N個の断層画像群からなる断層画像全体に対して、不透明外接領域の算出を行う(ステップS360)。ステップS360における処理の詳細についても後述する。本実施形態では、複数に分割した断層画像群を複数のCPUコアで並行に処理する。 After the calculation of the opaque circumscribing region for the tomographic image group in step S330, the opaque circumscribing region is calculated for the entire tomographic image consisting of the N tomographic image groups (step S360). Details of the processing in step S360 will also be described later. In this embodiment, a plurality of divided tomographic image groups are processed in parallel by a plurality of CPU cores.

上述のステップS330の処理の詳細について説明する。図7は、ステップS330における断層画像群に対する不透明外接領域の算出処理を示すフローチャートである。ステップS330の処理は、分割されたN個の各断層画像群に対して行われる。ステップS330においては、各断層画像群の先頭の断層画像の座標をZ1、末尾の断層画像の座標をZ2とし、先頭座標Z1、末尾座標Z2に、読み込んだ断層画像を割り当てる。例えば、1番目のCPUコアには、Z1=Zs、Z2=Zs+(Ze-Zs+1)/N-1が設定される。各断層画像群には、断層画像が順に配置されているが、一端を先頭、他端を末尾としている。 Details of the processing of step S330 described above will be described. FIG. 7 is a flow chart showing the process of calculating an opaque circumscribed region for a group of tomographic images in step S330. The processing of step S330 is performed on each of the divided N tomographic image groups. In step S330, the coordinates of the top tomographic image of each tomographic image group are set to Z1 and the coordinates of the last tomographic image are set to Z2, and the read tomographic images are assigned to the top coordinate Z1 and the bottom coordinate Z2. For example, Z1=Zs and Z2=Zs+(Ze-Zs+1)/N-1 are set for the first CPU core. In each tomographic image group, tomographic images are arranged in order, with one end being the head and the other end being the tail.

まず、初期設定を行う(ステップS331)。具体的には、断層画像を特定するzと、断層画像の座標値であるx,yと、xの最小値、最大値をそれぞれ決定するための変数Xmin(tid)、Xmax(tid)と、yの最小値、最大値をそれぞれ決定するための変数Ymin(tid)、Ymax(tid)と、zの最小値、最大値をそれぞれ決定するための変数Zmin(tid)、Zmax(tid)に初期値を与える。(tid)は、断層画像群を特定する識別情報であり、N個の各断層画像群に対応する値が与えられる。このtidは、処理スレッドを特定する識別情報でもある。 First, initial setting is performed (step S331). Specifically, z specifying a tomographic image, x and y as coordinate values of the tomographic image, variables Xmin(tid) and Xmax(tid) for determining the minimum and maximum values of x, respectively, Variables Ymin(tid) and Ymax(tid) for determining the minimum and maximum values of y, respectively, and variables Zmin(tid) and Zmax(tid) for determining the minimum and maximum values of z are initialized. give a value. (tid) is identification information for specifying a tomographic image group, and a value corresponding to each of the N tomographic image groups is given. This tid is also identification information that identifies the processing thread.

x,yとしては、ステップS10においてROIクリッピング設定が行われている場合、その最小値Xs、最小値Ysをそれぞれ与える。また、Xmin(tid)、Xmax(tid)、Ymin(tid)、Ymax(tid)、Zmin(tid)、Zmax(tid)としては、ステップS10においてROIクリッピング設定が行われている場合、最小値を決定するための変数には、ROIクリッピング設定による最大値を与え、最大値を決定するための変数には、ROIクリッピング設定による最小値を与える。したがって、ROIクリッピング設定が行われている場合、以下の〔数式1〕に示すように初期値が設定される。 As x and y, when ROI clipping is set in step S10, the minimum value Xs and the minimum value Ys are given, respectively. In addition, as Xmin(tid), Xmax(tid), Ymin(tid), Ymax(tid), Zmin(tid), and Zmax(tid), the minimum values are set to The variable for determination is given the maximum value by the ROI clipping setting, and the variable for determining the maximum value is given the minimum value by the ROI clipping setting. Therefore, when ROI clipping is set, the initial values are set as shown in [Formula 1] below.

〔数式1〕
Xmin(tid)=Xe
Xmax(tid)=Xs
Ymin(tid)=Ye
Ymax(tid)=Ys
Zmin(tid)=Ze
Zmax(tid)=Zs
[Formula 1]
Xmin(tid) = Xe
Xmax(tid) = Xs
Y min (tid) = Ye
Ymax(tid)=Ys
Zmin(tid)=Ze
Zmax(tid)=Zs

なお、ステップS10においてROIクリッピング設定が省略されている場合には、[Xs,Xe]、[Ys,Ye]、[Zs,Ze]に代えて断層画像群の最小値、最大値である[Xso,Xeo]、[Yso,Yeo]、[Zso,Zeo]が初期値として設定される。 Note that if the ROI clipping setting is omitted in step S10, [Xso , Xeo], [Yso, Yeo], and [Zso, Zeo] are set as initial values.

初期設定が行われたら、断層画像の対象画素の信号値により図5に示したカラーマップを参照し、不透明度αを取得する(ステップS332)。次に、取得した不透明度α、マスクデータMask(x,y,z)の少なくとも一方が“0”であるか否かを判定する(ステップS333)。なお、ステップS20におけるマスク設定が省略されている場合には、マスクデータMask(x,y,z)が“0”であるか否かの判定は行わず、不透明度αのみが“0”であるか否かの判定を行う。 After the initial setting is performed, the color map shown in FIG. 5 is referenced by the signal value of the target pixel of the tomographic image to acquire the opacity α (step S332). Next, it is determined whether or not at least one of the acquired opacity α and mask data Mask (x, y, z) is "0" (step S333). If the mask setting in step S20 is omitted, it is not determined whether the mask data Mask (x, y, z) is "0", and only the opacity α is "0". It is determined whether or not there is

ステップS333において、“No”すなわち不透明度α、マスクデータMask(x,y,z)の両方が“0”でない場合には、不透明とすべき画素であると考えられるため、最小値を決定するための変数Xmin(tid)、Ymin(tid)、Zmin(tid)、最大値を決定するための変数Xmax(tid)、Ymax(tid)、Zmax(tid)を変更する(ステップS334)。具体的には、以下の〔数式2〕に従った処理を実行することにより、変数の値を変更する。 In step S333, if "No", that is, if both the opacity α and the mask data Mask (x, y, z) are not "0", the pixel is considered to be opaque, so the minimum value is determined. variables Xmin(tid), Ymin(tid), and Zmin(tid) for determining the maximum value, and variables Xmax(tid), Ymax(tid), and Zmax(tid) for determining the maximum value (step S334). Specifically, the value of the variable is changed by executing the processing according to [Formula 2] below.

〔数式2〕
x<Xmin(tid)の場合、Xmin(tid)=x
x>Xmax(tid)の場合、Xmax(tid)=x
y<Ymin(tid)の場合、Ymin(tid)=y
y>Ymax(tid)の場合、Ymax(tid)=y
z<Zmin(tid)の場合、Zmin(tid)=z
z>Zmax(tid)の場合、Zmax(tid)=z
[Formula 2]
If x<Xmin(tid) then Xmin(tid)=x
If x>Xmax(tid) then Xmax(tid)=x
If y<Ymin(tid) then Ymin(tid)=y
If y>Ymax(tid) then Ymax(tid)=y
If z<Zmin(tid) then Zmin(tid)=z
If z>Zmax(tid) then Zmax(tid)=z

〔数式2〕により、対象とする断層画像群(tid)における不透明外接領域を定義するxyz各軸方向の最小値または最大値の各値が、前述の不透明度α、マスクデータMask(x,y,z)の両方が“0”でないという条件を満足する断層画像(z)における画素(x,y)の3次元座標値(x,y,z)により更新される。 By [Equation 2], each value of the minimum value or maximum value in each of the xyz axis directions defining the opaque circumscribed region in the target tomographic image group (tid) is the above-mentioned opacity α, the mask data Mask (x, y , z) are not "0".

ステップS333において、すなわち不透明度α等が“0”であると判定された場合、“0”でないと判定されてステップS334により変数を変更された場合のいずれにおいても、対象とする画素に対する処理を終えたことになるので、次に、対象画素をx軸方向において変更する(ステップS335)。具体的には、x座標の値をインクリメントする。x座標の変更の結果、x≦Xeである場合は、ステップS333に戻って、次の画素に対する処理を行う。一方、ステップS335において、x>Xeとなった場合は、対象画素をy軸方向において変更する(ステップS336)。具体的には、y座標の値をインクリメントする。x座標の変更の結果、y≦Yeである場合は、ステップS333に戻って、次の画素に対する処理を行う。このようにして、あるzで特定される断層画像の全ての画素(x,y)に対して処理を終えたら、対象画素をz軸方向において変更する(ステップS337)。すなわち、対象とする断層画像を変更する。ステップS337において、Z>z2となった場合は、1つの断層画像群における(Z2-Z1+1)個の断層画像に対して処理を終えたことになるので、図7に示したステップS330の処理を終了する。 In step S333, that is, when it is determined that the opacity α or the like is "0", or when it is determined not to be "0" and the variable is changed in step S334, the process for the target pixel is performed. Since this is the end, the target pixel is changed in the x-axis direction (step S335). Specifically, the x-coordinate value is incremented. As a result of changing the x-coordinate, if x≤Xe, the process returns to step S333 to process the next pixel. On the other hand, if x>Xe in step S335, the target pixel is changed in the y-axis direction (step S336). Specifically, the value of the y-coordinate is incremented. As a result of changing the x-coordinate, if y≤Ye, the process returns to step S333 to process the next pixel. When all the pixels (x, y) of the tomographic image specified by a certain z have been processed in this way, the target pixel is changed in the z-axis direction (step S337). That is, the target tomographic image is changed. If Z>z2 in step S337, it means that (Z2-Z1+1) tomographic images in one tomographic image group have been processed. finish.

1つの断層画像群における全ての断層画像、画素について処理を行うことにより、不透明度α、マスクデータMask(x,y,z)の両方が“0”でない全ての断層画像、画素について、ステップS334における〔数式2〕に従った処理が実行されることになる。これにより、途中に不透明度α、マスクデータMask(x,y,z)いずれかが“0”の画素があったとしても不透明度α、マスクデータMask(x,y,z)の両方が“0”でない最も外側の断層画像、画素の位置を取得することができる。 By performing processing on all tomographic images and pixels in one tomographic image group, all tomographic images and pixels for which both the opacity α and the mask data Mask (x, y, z) are not "0" are processed in step S334. A process according to [Formula 2] in is executed. As a result, even if there is a pixel in which either the opacity α or the mask data Mask (x, y, z) is “0”, both the opacity α and the mask data Mask (x, y, z) are “0”. The outermost tomographic image that is not 0″, the position of the pixel can be acquired.

図6に示したステップS330の処理をz=Z1~z=Z2まで行うことにより、分割された1つの断層画像群における不透明外接領域が算出される。そして、ステップS360において、N個の全ての断層画像群を集めた断層画像群全体の不透明外接領域を算出する。ステップS360の処理の詳細について説明する。図8は、ステップS360における断層画像群全体の不透明外接領域の算出処理を示すフローチャートである。まず、初期設定を行う(ステップS361)。具体的には、断層画像群を特定する識別情報であるtidと、処理スレッド数を示す固定値Nと、xの最小値、最大値をそれぞれ決定するための変数Xmin、Xmaxと、yの最小値、最大値をそれぞれ決定するための変数Ymin、Ymaxと、zの最小値、最大値をそれぞれ決定するための変数Zmin、Zmaxに初期値を与える。 By performing the processing of step S330 shown in FIG. 6 from z=Z1 to z=Z2, an opaque circumscribed region in one divided tomographic image group is calculated. Then, in step S360, an opaque circumscribed region of the entire group of tomographic images obtained by collecting all the N tomographic image groups is calculated. Details of the processing of step S360 will be described. FIG. 8 is a flow chart showing the calculation processing of the opaque circumscribed region of the entire group of tomographic images in step S360. First, initialization is performed (step S361). Specifically, tid, which is identification information for specifying a group of tomographic images, a fixed value N indicating the number of processing threads, variables Xmin and Xmax for determining the minimum and maximum values of x, respectively, and the minimum value of y Initial values are given to variables Ymin and Ymax for determining the value and maximum value, respectively, and variables Zmin and Zmax for determining the minimum value and maximum value of z, respectively.

次に、各分割画像群において算出された最小値Xmin(tid)、Ymin(tid)、Zmin(tid)、最大値Xmax(tid)、Ymax(tid)、Zmax(tid)を用いて、最小値を決定するための変数Xmin、Ymin、Zmin、最大値を決定するための変数Xmax、Ymax、Zmaxを変更する(ステップS362)。具体的には、以下の〔数式3〕に従った処理を実行することにより、変数の値を変更する。 Next, using the minimum values Xmin(tid), Ymin(tid), Zmin(tid) and the maximum values Xmax(tid), Ymax(tid), Zmax(tid) calculated for each divided image group, the minimum value The variables Xmin, Ymin, and Zmin for determining , and the variables Xmax, Ymax, and Zmax for determining the maximum value are changed (step S362). Specifically, the value of the variable is changed by executing the processing according to [Formula 3] below.

〔数式3〕
Xmin(tid)<Xminの場合、Xmin=Xmin(tid)
Xmax(tid)>Xmaxの場合、Xmax=Xmax(tid)
Ymin(tid)<Yminの場合、Ymin=Ymin(tid)
Ymax(tid)>Ymaxの場合、Ymax=Ymax(tid)
Zmin(tid)<Zminの場合、Zmin=Zmin(tid)
Zmax(tid)>Zmaxの場合、Zmax=Zmax(tid)
[Formula 3]
If Xmin(tid)<Xmin then Xmin=Xmin(tid)
If Xmax(tid)>Xmax then Xmax=Xmax(tid)
If Ymin(tid)<Ymin then Ymin=Ymin(tid)
If Ymax(tid)>Ymax, then Ymax=Ymax(tid)
If Zmin(tid)<Zmin then Zmin=Zmin(tid)
If Zmax(tid)>Zmax then Zmax=Zmax(tid)

〔数式3〕により、対象とする断層画像群(tid)における不透明外接領域のxyz各軸方向の最小値または最大値の各値が、全体の不透明外接領域を定義する範囲を超える場合、当該断層画像群(tid)における不透明外接領域のxyz各軸方向の最小値または最大値の値により、全体の不透明外接領域を定義する範囲が拡大更新される。 According to [Equation 3], when the minimum or maximum values in the xyz axis directions of the opaque circumscribed region in the target tomographic image group (tid) exceed the range defining the entire opaque circumscribed region, the tomographic The range defining the entire opaque circumscribing region is expanded and updated according to the minimum or maximum values in the xyz axis directions of the opaque circumscribing region in the image group (tid).

次に、対象とする断層画像群を変更する(ステップS363)。具体的には、tidの値をインクリメントする。tidの値をインクリメントした結果、tidがNより小さい場合は、全ての断層画像群に対して処理を終えていないことを意味するので、ステップS362に戻って、次の断層画像群に対して最小値、最大値を決定するための変数を変更する処理を行う。tidの値をインクリメントした結果、tidがN以上である場合は、全ての断層画像群に対して処理を終えたことを意味するので、不透明外接領域の境界処理を行う(ステップS364)。ステップS364では、モアレ対策として、不透明度αが0の透明な画素で構成される境界面(x=Xs'またはx=Xe'またはy=Ys'またはy=Ye' またはz=Zs'またはz=Ze')を不透明外接領域の最外周となる外接直方体のエッジに1画素幅だけ付加する。具体的には、ステップS362を繰り返すことにより算出された領域をxyz各軸方向に1画素ずつ拡張する処理を行う。より具体的には、以下の〔数式4〕に従った処理を実行することにより、変数の値を変更する。 Next, the target tomographic image group is changed (step S363). Specifically, the value of tid is incremented. If tid is smaller than N as a result of incrementing the value of tid, it means that processing has not been completed for all tomographic image groups. Perform processing to change variables for determining values and maximum values. If tid is equal to or greater than N as a result of incrementing the value of tid, this means that processing has been completed for all tomographic image groups, and thus boundary processing of opaque circumscribed regions is performed (step S364). In step S364, as a measure against moire, a boundary plane (x=Xs' or x=Xe' or y=Ys' or y=Ye' or z=Zs' or z =Ze') is added to the edge of the circumscribing rectangular parallelepiped that is the outermost periphery of the opaque circumscribing area by one pixel width. Specifically, a process of expanding the calculated area by repeating step S362 by one pixel in each of the xyz axis directions is performed. More specifically, the value of the variable is changed by executing the processing according to [Formula 4] below.

〔数式4〕
Xs´=Xmin-1とし、Xs´<Xsの場合、Xs´=Xs
Xe´=Xmax+1とし、Xe´>Xeの場合、Xe´=Xe
Ys´=Ymin-1とし、Ys´<Ysの場合、Ys´=Ys
Ye´=Ymax+1とし、Ye´>Yeの場合、Ye´=Ye
Zs´=Zmin-1とし、Zs´<Zsの場合、Zs´=Zs
Ze´=Zmax+1とし、Ze´>Zeの場合、Ze´=Ze
[Formula 4]
When Xs'=Xmin-1 and Xs'<Xs, Xs'=Xs
If Xe′=Xmax+1 and Xe′>Xe, then Xe′=Xe
If Ys'=Ymin-1 and Ys'<Ys, then Ys'=Ys
If Ye'=Ymax+1 and Ye'>Ye, then Ye'=Ye
When Zs'=Zmin-1 and Zs'<Zs, Zs'=Zs
When Ze'=Zmax+1 and Ze'>Ze, Ze'=Ze

ステップS364においては、境界となる画素を1画素分だけ外側に移動させている。このようにして外側に1画素分広げた領域をボクセル画像の作成対象とするボクセル化領域とする。ボクセル化領域の最外側の画素は、不透明度αが“0”であるはずなので、ボクセル化領域の最外周の画素、いわゆるボクセル化領域の境界面に位置する画素は、全て透明な画素となる。したがって、不透明外接領域算出手段50は、各軸方向における最外周となる画素に対応する不透明度が0となるようにボクセル化領域を算出することになる。ただし、ボクセル化領域の境界面に位置する画素の色成分(RGB値)は、マスクデータMask(x,y,z)が0またはROIの範囲外であるか否かにかかわらず、断層画像の信号値を基にカラーマップで定義されるRGB値をそのまま付与する。これにより、ボクセル化領域の内部と外部で、不透明度は不連続になるがRGB値は連続性が維持され、このボクセル化領域に対応するボクセル画像に対してレンダリング処理を行った場合、ボクセル化領域の境界面に発生するモアレを抑制することが可能となる。ステップS364における処理の結果得られる[Xs´,Xe´]、[Ys´,Ye´]、[Zs´,Ze´]の直方体で定義される範囲をボクセル化領域と定義し処理対象として特定する。なお、図8のステップS364においては、不透明外接領域の外側に1画素分広げた領域ををボクセル化領域とすることにより、後述するボクセル画像の作成時にボクセル化領域の各軸方向における最外周となるボクセル(画素)に対応する不透明度が0となるようにした。しかし、これに限定されず、不透明外接領域で規定される領域をそのままボクセル化領域とし、後述するボクセル画像の作成時に、最外周となる画素の不透明度が0でない場合であっても、最外周となるボクセルの不透明度を強制的に0に置き換えることにより、最外周となるボクセルに対応する不透明度が0となるようにしてもよい。 In step S364, the boundary pixels are moved outward by one pixel. The area expanded outward by one pixel in this manner is used as a voxelized area for which a voxel image is to be created. Since the outermost pixels of the voxelized area should have an opacity α of "0", the outermost pixels of the voxelized area, so-called pixels located on the boundary surface of the voxelized area, are all transparent pixels. . Therefore, the opaque circumscribed area calculation means 50 calculates the voxelized area so that the opacity corresponding to the outermost pixels in each axial direction is zero. However, regardless of whether the mask data Mask (x, y, z) is 0 or outside the range of the ROI, the color components (RGB values) of the pixels located on the boundary surface of the voxelized area are The RGB values defined by the color map are given as they are based on the signal values. As a result, the opacity is discontinuous inside and outside the voxelized area, but the continuity of the RGB values is maintained. It is possible to suppress moiré that occurs on the boundary surface of the area. A range defined by a rectangular parallelepiped of [Xs', Xe'], [Ys', Ye'], and [Zs', Ze'] obtained as a result of the processing in step S364 is defined as a voxelized region and specified as a processing target. . In step S364 of FIG. 8, by setting the area expanded by one pixel to the outside of the opaque circumscribed area as the voxelized area, the outermost periphery in each axial direction of the voxelized area when creating a voxel image to be described later. The opacity corresponding to each voxel (pixel) is set to 0. However, it is not limited to this, and the area defined by the opaque circumscribed area is used as it is as a voxelized area. By forcibly replacing the opacity of the voxel that becomes 0 with 0, the opacity corresponding to the outermost voxel may be set to 0.

上記のようにして、ステップS30の処理により不透明外接領域が算出される。ここで、ステップS10のROIクリッピング処理により得られるROIと、ステップS30の処理により得られる不透明外接領域を比較してみる。図9は、ROIと不透明外接領域を比較した図である。このうち、図9(a)は、ROI、図9(b)は、不透明外接領域を示している。図9(a)(b)において、楕円状の実線は、複数の断層画像による空間内における不透明画素(α>0)の分布範囲を示している。ここで、不透明画素とは、カラーマップを参照した結果、不透明度αが0より大きい値をもつ画素であり、不透明画素の分布範囲とは、不透明画素が存在している最大範囲を示している。すなわち、不透明画素の分布範囲内には、不透明度αが0である透明画素も存在している。ここでは、図9(a)(b)に示す不透明画素の分布範囲は同一のものを示している。 As described above, the opaque circumscribed area is calculated by the process of step S30. Now, let us compare the ROI obtained by the ROI clipping process of step S10 and the opaque circumscribed area obtained by the process of step S30. FIG. 9 is a diagram comparing an ROI and an opaque circumscribed region. Of these, FIG. 9(a) shows the ROI, and FIG. 9(b) shows the opaque circumscribed area. In FIGS. 9A and 9B, elliptical solid lines indicate the distribution range of opaque pixels (α>0) in the space of multiple tomographic images. Here, opaque pixels are pixels whose opacity α is greater than 0 as a result of referring to the color map, and the distribution range of opaque pixels indicates the maximum range in which opaque pixels exist. . In other words, transparent pixels with an opacity α of 0 also exist within the distribution range of opaque pixels. Here, the distribution range of opaque pixels shown in FIGS. 9A and 9B is the same.

図9(a)においては、実線の直方体がROIを示し、破線の直方体が不透明外接領域を示している。図9(b)においては、実線の直方体が不透明外接領域を示している。上述のように、ROIは、ステップS10におけるROIクリッピング設定において、xyz各軸方向のそれぞれの座標範囲を数値で指定することにより行われる。また、不透明外接領域は、ステップS30における不透明外接領域の算出において、不透明画素の分布範囲に外接する不透明外接領域を算出することにより行われる。通常、ステップS10におけるROIクリッピング設定においては、不透明画素の分布範囲を含むように利用者が設定し、ステップS30における不透明外接領域の算出においては、不透明画素の分布範囲を含む最小の不透明外接領域が算出される。そのため、図9(a)に実線の直方体と破線の直方体で示したように、不透明外接領域がROIに完全に包含され、不透明外接領域の方がROIよりも小さくなる。 In FIG. 9A, solid-line rectangular parallelepipeds indicate ROIs, and broken-line rectangular parallelepipeds indicate opaque circumscribed regions. In FIG. 9B, solid-line rectangular parallelepipeds indicate opaque circumscribed regions. As described above, the ROI is performed by numerically specifying the respective coordinate ranges in the xyz axis directions in the ROI clipping setting in step S10. The opaque circumscribing area is calculated by calculating the opaque circumscribing area that circumscribes the distribution range of the opaque pixels in the calculation of the opaque circumscribing area in step S30. Normally, the ROI clipping setting in step S10 is set by the user so as to include the distribution range of opaque pixels, and in the calculation of the opaque circumscribing region in step S30, the minimum opaque circumscribing region including the distribution range of opaque pixels is Calculated. Therefore, as shown by solid-line rectangular parallelepipeds and broken-line rectangular parallelepipeds in FIG. 9A, the opaque circumscribing region is completely included in the ROI, and the opaque circumscribing region is smaller than the ROI.

したがって、後述のステップS40においては、不透明外接領域に基づくボクセル化領域においてボクセル画像が作成されることになる。しかし、ROIは、ステップS10におけるROIクリッピング設定において任意に設定できるため、必ずしも不透明画素の分布範囲全体を含むように設定されるとは限らない。その場合、ボクセル画像は、ROIと不透明外接領域の両方に含まれる範囲内で作成される。また、マスク設定処理(S20)においてマスクが定義されている場合、図9のα>0の範囲として示されている楕円体のような任意の3次元形状で囲まれる範囲の外側がマスクされα=0となるが、不透明画素の分布範囲とは独立して定義される。即ち、図9のα>0の範囲として示されている楕円体のような分布が2種類存在し、これらの2種類の分布が重なったα>0の分布範囲に外接するように不透明外接領域が設定されることになり、不透明外接領域は更に小さくなる。 Therefore, in step S40 described later, a voxel image is created in the voxelized area based on the opaque circumscribed area. However, since the ROI can be arbitrarily set in the ROI clipping setting in step S10, it is not necessarily set so as to include the entire distribution range of opaque pixels. In that case, a voxel image is created within the bounds of both the ROI and the opaque bounding region. Further, when a mask is defined in the mask setting process (S20), the outside of the range surrounded by an arbitrary three-dimensional shape such as an ellipsoid shown as the range of α>0 in FIG. 9 is masked by α = 0, but is defined independently of the distribution range of opaque pixels. That is, there are two types of ellipsoid-like distributions shown as the range of α>0 in FIG. is set, and the opaque circumscribing area becomes even smaller.

ここで、不透明外接領域の内部における画素の分布について説明する。図9(c)は、図9(b)に対し、ドーナツ型のマスクデータMask(x,y,z)を追加したもので、図9(c)の三重の楕円で挟まれた白色の領域がMask(x,y,z)=0となるマスク領域である。図9(c)においては、不透明度α、マスクデータMask(x,y,z)の両方が“0”でない画素を網掛けで示しており、不透明度α、マスクデータMask(x,y,z)のいずれかが“0”の画素を網掛けせずに示している。図9(c)に示すように、不透明度α、マスクデータMask(x,y,z)の両方が“0”でない画素の分布が内側と外側の二重になっていたとしても、不透明度α、マスクデータMask(x,y,z)の両方が“0”でない画素の分布の最も外側を含むように、不透明外接領域は設定される。内側のマスクデータMask(x,y,z)の両方が“0”でない画素の分布に対しては、不透明外接領域は設定されない。 Now, the distribution of pixels inside the opaque circumscribing region will be described. FIG. 9(c) is obtained by adding doughnut-shaped mask data Mask (x, y, z) to FIG. 9(b). is the mask area where Mask(x, y, z)=0. In FIG. 9C, pixels where both the opacity α and the mask data Mask (x, y, z) are not “0” are shaded. z) is "0" is shown without shading. As shown in FIG. 9(c), even if the distribution of pixels where both the opacity α and the mask data Mask (x, y, z) are not “0” is doubled inside and outside, the opacity The opaque circumscribed area is set so as to include the outermost part of the distribution of pixels where both α and mask data Mask (x, y, z) are not "0". No opaque circumscribed area is set for the distribution of pixels in which both inner mask data Mask (x, y, z) are not "0".

このようにして、不透明外接領域に対応する範囲に縮小したボクセル画像を構築してボリュームレンダリングを行っても、得られるボリュームレンダリング像は、従来の断層画像全体に対してボクセル画像を構築してボリュームレンダリングを行う場合と差異は無い。しかし、後者に比べボクセル画像を構築する処理負荷およびボクセル画像を保持するメモリ負荷、更には後述するボクセル画像を3Dテクスチャ画像としてGPU側に転送して実行させる負荷が各々抑制され、従来より短い時間でボリュームレンダリング像を取得することが可能になる。 In this way, even if volume rendering is performed by constructing a voxel image reduced to a range corresponding to the opaque circumscribed region, the resulting volume rendering image is similar to that obtained by constructing a voxel image for the entire conventional tomographic image. There is no difference from rendering. However, compared to the latter, the processing load for constructing the voxel image, the memory load for holding the voxel image, and the load for transferring the voxel image as a 3D texture image to the GPU side and executing it, which will be described later, are each suppressed, and the time is shorter than before. It is possible to obtain a volume rendering image with

次に、不透明外接領域に対応する範囲に縮小したボクセル画像を更に高速に作成できるようにした、ステップS40におけるボクセル画像作成処理の詳細について説明する。ステップS364における処理の結果得られた[Xs´,Xe´]、[Ys´,Ye´]、[Zs´,Ze´]の直方体で定義される範囲であるボクセル化領域を、以下[Xs,Xe]、[Ys,Ye]、[Zs,Ze]として説明する。図10は、ステップS40におけるボクセル画像作成処理を各CPUコアで並行して行う処理を示すフローチャートである。ボクセル画像作成手段60は、不透明外接領域算出手段50により削減された、ボクセル化領域に含まれるZe-Zs+1枚の断層画像群をN個(N≧2の整数)に分割し、各CPUコアで並列処理を行う。具体的には、各断層画像群の先頭の断層画像の座標をZ1、末尾の断層画像の座標をZ2とし、先頭座標Z1、末尾座標Z2に、読み込んだ断層画像を割り当てていく。例えば、1番目のCPUコアには、Z1=Zs、Z2=Zs+(Ze-Zs+1)/N-1が設定される。各断層画像群には、断層画像が順に配置されているが、一端を先頭、他端を末尾としている。 Next, the details of the voxel image creation process in step S40, which enables the creation of a voxel image reduced to the range corresponding to the opaque circumscribed area at a higher speed, will be described. [Xs', Xe'], [Ys', Ye'], and [Zs', Ze'] obtained as a result of the process in step S364 are voxelized areas defined by rectangular parallelepipeds. Xe], [Ys, Ye], and [Zs, Ze]. FIG. 10 is a flow chart showing the process of performing the voxel image creation process in step S40 in parallel by each CPU core. The voxel image creating means 60 divides the group of Ze-Zs+1 tomographic images included in the voxelized area reduced by the opaque circumscribed area calculating means 50 into N pieces (an integer of N≧2), and each CPU core Do parallel processing. Specifically, the coordinates of the leading tomographic image of each tomographic image group are set to Z1, and the coordinates of the trailing tomographic image are set to Z2, and the read tomographic images are assigned to the leading coordinate Z1 and the trailing coordinate Z2. For example, Z1=Zs and Z2=Zs+(Ze-Zs+1)/N-1 are set for the first CPU core. In each tomographic image group, tomographic images are arranged in order, with one end being the head and the other end being the tail.

断層画像群がN個に分割され、それぞれが各CPUコアに割り当てられたら、各CPUコアは、図10に示したフローチャートに従った処理を実行する。はじめに、図10のステップS520からS550までのコア部分の処理について概要構成を説明する。この処理は、分割された断層画像群の各断層画像に対して、基本的には先頭Z1から末尾Z2の順に要素画像を作成し(ステップS530)、作成された要素画像に対して陰影付加処理(ステップS540)を行い、要素画像を更新するものである。要素画像は、断層画像のボクセル化領域に対応する[Xs,Xe]、[Ys,Ye]の範囲に含まれる画素の各画素値(信号値)を色値(R,G,B)と不透明度(α)に変換し、画素数を(Xe-Xs+1)×(Ye-Ys+1)画素に縮小した画像で、3次元のボクセル画像において、z座標を特定したものであり、3次元画像の一部である。すなわち、2次元の要素画像が所定の間隔で重ねて配置されることによりボクセル画像が得られる。そのため、要素画像の各ボクセルの値は、上述のように、R、G、B、αの4つとなる。座標zの要素画像は、座標zの断層画像の[Xs,Xe]、[Ys,Ye]の範囲の各画素と1対1に対応して作成されるが、座標zの要素画像に対して陰影付加処理(ステップS540)を実行するためには、座標z-1の要素画像と座標z+1の要素画像を参照する必要があるため、そのまま続けて実行することはできないという第1の問題が生じる。そこで、1つ前に作成された座標z-1の要素画像に対して、その前に作成された座標z-2の要素画像と今回作成された座標zの要素画像を参照しながら陰影付加処理を行い、1つ前に作成された座標z-1の要素画像を更新するようにしている。即ち、陰影付加処理(ステップS540)は常にz座標が1つ遅れで実行されることになる。ただし、z=Z1およびz=Z1+1の最初の2ステップでは、陰影付加処理(ステップS540)を実行する段階では、座標z―2の要素画像または座標z-1の要素画像は存在しないため、陰影付加処理(ステップS540)は見送り、z=Z1+1に対する陰影付加処理はz=Z1+2の段階で行い、z=Z1に対する陰影付加処理は最後のステップS560で実行する。 After the tomographic image group is divided into N pieces and each is assigned to each CPU core, each CPU core executes processing according to the flowchart shown in FIG. First, the outline configuration of the processing of the core portion from steps S520 to S550 in FIG. 10 will be described. In this process, for each tomographic image of the group of divided tomographic images, elemental images are basically created in order from the beginning Z1 to the end Z2 (step S530), and shading is applied to the created elemental images. (Step S540) is performed to update the element image. In the elemental image, each pixel value (signal value) of the pixels included in the range of [Xs, Xe] and [Ys, Ye] corresponding to the voxelized area of the tomographic image is used as the color value (R, G, B). An image converted to transparency (α) and reduced in number of pixels to (Xe−Xs+1)×(Ye−Ys+1) pixels. Department. That is, a voxel image is obtained by arranging two-dimensional elemental images so as to overlap each other at predetermined intervals. Therefore, the values of each voxel of the elemental image are four, R, G, B, and α, as described above. The elemental image of the coordinate z is created in one-to-one correspondence with each pixel in the range of [Xs, Xe] and [Ys, Ye] of the tomographic image of the coordinate z. In order to execute the shading process (step S540), it is necessary to refer to the element image at the coordinate z−1 and the element image at the coordinate z+1. . Therefore, for the previously created elemental image at the coordinate z−1, shadow addition processing is performed while referring to the previously created elemental image at the coordinate z−2 and the currently created elemental image at the coordinate z. to update the previously created element image at coordinates z−1. That is, the shading process (step S540) is always executed with a delay of one z coordinate. However, in the first two steps of z=Z1 and z=Z1+1, since there is no elemental image at the coordinate z−2 or the elemental image at the coordinate z−1 at the stage of executing the shading process (step S540), the shading The addition process (step S540) is skipped, the shadow addition process for z=Z1+1 is performed at the stage of z=Z1+2, and the shadow addition process for z=Z1 is performed at the final step S560.

このようにして、先頭Z1から末尾Z2の順にステップS520からS550までの処理を繰り返すと、先頭Z1から末尾Z2までの要素画像は全て作成されるが(図10の処理では末尾Z2の1つ前のZ2-1で止めているため、この処理では末尾Z2の要素画像は作成されない)、先頭Z1および末尾Z2の要素画像に対して陰影付加処理が実行されていない。そこで、これら2つの要素画像に対する陰影付加処理は最後のステップS560で実行する。先頭Z1および末尾Z2の要素画像に対して陰影付加処理を実行させるためには、座標Z1-1の要素画像および座標Z2+1の要素画像を参照する必要があるが、これらの要素画像は、並列実行されている他のCPUコアで作成される。そこで、ステップS520からS550までの一連の処理を終了した後、共有メモリに配置されている他のCPUコアで作成された要素画像を参照しながら、先頭Z1および末尾Z2の要素画像に対して陰影付加処理を実行する。この追加処理が図10のステップS560に対応する。 In this way, if the processing from steps S520 to S550 is repeated in order from the beginning Z1 to the end Z2, all the element images from the beginning Z1 to the end Z2 are created (in the processing of FIG. , the element image of the end Z2 is not created in this process), and the element images of the beginning Z1 and the end Z2 are not subjected to shading. Therefore, the shading process for these two elemental images is executed in the final step S560. In order to execute the shading process on the element images at the beginning Z1 and the end Z2, it is necessary to refer to the element image at the coordinate Z1−1 and the element image at the coordinate Z2+1. created by other CPU cores that are Therefore, after completing the series of processes from steps S520 to S550, shadows are applied to the element images at the beginning Z1 and the end Z2 while referring to the element images created by other CPU cores arranged in the shared memory. Perform additional processing. This addition processing corresponds to step S560 in FIG.

ここで、もう1つ問題が生じる。末尾Z2の要素画像に対して陰影付加処理を実行する際、共有メモリに配置されている他のCPUコアで作成された座標Z2+1の要素画像を参照するが、当該要素画像は他のCPUコアでは先頭Z1の要素画像に対応し、順番的に最初に作成される要素画像になるため、当該CPUコアが末尾Z2の要素画像に対して陰影付加処理を実行する段階で、座標Z2+1の要素画像は既に作成されている可能性が高いため問題はない。しかし、先頭Z1の要素画像に対して陰影付加処理を実行する際、他のCPUコアで作成された座標Z1-1の要素画像を参照するが、当該要素画像は他のCPUコアでは末尾Z2の要素画像に対応し、順番的に最後に作成される要素画像になるため、当該CPUコアが先頭Z1の要素画像に対して陰影付加処理を実行する段階で、座標Z1-1の要素画像の作成が間に合わない可能性がある(実験では間に合わない場合が過半数以上あった)。そこで、各CPUコアは末尾Z2の要素画像の作成を最優先で行うようにする(ステップS510)。その後、ステップS520からS550までの処理を実行するが、末尾Z2の要素画像の作成は既に終了しているため、繰り返し範囲をステップS550に示されるように、先頭Z1から末尾Z2-1までに短縮する。そうすると、先頭Z1、末尾Z2の要素画像に加え、座標Z2-1の要素画像に対しても陰影付加処理が未実行となる。そこで、ステップ560に示されるように、先頭Z1、末尾Z2および座標Z2-1の3点の要素画像に対して陰影付加処理のみを追加で行う。 Another problem arises here. When executing shading processing on the element image with the last Z2, the element image with coordinates Z2+1 created by another CPU core placed in the shared memory is referenced, but the element image is Since the element image corresponds to the element image at the beginning Z1 and is created first in order, the element image at the coordinate Z2+1 becomes There is no problem because there is a high possibility that it has already been created. However, when executing the shading process for the element image at the beginning Z1, the element image at the coordinate Z1-1 created by another CPU core is referred to, but the element image is the element image at the end Z2 in the other CPU core. Since the element image corresponds to the element image and is created last in order, the element image at the coordinate Z1-1 is created at the stage when the CPU core executes the shading process for the element image at the beginning Z1. may not be in time (more than half of the cases in the experiment were not in time). Therefore, each CPU core gives top priority to the creation of the element image of the end Z2 (step S510). After that, the processing from steps S520 to S550 is executed, but since the creation of the element image of the end Z2 has already been completed, the repetition range is shortened from the beginning Z1 to the end Z2-1 as shown in step S550. do. Then, in addition to the element images at the beginning Z1 and the end Z2, the element image at the coordinate Z2-1 is not subjected to the shading process. Therefore, as shown in step 560, only the shading process is additionally performed for the three element images of the head Z1, the tail Z2, and the coordinate Z2-1.

以上を踏まえ、図10に示したフローチャートに従って、処理内容を詳細に説明する。まず、末尾のz座標となる断層画像に対応する要素画像を作成する(ステップS510)。なお、ステップS510においては、必須でない処理として、作成された要素画像の不透明度を補正する処理も行われる。ステップS510における処理の詳細については後述する。ステップS510において、末尾の断層画像に対応する要素画像のボクセル値の特定および不透明度の補正を終えたら、次に、先頭のz座標となる断層画像に処理対象を移行する(ステップS520)。具体的には、先頭のz=Z1に処理対象を移行する。Z1は、Zs≦Z1<Z2≦Zeを満たす整数である。 Based on the above, the processing contents will be described in detail according to the flowchart shown in FIG. First, an elemental image corresponding to the tomographic image that is the last z-coordinate is created (step S510). In step S510, processing for correcting the opacity of the created elemental image is also performed as an optional processing. Details of the processing in step S510 will be described later. After specifying the voxel values and correcting the opacity of the element image corresponding to the last tomographic image in step S510, the next tomographic image to be processed is shifted to the top z-coordinate (step S520). Specifically, the processing target is shifted to z=Z1 at the beginning. Z1 is an integer that satisfies Zs≦Z1<Z2≦Ze.

次に、処理対象とするz座標の断層画像の[Xs,Xe]、[Ys,Ye]の範囲に対応する要素画像を作成する(ステップS530)。ステップS530においても、必須ではないが好ましい処理として、作成された要素画像の不透明度を補正する処理が行われる。ステップS530における具体的な処理は、処理対象の要素画像が異なる以外は、ステップS510と全く同じである。したがって、ステップS530における処理の詳細についても後述する。 Next, an elemental image corresponding to the range of [Xs, Xe] and [Ys, Ye] of the z-coordinate tomographic image to be processed is created (step S530). Also in step S530, a process of correcting the opacity of the created elemental image is performed as a preferable but not essential process. The specific processing in step S530 is exactly the same as step S510, except that the element images to be processed are different. Therefore, the details of the processing in step S530 will also be described later.

ステップS530における要素画像の作成後、zと(Z1+2)を比較し、z≧(Z1+2)である場合は、陰影付加処理を行う(ステップS540)。したがって、z<(Z1+2)である場合は、ステップS540における陰影付加処理は行わない。すなわち、先頭の要素画像(z=Z1)については、陰影付加処理を行わない(先頭から2番目の要素画像(z=Z1+1)については、z=Z1+2の段階で陰影付加処理が行われる)。ステップS540における陰影付加処理は、1断層前の要素画像に対して行われる。ステップS540における処理の詳細についても後述する。 After creating the elemental image in step S530, z is compared with (Z1+2), and if z≧(Z1+2), shading is added (step S540). Therefore, if z<(Z1+2), the shading process in step S540 is not performed. That is, the first element image (z=Z1) is not subjected to shading (the second element image (z=Z1+1) from the top is subjected to shading at the stage of z=Z1+2). The shading process in step S540 is performed on the elemental image one slice before. Details of the processing in step S540 will also be described later.

ステップS540における陰影付加処理を終えたら、zをインクリメント(z←z+1)する。そして、z<Z2である場合は、ステップS530に戻って、ステップS550までの処理を繰り返して行う。一方、z≧Z2である場合は、先頭(z=Z1)の要素画像、末尾(z=Z2)の要素画像、末尾の1つ前(z=Z2-1)の要素画像に対して、陰影付加処理を行う(ステップS560)。ステップS560における具体的な処理は、処理対象の要素画像が異なる以外は、ステップS540と全く同じである。したがって、ステップS560における処理の詳細についても後述する。 After finishing the shading process in step S540, z is incremented (z←z+1). If z<Z2, the process returns to step S530 and repeats the processes up to step S550. On the other hand, if z≧Z2, shadow Addition processing is performed (step S560). The specific processing in step S560 is exactly the same as step S540, except that the element images to be processed are different. Therefore, the details of the processing in step S560 will also be described later.

結局、図10のフローチャートに示した処理では、最初に、末尾(z=Z2)の要素画像の作成を行い(ステップS510)、次に、先頭(z=Z1)の要素画像から順番に、末尾の1つ前(z=Z2-1)までの要素画像の作成と陰影付加処理を繰り返し行う(ステップS530~S550)。ただし、先頭の要素画像と末尾の2枚の要素画像については、陰影付加処理を行わない。そして、最後に、陰影付加処理が行われなかった3枚の要素画像に対して陰影付加処理を行う(ステップS560)。すなわち、ステップS510~ステップS550において、断層画像群の先頭の断層画像から末尾の断層画像までの全ての断層画像について要素画像が作成された後、ステップS560において、陰影付加手段62が、先頭の断層画像に対応する要素画像と末尾の2枚の断層画像に対応する要素画像の画素の色成分の値を補正して、陰影付加を行っている。より詳細には、ステップS510~ステップS550において、ボクセル画像作成手段60が、断層画像群の末尾の断層画像について、要素画像を作成した後、断層画像群の先頭の断層画像から末尾の1つ前の断層画像までの各断層画像に対して要素画像を作成し、ステップS560において、陰影付加手段62が、先頭の断層画像に対応する要素画像、末尾の1つ前の断層画像に対応する要素画像および末尾の断層画像に対応する要素画像に対して色成分の値を補正して、陰影付加を行っている。 As a result, in the process shown in the flowchart of FIG. 10, first, the last (z=Z2) element image is created (step S510), and then the last (z=Z1) element image is sequentially created. Elemental images up to one (z=Z2-1) before (z=Z2-1) and shading processing are repeatedly performed (steps S530 to S550). However, the top element image and the last two element images are not shaded. Finally, shadow addition processing is performed on the three element images for which shadow addition processing has not been performed (step S560). That is, in steps S510 to S550, element images are created for all tomographic images from the top tomographic image to the last tomographic image in the group of tomographic images. Shading is added by correcting the color component values of the pixels of the elemental image corresponding to the image and the elemental images corresponding to the last two tomographic images. More specifically, in steps S510 to S550, after the voxel image creating means 60 creates element images for the last tomographic image of the tomographic image group, the voxel image creating unit 60 creates the tomographic image from the first tomographic image to the last tomographic image of the tomographic image group. In step S560, the shading means 62 generates an element image corresponding to the top tomographic image and the element image corresponding to the last tomographic image. and the element images corresponding to the tomographic images at the end are shaded by correcting the color component values.

本実施形態では、複数に分割した断層画像群を複数のCPUコアで並行に処理して、最後に統合し、ボクセル画像を作成する。また、ある要素画像に対する陰影付加処理は、隣接する要素画像を用いて行う必要がある。そのため、先頭の要素画像の陰影付加処理は、他の分割断層画像群の末尾の要素画像が必要となり、末尾の要素画像の陰影付加処理は、他の分割断層画像群の先頭の要素画像が必要となる。ただし、z=Zsに対応する先頭の要素画像およびz=Zeに対応する末尾の要素画像に対しては陰影付加処理における輝度値の計算を行わず、輝度値として1.0を与え、当該要素画像の色成分の値を全て元のまま補正しない。 In this embodiment, a group of divided tomographic images are processed in parallel by a plurality of CPU cores and finally integrated to create a voxel image. Further, shading processing for a given elemental image must be performed using adjacent elemental images. Therefore, shadow addition processing for the leading elemental image requires the trailing elemental image of another divided tomographic image group, and shadowing processing for the trailing elemental image requires the leading elemental image of the other divided tomographic image group. becomes. However, the leading element image corresponding to z=Zs and the trailing elemental image corresponding to z=Ze are not subjected to brightness value calculation in the shading process, and are given a brightness value of 1.0. Do not correct all the original values of the color components of the image.

同様に、各要素画像のX軸方向の両端であるx=Xsおよびx=Xeに対応するY軸方向の(Ye-Ys+1)×2個の画素、およびY軸方向の両端であるy=Ysおよびy=Yeに対応するX軸方向の(Xe-Xs+1)×2個の画素に対しても隣接画素が一部存在しないため、輝度値の計算を行わず、輝度値として1.0を与え、当該要素画像の色成分の値を全て元のまま補正しない。前述の通り、これらの輝度値の計算を行わない画素の不透明度は全て0に設定しており、色成分の値については対応する断層画像の画素の信号値を基にカラーマップで定義された値を設定することにより、ボクセル画像の境界面におけるモアレ発生を抑制している。ステップS40におけるボクセル画像の作成範囲は、ステップS30において算出された不透明外接領域に基づくボクセル化領域の範囲とする。このため、断層画像群の全ての画素をボクセルとして作成する場合に比べて、作成されるボクセルが大幅に減り、データ量の削減が図られる。このため、後述するレンダリング処理においても、処理対象のボクセル数が減るため、処理負荷の軽減が図られる。 Similarly, (Ye−Ys+1)×2 pixels in the Y-axis direction corresponding to x=Xs and x=Xe, which are both ends in the X-axis direction of each elemental image, and y=Ys, which is both ends in the Y-axis direction and (Xe−Xs+1)×2 pixels in the X-axis direction corresponding to y=Ye also have no neighboring pixels, so the luminance value is not calculated and 1.0 is given as the luminance value. , all the values of the color components of the elemental image are not corrected as they are. As described above, the opacity of pixels whose brightness values are not calculated is all set to 0, and the color component values are defined by the color map based on the signal values of the corresponding tomographic image pixels. By setting the value, the generation of moire on the boundary surface of the voxel image is suppressed. The voxel image creation range in step S40 is the range of the voxelized region based on the opaque circumscribed region calculated in step S30. Therefore, the number of voxels to be created is greatly reduced compared to the case where all the pixels of the tomographic image group are created as voxels, and the amount of data can be reduced. As a result, the number of voxels to be processed is reduced in the rendering process, which will be described later, so that the processing load can be reduced.

上述のステップS510、S530の処理の詳細について説明する。図11は、ステップS510、S530における要素画像の作成処理を示すフローチャートである。まず、対象とするz座標の断層画像の[Xs,Xe]、[Ys,Ye]の範囲に対応する要素画像を作成する(ステップS511)。具体的には、図5に示したようなカラーマップを用いて、断層画像のボクセル化領域内の各画素に対応するボクセル画像の各ボクセルに対して、その画素の信号値に対応するR、G、Bの各色成分と不透明度αをボクセル値として与えることにより要素画像を作成する。例えば、z=zuの場合、ボクセル値V(x,y,zu,c)(c=0(R)、1、(G)、2(B)、3(α))をもつ要素画像が作成される。 Details of the processing of steps S510 and S530 described above will be described. FIG. 11 is a flow chart showing the process of creating an elemental image in steps S510 and S530. First, an elemental image corresponding to the range of [Xs, Xe] and [Ys, Ye] of the target z-coordinate tomographic image is created (step S511). Specifically, using a color map as shown in FIG. 5, for each voxel of the voxel image corresponding to each pixel in the voxelized area of the tomographic image, R, An element image is created by giving each color component of G and B and opacity α as a voxel value. For example, when z=zu, an elemental image with voxel values V(x, y, zu, c) (c=0 (R), 1, (G), 2 (B), 3 (α)) is created. be done.

次に、不透明度であるα値の補正を行う(ステップS512)。具体的には、ボクセル画像の3次元座標値により定まる不透明度補正テーブルSα(x,y,z)(0≦Sα(x,y,z)≦1;0≦x≦Sx-1,0≦y≦Sy-1,0≦z≦Sz-1)を用いて、以下の〔数式5〕に従った処理を実行することにより、不透明度αを補正する。不透明度補正テーブルSα(x,y,z)は、あらかじめ(x、y、z)の3次元空間に不透明度に対する補正倍率が定義された多次元伝達関数である。同関数は、内臓が存在する中心部の領域の補正倍率を最大に設定し、周辺に向けて補正倍率を所定の関数で減衰させ、骨領域より外側(体表面:脂肪・筋肉・皮膚層、体外:寝台、ヘッドレスト・固定治具)において補正倍率が0になるように定義される。これを用いて、〔数式5〕に従った処理を実行すると、骨領域より外側が透明になり、内臓領域のみが露出したボリュームレンダリング像を得ることができる。 Next, the α value, which is opacity, is corrected (step S512). Specifically, an opacity correction table Sα(x, y, z) (0≦Sα(x, y, z)≦1; 0≦x≦Sx-1, 0≦ y≤Sy-1, 0≤z≤Sz-1), the opacity α is corrected by performing the processing according to [Equation 5] below. The opacity correction table Sα(x, y, z) is a multidimensional transfer function in which a correction magnification for opacity is defined in advance in a three-dimensional space (x, y, z). The same function sets the correction magnification to the maximum in the central area where the internal organs exist, decreases the correction magnification toward the periphery by a predetermined function, Outside the body: bed, headrest/fixing jig) is defined so that the correction magnification is 0. By executing the processing according to [Equation 5] using this, it is possible to obtain a volume rendering image in which the outside of the bone region becomes transparent and only the visceral region is exposed.

〔数式5〕
V´(x,y,zu,3)=V(x,y,zu,3)・Sα(x+Xs,y+Ys,zu+Zs)
[Formula 5]
V' (x, y, zu, 3) = V (x, y, zu, 3) Sα (x + Xs, y + Ys, zu + Zs)

〔数式5〕において、V(x,y,zu,3)は、c=3の場合であるので、補正前の不透明度αを示している。V´(x,y,zu,3)は、不透明度補正テーブルSα(x,y,zu)による補正後の不透明度αを示している。V(x,y,zu,3)およびV´(x,y,zu,3)は、Xs≦x≦Xe,Ys≦y≦Ye,Zs≦zu≦Xeの範囲に縮小されて定義されているのに対し、Sα(x,y,z)は元の断層画像と同じ0≦x≦Sx-1,0≦y≦Sy-1,0≦z≦Sz-1の範囲に定義されているため、V(0,0,0,3)はSα(Xs,Ys,Zs)に対応する。 In [Equation 5], V(x, y, zu, 3) indicates the opacity α before correction since it is the case of c=3. V'(x, y, zu, 3) indicates the opacity α after correction by the opacity correction table Sα(x, y, zu). V(x, y, zu, 3) and V'(x, y, zu, 3) are narrowly defined in the ranges Xs≤x≤Xe, Ys≤y≤Ye, Zs≤zu≤Xe. On the other hand, Sα(x, y, z) is defined in the same range as the original tomographic image, 0 ≤ x ≤ Sx-1, 0 ≤ y ≤ Sy-1, 0 ≤ z ≤ Sz-1 Therefore, V(0,0,0,3) corresponds to Sα(Xs, Ys, Zs).

本実施形態で作成されるボクセルデータは、複数の2次元の断層画像の各画素に対応し、あらかじめ定義されたカラ-マップを参照して定められた各ボクセルで構成されるボクセル構造体である。このボクセルデータは、断層画像の総数をM、要素画像の総数をM’=Ze-Zs+1、所定の分割数をN(M’、Nは共に整数であり、N>1かつN<M’ ≦Mを満たす。)として、[Zs,Ze]の範囲に対応するM’個の断層画像に対応して作成されたM’個の要素画像が、N個の要素画像群に分割されており、N個の要素画像群は、N個の要素画像群を統合したボクセル画像を作成するボクセル画像作成手段により並行して処理されて作成される。 The voxel data created in this embodiment corresponds to each pixel of a plurality of two-dimensional tomographic images, and is a voxel structure composed of each voxel determined with reference to a predefined color map. . This voxel data has the total number of tomographic images as M, the total number of elemental images as M'=Ze-Zs+1, and the predetermined number of divisions as N (both M' and N are integers, N>1 and N<M'≤ M is satisfied), M′ element images created corresponding to M′ tomographic images corresponding to the range [Zs, Ze] are divided into N element image groups, The N elemental image groups are processed in parallel and created by voxel image creating means for creating a voxel image in which the N elemental image groups are integrated.

上述のステップS540の陰影付加処理の詳細について説明する。ステップS540においては、陰影付加手段62が、陰影付加処理を行う。これは、所定の照明環境に対応した陰影をボクセル画像に付加する処理であり、具体的にはXs≦x≦XeかつYs≦y≦YeかつZs≦z≦Zeの範囲のボクセルの不透明度αを参照しながら、Xs<x<XeかつYs<y<YeかつZs<z<Zeの範囲のボクセルの色成分を更新する処理である。このために、ある平行光源と環境光成分を設定し、付加すべき陰影の計算を行う。具体的には、まず、平行光源の向きを示す単位ベクトルとして光源ベクトル(Lx,Ly,Lz)と、環境光成分Abを設定する。光源ベクトル(Lx,Ly,Lz)、環境光成分Abの数値は、表現したい像の状況に応じて適宜設定することができるが、例えば、(Lx,Ly,Lz)=(0.57735,0.57735,0.57735)、Ab=0.2と設定する。Lx,Ly,Lzは絶対値が1未満の実数値(負値を含む),Abは0以上1以下の実数値である。そして、ボクセル画像のボクセル(x,y,zu-1)におけるにおける勾配ベクトル(Gx,Gy,Gz)を以下の〔数式6〕に従った処理を実行することにより算出する。 Details of the shadow adding process in step S540 described above will be described. In step S540, the shading means 62 performs shading processing. This is a process of adding a shadow corresponding to a predetermined lighting environment to a voxel image. Specifically, the voxel opacity α , the color components of voxels in the range of Xs<x<Xe, Ys<y<Ye and Zs<z<Ze are updated. For this purpose, a certain parallel light source and ambient light components are set, and shadows to be added are calculated. Specifically, first, a light source vector (Lx, Ly, Lz) and an ambient light component Ab are set as unit vectors indicating the directions of the parallel light sources. The numerical values of the light source vector (Lx, Ly, Lz) and the ambient light component Ab can be appropriately set according to the situation of the image to be expressed. .57735, 0.57735) and set Ab=0.2. Lx, Ly, and Lz are real numbers with absolute values less than 1 (including negative values), and Ab is a real number of 0 or more and 1 or less. Then, the gradient vector (Gx, Gy, Gz) at the voxel (x, y, zu-1) of the voxel image is calculated by performing the processing according to [Equation 6] below.

〔数式6〕
Gx=(V(x+1,y,zu-1,3)-V(x-1,y,zu-1,3))・(Rxy/Rz)
Gy=(V(x,y+1,zu-1,3)-V(x,y-1,zu-1,3))・(Rxy/Rz)
Gz=(V(x,y,zu,3)-Vα(x,y,zu-2,3))
G=(Gx2+Gy2+Gz21/2
[Formula 6]
Gx=(V(x+1,y,zu-1,3)-V(x-1,y,zu-1,3)).(Rxy/Rz)
Gy = (V (x, y+1, zu-1, 3) - V (x, y-1, zu-1, 3)) (Rxy/Rz)
Gz = (V (x, y, zu, 3) - Vα (x, y, zu - 2, 3))
G=(Gx 2 +Gy 2 +Gz 2 ) 1/2

〔数式6〕において、V(x,y,zu-1,3)はボクセル画像のボクセル(x,y,zu-1)における不透明度αで、Rxyは断層画像の解像度(画素間隔の逆数でmmあたりの画素数で、x軸方向とy軸方向は同一)、Rzは断層画像のスライス解像度(断層画像のスライス間隔の逆数で、mmあたりの断層画像のスライス数)、Gは勾配ベクトル(Gx,Gy,Gz)の大きさである。Rxy/Rzはz軸方向変倍率と定義され、〔数式6〕において、GxとGyを算出する式にRxy/Rzを乗ずる代わりに、Gzを算出する式にRz/Rxy、即ちz軸方向変倍率の逆数を乗じてもよい。〔数式6〕に示すように、陰影付加手段62は、ボクセル画像の当該ボクセルのx軸方向、y軸方向、z軸方向の各々2近傍のボクセルの不透明度の差分値を勾配ベクトルのx軸方向成分、y軸方向成分、z軸方向成分として算出し、あらかじめ定義されたz軸方向変倍率に基づいてx軸方向・y軸方向成分またはz軸方向成分に補正を施した単位ベクトルを、当該ボクセルにおける勾配ベクトルとして算出する。さらに、G≧1の場合、以下の〔数式7〕に従った処理を実行して、拡散反射成分のみを含んだ輝度値S(x,y,zu-1)を算出する。S(x,y,zu-1)は、0以上1以下の実数値である。 In [Formula 6], V (x, y, zu-1, 3) is the opacity α in the voxel (x, y, zu-1) of the voxel image, and Rxy is the resolution of the tomographic image (reciprocal of the pixel interval is the number of pixels per mm, and the x-axis direction and the y-axis direction are the same), Rz is the slice resolution of the tomographic image (reciprocal of the slice interval of the tomographic image, the number of slices of the tomographic image per mm), G is the gradient vector ( Gx, Gy, Gz). Rxy/Rz is defined as the z-axis direction scaling factor. You may multiply the reciprocal of the magnification. As shown in [Equation 6], the shading means 62 calculates the difference value of the opacity of two neighboring voxels in each of the x-axis direction, the y-axis direction, and the z-axis direction of the voxel of the voxel image as the x-axis of the gradient vector. A unit vector calculated as a direction component, a y-axis direction component, and a z-axis direction component, and corrected to the x-axis direction/y-axis direction component or the z-axis direction component based on a predefined z-axis direction scaling factor, It is calculated as a gradient vector at the voxel. Further, when G≧1, the processing according to [Equation 7] below is executed to calculate the luminance value S(x, y, zu−1) including only the diffuse reflection component. S(x, y, zu-1) is a real number of 0 or more and 1 or less.

〔数式7〕
S(x,y,zu-1)=(1-Ab)(|Gx・Lx+Gy・Ly+Gz・Lz|)/G+Ab
[Formula 7]
S (x, y, zu-1) = (1-Ab) (|Gx · Lx + Gy · Ly + Gz · Lz |) / G + Ab

一方、〔数式6〕において算出されたGの値がG<1の場合、不透明度の勾配が存在しない均一な領域(背景部の空気中や肺野など)であるか、最外側であると考えられるため、陰影付加を行わず、輝度値S(x,y,zu-1)=0とする。〔数式7〕において、|Gx・Lx+Gy・Ly+Gz・Lz|は、絶対値を示し、逆方向の光源ベクトル(-Lx,-Ly,-Lz)も仮想的に同時に照射し、被写体が逆向きのアングルになっても同一の輝度の拡散反射光が得られるようにしている。 On the other hand, when the value of G calculated in [Equation 6] is G<1, it is a uniform region (in the background air, lung fields, etc.) where there is no opacity gradient, or it is the outermost region. Therefore, the brightness value S(x, y, zu-1) is set to 0 without adding shading. In [Equation 7], |Gx·Lx+Gy·Ly+Gz·Lz| represents an absolute value, and the light source vector in the opposite direction (-Lx, -Ly, -Lz) is also virtually irradiated at the same time, and the subject is in the opposite direction. Diffuse reflected light with the same brightness can be obtained even at an angle.

そして、算出された輝度値S(x,y,zu-1)を用いて以下の〔数式8〕に従った処理を実行して、ボクセル画像の各ボクセル値V(x,y,zu-1,c)を補正して、補正後の各ボクセル値V´(x,y,zu-1,c)を得る。 Then, using the calculated brightness value S (x, y, zu-1), the processing according to the following [Equation 8] is performed, and each voxel value V (x, y, zu-1) of the voxel image , c) to obtain corrected voxel values V′(x, y, zu−1, c).

〔数式8〕
V´(x,y,zu-1,c)=S(x,y,zu-1)・V(x,y,zu-1,c)
[Formula 8]
V'(x,y,zu-1,c)=S(x,y,zu-1)V(x,y,zu-1,c)

〔数式8〕において、c=0,1,2であり、それぞれR,G,Bの色成分に対応する。すなわち、〔数式8〕においては、色成分のみを補正する。このようにして、z=zu―1の断層について陰影付加処理がなされた要素画像V´(x,y,zu-1,c)が得られる。結局、陰影付加手段62は、〔数式6〕~〔数式8〕に従った処理を実行することにより、作成された各要素画像(zu-1)の各画素について、その要素画像に隣接する要素画像(zu,zu-2)を含むxyz軸方向の近傍に位置する画素の不透明度αを参照して、その要素画像(zu-1)の画素の色成分の値を補正し、陰影付加を行っている。本実施形態では、好ましい例として、不透明度αを参照する画素として隣接する画素を用いたが、隣接する画素に限定されず、近傍の他の画素を参照するようにしてもよい。 In [Equation 8], c=0, 1, 2, corresponding to the R, G, and B color components, respectively. That is, in [Formula 8], only the color component is corrected. In this way, an elemental image V'(x, y, zu-1, c) that has undergone shading processing for the tomogram of z=zu-1 is obtained. As a result, the shading means 62 performs the processing according to [Equation 6] to [Equation 8], so that for each pixel of each element image (zu-1) created, an element adjacent to the element image By referring to the opacity α of the pixels located near the xyz axis direction including the image (zu, zu-2), the color component value of the pixel of the element image (zu-1) is corrected, and shading is added. Is going. In this embodiment, as a preferred example, adjacent pixels are used as pixels for which the opacity α is referred to, but the pixels are not limited to adjacent pixels, and other nearby pixels may be referred to.

図10に示したステップS540では、(Z1+1)≦z≦(Z2-2)の各z座標について、上記の陰影付加処理が行われる。また、図10に示したステップS560では、z=Z1、z=Z2-1、z=Z2の3つの要素画像について、上記の陰影付加処理が行われる。 At step S540 shown in FIG. 10, the above-described shading process is performed for each z-coordinate of (Z1+1)≤z≤(Z2-2). Also, in step S560 shown in FIG. 10, the above-described shading process is performed on the three elemental images of z=Z1, z=Z2−1, and z=Z2.

以上のようにして、ボクセル画像が得られる。ステップS40におけるボクセル画像作成処理を終了したら、ボクセル画像を3Dテクスチャ画像に登録する(ステップS50)。具体的には、レンダリング手段70が、3Dテクスチャマッピング方式を実行する際に用いられる3Dテクスチャ画像としてボクセル画像を登録する。上述のように、ボクセル画像は、ボクセル化領域のみにおいて作成される。このため、ボクセル画像をOpenGLの3Dテクスチャとして登録することにより、ボクセル作成負荷とテクスチャメモリへの転送負荷が削減される。 A voxel image is obtained as described above. After completing the voxel image creation process in step S40, the voxel image is registered in the 3D texture image (step S50). Specifically, the rendering means 70 registers a voxel image as a 3D texture image used when executing the 3D texture mapping method. As mentioned above, voxel images are created only in voxelized regions. Therefore, by registering a voxel image as an OpenGL 3D texture, the voxel creation load and the transfer load to the texture memory are reduced.

図12は3Dテクスチャマッピングにおける対応付けを示す図である。図12(a)は、テクスチャ座標系における3Dテクスチャマップ、図12(b)は、ワールド座標系で定義される積層四角形を示す。積層四角形を構成する各四角形の4頂点には、3Dテクスチャ画像の4ボクセルが対応付られており、図12のように回転がかかっていない状態では、各四角形はテクスチャマップの基になっている断層画像に対して[Xs,Xe][Ys,Ye][Zs,Ze]の範囲が切り取られた要素画像と1対1で対応しており、各四角形の4頂点は要素画像の4隅の画素、ボクセルに対応付られている。OpenGLに登録される3Dテクスチャ画像は物理的には、(Xe-Xs+1)×(Ye-Ys+1)×(Ze-Zs+1)個のボクセルをもっていてxyz軸方向のサイズが異なるが、3次元テクスチャ座標系ではxyz軸方向一律に[0,1]の範囲に定義されサイズは1に正規化される。そのため、後述するスケーリングにおいて、断層画像のxy軸方向とz軸方向の解像度の相違に伴うz軸方向変倍処理に加え、xyz軸方向に各々1/(Xe-Xs+1)、1/(Ye-Ys+1)、1/(Ze-Zs+1)の倍率で変倍処理を施す必要がある。 FIG. 12 is a diagram showing correspondence in 3D texture mapping. FIG. 12(a) shows a 3D texture map in the texture coordinate system, and FIG. 12(b) shows the stacked rectangles defined in the world coordinate system. The 4 vertices of each quadrangle forming the stacked quadrangle are associated with the 4 voxels of the 3D texture image, and each quadrangle is the basis of the texture map when it is not rotated as shown in FIG. The range of [Xs, Xe] [Ys, Ye] [Zs, Ze] for the tomographic image corresponds one-to-one with the elemental image cut out, and the four vertices of each quadrangle correspond to the four corners of the elemental image. Pixels are associated with voxels. A 3D texture image registered in OpenGL physically has (Xe-Xs+1)×(Ye-Ys+1)×(Ze-Zs+1) voxels, and the sizes in the xyz-axis directions are different. is defined uniformly in the range of [0, 1] in the xyz-axis direction, and the size is normalized to 1. Therefore, in the scaling described later, in addition to the z-axis direction scaling processing due to the difference in resolution between the xy-axis direction and the z-axis direction of the tomographic image, 1/(Xe−Xs+1) and 1/(Ye− Ys+1) and 1/(Ze-Zs+1).

具体的には、図12(b)に示すように、定義された積層四角形に対し、3Dテクスチャマッピングを行う。この場合、ワールド座標系(視点座標系に対応)における各四角形の4頂点の3次元ワールド座標とテクスチャ座標系(ボクセル座標系に対応)における3Dテクスチャ画像の3次元テクスチャ座標とを対応付ける。図12に示すように、(-1,-1,z)、(-1,1,z)、(1,-1,z)、(1,1,z)の4頂点で構成される四角形に対して、ワールド座標の(-1,-1,z)は、テクスチャ座標(0,0,r)に対応付けられている。 Specifically, as shown in FIG. 12(b), 3D texture mapping is performed on the defined stacked quadrilaterals. In this case, the 3D world coordinates of the four vertices of each quadrangle in the world coordinate system (corresponding to the viewpoint coordinate system) are associated with the 3D texture coordinates of the 3D texture image in the texture coordinate system (corresponding to the voxel coordinate system). As shown in FIG. 12, a quadrangle composed of four vertices (-1, -1, z), (-1, 1, z), (1, -1, z), (1, 1, z) , the world coordinates (-1, -1, z) are associated with the texture coordinates (0, 0, r).

後述の通り、アングル変更の指示があると、図12(a)のテクスチャマップがテクスチャ座標系において3次元的に回転した、変換後3Dテクスチャ画像が生成されるため、各四角形と要素画像との対応関係は崩れる。ボクセル画像を、OpenGL(グラフィックAPI)を介して3Dテクスチャ画像として登録する。 As will be described later, when there is an angle change instruction, a converted 3D texture image is generated in which the texture map in FIG. 12A is three-dimensionally rotated in the texture coordinate system. Correspondence breaks down. Voxel images are registered as 3D texture images via OpenGL (graphic API).

続いて、レンダリング処理を行う(ステップS60)。図13は、レンダリング手段70の構成を示す図である。図13に示すように、レンダリング手段70は、3Dテクスチャ登録手段71、座標変換手段72、積層四角形設定手段73、画素値算出手段74を有する。上述のように、レンダリング手段70は、3Dテクスチャマッピング方式の場合は、CPU1が補助しながら、主にGPU7においてプログラムを実行することにより実現されるが、特に処理負荷が大きい座標変換手段72および画素値算出手段74は、汎用コンピュータのビデオカードに搭載されているGPUおよびフレームメモリを用いて実行するようにすることが好ましい。 Subsequently, rendering processing is performed (step S60). FIG. 13 is a diagram showing the configuration of the rendering means 70. As shown in FIG. As shown in FIG. 13, the rendering means 70 has a 3D texture registration means 71, a coordinate conversion means 72, a stacked rectangle setting means 73, and a pixel value calculation means 74. As described above, in the case of the 3D texture mapping method, the rendering means 70 is realized mainly by executing a program in the GPU 7 with the assistance of the CPU 1. However, the coordinate transformation means 72 and the pixel The value calculation means 74 is preferably executed using the GPU and frame memory installed in the video card of the general purpose computer.

3Dテクスチャマッピング方式の処理においては、まず投影画面を設定する。図14は、本実施形態のレンダリング手段70による投影画面設定の一例を示す説明図である。レンダリング手段70は、レンダリング画像のスクリーンサイズ(縦横画素数、縦横アスペクト比率)を設定する。レンダリング手段70は、平行投影(通常の外観レンダリング)又は透視投影(内視鏡モード)のいずれかを設定する。尚、「レンダリング画像」は「ボリュームレンダリング像」と同義で、「ボリュームレンダリング像」を「レンダリング画像」と表記する場合がある。そして、レンダリング手段70は、透視投影が設定された場合、透視投影パラメータを設定する。透視投影パラメータは、例えば、カメラの視野角度(焦点距離)、視点位置(視点と注視点で構成され、前者は目の位置で後者は見ている対象物上の位置で、双方ともz軸上に設定される。一般に、注視点はワールド座標系の原点に固定)、クリッピング位置(視点からのz軸上の距離、近方及び遠方の2箇所)などを含む。なお、クリッピング位置は、近方だけでもよい。図14に示すように、平行投影の場合には、視点からの視線は全てz軸に平行となり、視点は仮想的に左方向に無限遠に離れた位置にあることを想定しているため、z軸方向に定義されている全ての積層四角形がレンダリング対象になる。一方、透視投影の場合には、視点からの視野角度に応じて、視線が広がり、視点が積層四角形の内部に入るため、レンダリング対象は近方クリッピングより遠方クリッピング(通常は積層四角形の視点から最も遠い四角形)までの範囲に制限されている。 In the processing of the 3D texture mapping method, first, a projection screen is set. FIG. 14 is an explanatory diagram showing an example of projection screen setting by the rendering means 70 of this embodiment. The rendering means 70 sets the screen size (number of vertical and horizontal pixels, vertical and horizontal aspect ratio) of the rendered image. The rendering means 70 sets either parallel projection (normal external rendering) or perspective projection (endoscopic mode). A "rendered image" is synonymous with a "volume rendered image", and the "volume rendered image" may be referred to as a "rendered image". When the perspective projection is set, the rendering means 70 sets perspective projection parameters. The perspective projection parameters are composed of, for example, the viewing angle (focal length) of the camera and the viewpoint position (viewpoint and gaze point. The former is the eye position and the latter is the position on the object being viewed, both on the z-axis. In general, the gaze point is fixed at the origin of the world coordinate system), the clipping position (the distance on the z-axis from the viewpoint, two points near and far), and the like. Note that the clipping position may be limited to near objects. As shown in FIG. 14, in the case of parallel projection, all lines of sight from the viewpoint are assumed to be parallel to the z-axis, and the viewpoint is assumed to be infinitely far away in the leftward direction. All stacked rectangles defined along the z-axis are rendered. On the other hand, in the case of perspective projection, the line of sight spreads according to the viewing angle from the viewpoint, and the viewpoint enters the inside of the stacked quadrilateral. far rectangle).

図15は3Dテクスチャマッピング方式によるレンダリング処理の詳細を示すフローチャートである。まず、図13の3Dテクスチャ登録手段71が、ボクセル画像を3Dテクスチャ画像としてOpenGLに登録する。次に、座標変換手段72が、3Dテクスチャ画像に対して所定の座標変換を行って変換後3Dテクスチャ画像を生成する(S61~S63)。 FIG. 15 is a flow chart showing details of rendering processing by the 3D texture mapping method. First, the 3D texture registration means 71 in FIG. 13 registers the voxel image as a 3D texture image in OpenGL. Next, the coordinate transformation means 72 performs predetermined coordinate transformation on the 3D texture image to generate a post-transformation 3D texture image (S61 to S63).

具体的には、座標変換手段72は、所定の3次元座標系における回転を定義した4×4行列、視野角度、視点位置、クリッピング位置、xyz各軸方向のオフセット値、xyz各軸方向の拡大又は縮小倍率、z軸方向変倍率を含む所定の座標変換のパラメータを取得し、3Dテクスチャ画像に対して、取得したパラメータを用いた所定の座標変換を行って変換後3Dテクスチャ画像を生成する。 Specifically, the coordinate conversion means 72 includes a 4×4 matrix defining rotation in a predetermined three-dimensional coordinate system, a viewing angle, a viewpoint position, a clipping position, an offset value in each of the xyz axis directions, and an expansion in each of the xyz axis directions. Alternatively, predetermined coordinate transformation parameters including reduction ratio and z-axis direction scaling ratio are acquired, and the 3D texture image is subjected to predetermined coordinate transformation using the acquired parameters to generate a post-transformation 3D texture image.

個々のステップについて説明すると、座標変換手段72は、3Dテクスチャ画像に対するスケーリング及びz軸方向変倍処理を行う(ステップS61)。スケーリングはxyz軸方向に対して同一の倍率Scaleで拡大または縮小を行うが、z軸方向変倍処理はxy軸方向の解像度Rxyとz軸方向の解像度Rzの相違を補正するため、z軸方向のみに指定倍率Scz(=Rxy/Rz)で拡大または縮小を行う。更に前述の通り、登録される3Dテクスチャ画像がxyz軸方向に同一サイズに正規化されるため、各々1/(Xe-Xs+1)、1/(Ye-Ys+1)、1/(Ze-Zs+1)の倍率で変倍処理を加える。そして、座標変換手段72は、所定の3次元座標系における回転を定義した4×4行列を用いて3Dテクスチャ画像に対する回転処理を行う(ステップS62)。 Describing individual steps, the coordinate transformation means 72 performs scaling and z-axis direction scaling processing on the 3D texture image (step S61). Scaling is performed with the same magnification Scale in the xyz-axis direction. Enlargement or reduction is performed only at the specified magnification Scz (=Rxy/Rz). Furthermore, as described above, since the 3D texture images to be registered are normalized to the same size in the xyz axis directions, Add scaling processing with magnification. Then, the coordinate transformation means 72 performs rotation processing on the 3D texture image using a 4×4 matrix that defines rotation in a predetermined three-dimensional coordinate system (step S62).

そして、座標変換手段72は、xyz各軸方向のオフセット値(Xoff,Yoff,Zoff)を用いて3Dテクスチャ画像に対するオフセット処理を行う(ステップS63)。これらの処理(S61~S63)により、変換後3Dテクスチャ画像が生成される。次に、積層四角形設定手段73は、複数の四角形で構成される積層四角形を設定する(ステップS64)。具体的には、3次元空間のxy座標面上の四角形をz軸方向に並べた積層四角形を設定する。3Dテクスチャマッピングを設定する場合、積層四角形設定手段73は、複数のxy平面画像の数と同数の四角形をz軸方向に並べた積層四角形を設定する。 Then, the coordinate conversion means 72 performs offset processing on the 3D texture image using the offset values (Xoff, Yoff, Zoff) in the directions of the xyz axes (step S63). A converted 3D texture image is generated by these processes (S61 to S63). Next, the stacked quadrangle setting unit 73 sets a stacked quadrangle composed of a plurality of quadrilaterals (step S64). Specifically, a stacked quadrangle is set by arranging quadrangles on the xy coordinate plane of the three-dimensional space in the z-axis direction. When setting 3D texture mapping, the stacked quadrangle setting means 73 sets a stacked quadrangle in which the same number of quadrangles as the number of xy plane images are arranged in the z-axis direction.

積層四角形における四角形の数は任意に設定することができるが、四角形の数と要素画像の枚数(Ze-Zs+1)とが一致しない場合、z軸方向に補間処理が働き、座標変換による座標値の丸め誤差が累積し、ストライプ・格子状のモアレが発生する。そして、図12で示されるように、各四角形の4頂点に対して、対応する変換後3Dテクスチャ画像における4箇所のボクセル座標を定義することにより、変換後3Dテクスチャ画像との対応付けを行う(ステップS65)。定義するボクセル座標は、ボクセル画像の座標系ではなく、OpenGLのテクスチャ座標系(r,s,tの3軸方向に対し0から1の範囲の実数値)に基づいたものである。 The number of quadrilaterals in the stacked quadrilateral can be set arbitrarily, but if the number of quadrilaterals and the number of element images (Ze-Zs+1) do not match, interpolation processing works in the z-axis direction, and coordinate values are changed by coordinate conversion. Rounding errors accumulate, and striped or grid-like moiré occurs. Then, as shown in FIG. 12, by defining four voxel coordinates in the corresponding post-transformation 3D texture image for the four vertices of each quadrangle, correspondence with the post-transformation 3D texture image is performed ( step S65). The voxel coordinates to be defined are based on the texture coordinate system of OpenGL (real values ranging from 0 to 1 with respect to the three axial directions of r, s, and t), not the coordinate system of the voxel image.

具体的には、図12(b)に示すように、定義された積層四角形に対し、3Dテクスチャマッピングを行う。この場合、ワールド座標系における各四角形の4頂点の3次元ワールド座標とテクスチャ座標系における3Dテクスチャ画像の3次元テクスチャ座標とを対応付ける。図12に示すように、(-1,-1,z)、(-1,1,z)、(1,-1,z)、(1,1,z)の4頂点で構成される四角形に対して、ワールド座標の(-1,-1,z)は、テクスチャ座標(0,0,r)に対応付けられている。 Specifically, as shown in FIG. 12(b), 3D texture mapping is performed on the defined stacked quadrilaterals. In this case, the three-dimensional world coordinates of the four vertices of each quadrangle in the world coordinate system are associated with the three-dimensional texture coordinates of the 3D texture image in the texture coordinate system. As shown in FIG. 12, a quadrangle composed of four vertices (-1, -1, z), (-1, 1, z), (1, -1, z), (1, 1, z) , the world coordinates (-1, -1, z) are associated with the texture coordinates (0, 0, r).

次に、画素値算出手段74は、所定の視点からz軸方向に平行な視線上の最も遠い四角形から視点に最も近い四角形の順にスキャンコンバージョン(四角形内部の塗りつぶし)を行う(ステップS66)。この時、各四角形に貼りついている変換後3Dテクスチャ画像のボクセルの色成分(R,G,B)に基づいて四角形内部を塗りつぶすとともに、同一画素に塗り重ねる際、変換後3Dテクスチャ画像のボクセルの不透明度に基づいてアルファブレンディングを併せて行う。このように、積層四角形のxyz座標に対応する変換後3Dテクスチャ画像のボクセルの(R,G,B)で構成される色成分(R,G,B)をボクセルの不透明度に基づいて視点から遠い四角形の順にアルファブレンディングして得られた(R,G,B)で構成される色成分を、ボリュームレンダリング像の画素値として与える。これにより、ボリュームレンダリング像が得られる。 Next, the pixel value calculation means 74 performs scan conversion (filling in the inside of the rectangle) in order from the farthest rectangle on the line of sight parallel to the z-axis direction from a predetermined viewpoint to the nearest rectangle to the viewpoint (step S66). At this time, the inside of the rectangle is painted based on the color components (R, G, B) of the voxels of the 3D texture image after conversion attached to each rectangle, and when the same pixel is painted over, the voxels of the 3D texture image after conversion are painted. Also do alpha blending based on opacity. In this way, the color component (R, G, B) composed of (R, G, B) of the voxel of the converted 3D texture image corresponding to the xyz coordinates of the stacked rectangle is obtained from the viewpoint based on the opacity of the voxel. Color components composed of (R, G, B) obtained by alpha blending in the order of the farthest rectangle are given as pixel values of the volume rendering image. A volume rendering image is thus obtained.

より具体的には、あらかじめレンダリング画像の画素値(RGB値)は全て背景色(例えば、R=G=B=0)で初期化しておく。画素値算出手段74は、視点から最も遠い四角形に対して、貼り付いている変換後3Dテクスチャ画像を参照しながら、スキャンコンバージョンを行う。図14で定義したレンダリング画像に平行投影または透視投影を行い、投影された四角形のワールド座標系におけるxyz座標の(-1,-1,-1)からx軸方向及びy軸方向に、投影されたレンダリング画像に対して塗り潰す画素の座標を(i,j)とし、レンダリング画像における画素間隔に対応する間隔u(レンダリング画像の1画素に対応するワールド座標の間隔をuとする。例えばu=0.002)でスキャンコンバージョンを行う。スキャンコンバージョンされた、各ワールド座標(-1+iu,-1+ju,-1)(i,jはレンダリング画像の座標値で、例えば0≦i,j≦511の整数)において、各々対応するテクスチャ座標(2iu,2ju,0)を算出し、算出したテクスチャ座標に基づいて変換後3Dテクスチャ画像を参照し色成分の値(RGB値)及び不透明度を取得して、対応するレンダリング画像の座標(i,j)に既に記録されている画素値(RGB値)と取得した不透明度に基づいてアルファブレンディング処理を行い、対応するレンダリング画像の座標(i,j)の画素値を更新する。 More specifically, all pixel values (RGB values) of the rendering image are initialized in advance with the background color (for example, R=G=B=0). The pixel value calculation means 74 performs scan conversion on the quadrangle furthest from the viewpoint while referring to the attached post-conversion 3D texture image. Parallel projection or perspective projection is performed on the rendered image defined in FIG. Let (i, j) be the coordinates of a pixel to be filled in the rendered image, and u be the interval between pixels in the rendered image (where u is the interval in world coordinates corresponding to one pixel in the rendered image. For example, u= 0.002) for scan conversion. At each scan-converted world coordinate (-1+iu, -1+ju, -1) (i, j are coordinate values of the rendered image, for example, integers 0≤i, j≤511), the corresponding texture coordinates (2iu , 2ju, 0), refer to the converted 3D texture image based on the calculated texture coordinates, obtain the color component values (RGB values) and opacity, and calculate the corresponding rendered image coordinates (i, j ) and the acquired opacity, alpha blending is performed, and the pixel value at the coordinates (i, j) of the corresponding rendering image is updated.

このようにして、視点から最も遠い単一の四角形が投影されるレンダリング画像の対応する全ての画素についてアルファブレンディング処理が終了すると、z座標をv(四角形がz軸方向に配置されているワールド座標の間隔をvとする。例えば、v=2/Sz)だけ増やし、視点方向に次に近い四角形(-1+iu,-1+ju,-1+v)について同様の処理を繰り返してレンダリング画像を更新する。全ての四角形についてスキャンコンバージョンしてワールド座標(-1+iu,-1+ju,-1+kv)(kは四角形の番号で、0≦k≦Sz-1の整数)に対してアルファブレンディングの処理が終了するとレンダリング画像が完成する。アルファブレンディング処理は、以下の〔数式9〕に従った処理として行われる。 In this way, when the alpha blending process is completed for all corresponding pixels of the rendered image on which the single rectangle furthest from the viewpoint is projected, the z coordinate is changed to v (the world coordinate where the rectangle is located in the z-axis direction is increased by v. For example, v=2/Sz), and the same process is repeated for the next closest quadrangle (-1+iu, -1+ju, -1+v) to the viewpoint direction to update the rendered image. Rendered image after scan conversion for all quadrilaterals and alpha blending processing for world coordinates (-1+iu, -1+ju, -1+kv) (k is the quadrilateral number and an integer of 0≤k≤Sz-1) is completed. The alpha blending process is performed as a process according to [Formula 9] below.

〔数式9〕
R´=R・α+(1-α)・Rb
G´=G・α+(1-α)・Gb
B´=B・α+(1-α)・Bb
[Formula 9]
R′=R・α+(1−α)・Rb
G′=G・α+(1−α)・Gb
B′=B・α+(1−α)・Bb

〔数式9〕において、R′、G′、B′は、投影面において更新されるレンダリング画像の画素値(RGB値)である。R、G、Bは、四角形のワールド座標(-1+iu,-1+ju,-1+kv)に対応する変換後3Dテクスチャ画像のボクセル(2iu,2ju,2kv)における色成分(RGB値)であり、重ねる色の値に相当する。αも、四角形のワールド座標(-1+iu,-1+ju,-1+kv)に対応する変換後3Dテクスチャ画像のボクセル(2iu,2ju,2kv)におけるα値であり、重ねる割合を制御する。また、Rb、Gb、Bbは、ワールド座標(-1+iu,-1+ju,-1+kv)に対応するレンダリング画像の座標(i,j)に既に記録されている画素値(RGB値)であり、当該四角形に対して視点と反対側に1つ前に位置する四角形に対して上記〔数式9〕に基づいて算出されたR′、G′、B′の値に一致し、視点から最も遠い四角形に対して算出する場合は背景色(例えば、Rb=Gb=Bb=0)が与えられる。以上のようにして得られたレンダリング画像をレンダリング画像出力手段80が出力することにより、ボリュームレンダリング像が認識される。 In [Formula 9], R', G', and B' are the pixel values (RGB values) of the rendering image updated on the projection plane. R, G, B are the color components (RGB values) in the voxel (2iu, 2ju, 2kv) of the 3D texture image after conversion corresponding to the world coordinates (-1+iu, -1+ju, -1+kv) of the rectangle. corresponds to the value of α is also the α value in the transformed 3D texture image voxel (2iu, 2ju, 2kv) corresponding to the quadrangle world coordinates (−1+iu, −1+ju, −1+kv), and controls the overlapping ratio. Rb, Gb, and Bb are pixel values (RGB values) already recorded at the coordinates (i, j) of the rendered image corresponding to the world coordinates (-1+iu, -1+ju, -1+kv). The values of R', G', and B' calculated based on the above [Equation 9] correspond to the quadrangle located on the side opposite to the viewpoint and the quadrangle farthest from the viewpoint. , the background color (for example, Rb=Gb=Bb=0) is given. A volume rendering image is recognized by outputting the rendering image obtained as described above by the rendering image output means 80 .

ボクセル化領域の境界面、すなわちボクセル化領域の最外周のボクセルの不透明度αの値を0に設定するとともに色成分のRGB値には画素の信号値を基にカラーマップで定義される自然なRGB値を与えることにより、処理負荷を抑制しながら境界面に発生するモアレを抑制することができる。本実施形態では、ボクセル画像自体も、不透明外接領域に基づくボクセル化領域と同じ範囲で作成しているため、一層処理負荷を抑制しながらモアレを抑制することができる。 The boundary surface of the voxelized area, that is, the value of the opacity α of the outermost voxel of the voxelized area is set to 0, and the RGB values of the color components are the natural values defined by the color map based on the signal value of the pixel. By giving RGB values, it is possible to suppress the moiré that occurs on the boundary surface while suppressing the processing load. In the present embodiment, the voxel image itself is also created in the same range as the voxelized area based on the opaque circumscribed area, so moire can be suppressed while further suppressing the processing load.

上述のように、本実施形態に係るボリュームレンダリング装置100では、マルチコアCPUであるCPU1がプログラムを実行することにより、不透明外接領域算出手段50、ボクセル画像作成手段60が実現される。このプログラムは、読み込んだ断層画像を複数(例えばN個)の断層画像群に分割し、各CPUスレッドに各断層画像群を割り当てて、各CPUスレッドが不透明外接領域の一部を算出する処理、各断層画像群に対応する要素画像群を作成する処理、を並行して行う。ボリュームレンダリング装置100を、汎用的なコンピュータであるパソコンで実現した場合について説明する。図16は、コンピュータによりボリュームレンダリング装置100を実現する場合の並列化処理を示す図である。図16に示すように、不透明外接領域算出手段50、ボクセル画像作成手段60が、アプリケーションプログラムにより実現され、例えばN=4個の断層画像群に分割する場合、アプリケーションプログラムは、4個の各断層画像群に対する処理を4つの処理スレッド♯n1~処理スレッド♯n4に分割する。そして、不透明外接領域算出手段50、ボクセル画像作成手段60(アプリケーションプログラム)が稼働するマルチタスク・オペレーティングシステムのジョブスケジューラが、複数のCPUコアが有するCPUスレッド#1~CPUスレッド#8に割り当てる。 As described above, in the volume rendering apparatus 100 according to the present embodiment, the opaque circumscribed area calculation means 50 and the voxel image creation means 60 are implemented by the CPU 1, which is a multi-core CPU, executing programs. This program divides the read tomographic image into a plurality of (for example, N) tomographic image groups, assigns each tomographic image group to each CPU thread, and causes each CPU thread to calculate a part of the opaque circumscribed area. A process of creating an elemental image group corresponding to each tomographic image group is performed in parallel. A case in which the volume rendering apparatus 100 is realized by a personal computer, which is a general-purpose computer, will be described. FIG. 16 is a diagram showing parallel processing when the volume rendering device 100 is implemented by a computer. As shown in FIG. 16, the opaque circumscribed area calculation means 50 and the voxel image creation means 60 are implemented by an application program. Processing for the image group is divided into four processing threads #n1 to #n4. Then, the job scheduler of the multitasking operating system in which the opaque circumscribed area calculation means 50 and the voxel image creation means 60 (application program) operate allocates them to CPU threads #1 to CPU threads #8 of the plurality of CPU cores.

図17は、コンピュータによりボリュームレンダリング装置100を実現する場合の並列化処理のソフトウェアによる流れを示す図である。図17に示すように、不透明外接領域算出手段50、ボクセル画像作成手段60を実現するアプリケーションプログラムは、4個の各要素画像群に対する処理を4つの処理スレッド♯n1~処理スレッド♯n4に分割した後、それぞれ並列処理関数を起動する。そうすると、マルチタスク・オペレーティングシステムのジョブスケジューラが、4つのスレッド♯n1~スレッド♯n4を複数のCPUコアが有するCPUスレッド#3、CPUスレッド#5、CPUスレッド#7、CPUスレッド#2、にそれぞれ割り当てる。このようにして、オペレーティングシステムにより空いているCPUコアのCPUスレッドに、処理すべき処理スレッドが割り当てられるため、並列処理が可能となる。図17の例では、アプリケーションプログラムが各CPUスレッドからの終了メッセージを待ち、全てのCPUスレッドから終了メッセージが得られたら、作成された要素画像群を統合したボクセル画像を作成する。そして、一括してレンダリング処理した後、レンダリング画像を表示部6に出力し、表示を行う。 FIG. 17 is a diagram showing a software flow of parallel processing when the volume rendering apparatus 100 is implemented by a computer. As shown in FIG. 17, the application program that realizes the opaque circumscribed area calculation means 50 and the voxel image creation means 60 divides the processing for each of the four elemental image groups into four processing threads #n1 to #n4. After that, each invokes a parallel processing function. Then, the job scheduler of the multitasking operating system assigns four threads #n1 to #n4 to CPU thread #3, CPU thread #5, CPU thread #7, and CPU thread #2 each having a plurality of CPU cores. assign. In this way, the operating system allocates the processing threads to be processed to the CPU threads of the CPU cores that are free, thereby enabling parallel processing. In the example of FIG. 17, the application program waits for end messages from each CPU thread, and when end messages are obtained from all CPU threads, a voxel image is created by integrating the created element image groups. Then, after rendering processing is performed collectively, the rendered image is output to the display unit 6 and displayed.

4コア構成のCPU(Intel CORE-i7)が実装されているWindows10/64bitsのパーソナルコンピュータで実測した結果、図17の構成ではシングルスレッド実行時(512×512×370のフル解像度画像のCPUによるボクセル生成時間:約0.9秒)の1.5倍弱程度の処理速度が得られた (同生成時間:約0.6秒)。しかし、一部のCPUスレッドに処理待ちが生じた。そこで、要素画像群の分割数をN=8に上げて、8処理スレッドで並列処理を行ったところ、シングルスレッド実行時のほぼ2倍の処理性能が得られた(同生成時間:約0.45sec)。さらに、N>8に上げて実験した結果、処理性能は殆ど変化せず2倍で頭打ちであり、各スレッド間で共有メモリへのアクセス待ちが発生し所望の並列化効果が十分得られていなかった。一方、ボクセル画像作成後のレンダリング処理S60はGPU7で実行され、512×512のフル解像度のレンダリング画像の生成時間は約0.015秒であった。 As a result of actual measurement on a Windows 10/64bits personal computer equipped with a 4-core CPU (Intel CORE-i7), the configuration in Fig. 17 shows that when executing a single thread (512 x 512 x 370 full resolution image voxel by CPU A processing speed of about 1.5 times faster than the generation time: about 0.9 seconds was obtained (same generation time: about 0.6 seconds). However, some CPU threads were waiting for processing. Therefore, when the number of divisions of the elemental image group was increased to N = 8 and parallel processing was performed with 8 processing threads, the processing performance was almost double that of single thread execution (same generation time: about 0.45 sec ). Furthermore, as a result of experiments with N > 8, the processing performance hardly changed and reached a ceiling at 2 times. rice field. On the other hand, the rendering processing S60 after voxel image creation was executed by the GPU 7, and the generation time of the rendering image with full resolution of 512×512 was about 0.015 seconds.

<3.K分の1の間引き>
上記ボリュームレンダリング装置では、ボクセル画像作成手段60が、複数の断層画像と同等の密度によるボクセル画像を作成するようにしたが、ボクセルを間引いてボクセルの密度を低くしたボクセル画像を作成するようにしてもよい。その場合、ボクセル画像作成手段60は、複数の断層画像の2次元のxy軸方向、断層画像と直交するz軸方向の三軸の各軸方向において、K画素おきに対応付けて3次元に配置した各ボクセルに対して、そのボクセルの信号値を色成分および不透明度αに置き換え、ボクセル値として色成分および不透明度が定義されたボクセル画像を作成する。例えば、K=2とした場合、xyz軸方向を各々1/2に間引くことができるため、処理するボクセル数が1/8となり、高速な処理を行うことができる。これにより、利用者が、指示入力I/F4を介して対話的に、カラーマップを連続的に切り替えた場合であっても、画質が粗いボリュームレンダリング像を順次表示させて、カラーマップの更新に追従させながらボリュームレンダリング像を表示することができる。
<3. Decimation of 1/K>
In the volume rendering device, the voxel image creating means 60 creates a voxel image with a density equivalent to that of a plurality of tomographic images. good too. In this case, the voxel image generating means 60 arranges the voxel images three-dimensionally in association with every K pixels in each of the three axial directions of the two-dimensional xy-axis direction of the plurality of tomographic images and the z-axis direction orthogonal to the tomographic images. For each voxel obtained, the signal value of that voxel is replaced with the color component and opacity α to create a voxel image in which the color component and opacity are defined as voxel values. For example, when K=2, each of the xyz-axis directions can be thinned out by 1/2, so the number of voxels to be processed becomes 1/8, and high-speed processing can be performed. As a result, even when the user continuously switches the color map interactively via the instruction input I/F 4, the volume rendering image with coarse image quality is sequentially displayed, and the color map is updated. A volume rendering image can be displayed while tracking.

<4.断層画像の階調落とし>
上記実施形態では、各画素が16ビットの信号値を記録した断層画像をそのまま用いてボクセル画像を作成するようにしたが、断層画像を8ビットに階調変換して階調低下画像を作成した後、ボクセル画像を作成するようにしてもよい。断層画像を8ビットに階調変換することにより、各画素の処理における負荷を削減することができ、ボリュームレンダリング像の高速な生成に寄与する。
<4. Gradation Reduction of Tomographic Image>
In the above embodiment, a tomographic image in which each pixel records a 16-bit signal value is used as it is to create a voxel image. A voxel image may be created later. By converting the tomographic image into 8-bit gradation, the load in processing each pixel can be reduced, contributing to high-speed generation of volume rendering images.

この場合、断層画像階調変換手段を更に設け、断層画像読込手段10が単一の断層画像を読み込むごとに、階調変換を行う。具体的には、一連のDICOM形式の断層画像Do(x,y,z)(-32768≦Do(x,y,z)≦32767,0≦x≦Sx-1,0≦y≦Sy-1,0≦z≦Sz-1; 解像度:Rxy,Rz)の中で、Sz/2番目の中間の断層画像Do(x,y,z/2)を最初に読み込み、同断層画像における全ての画素の最小値をDmin、最大値をDmaxとする。DminとDmaxは全ての断層画像より最小値と最大値を求める方法をとっても良いが、中間の断層画像だけで決定する方法をとると、大容量の16ビットの原断層画像の全てのスライス分を読み込んでメモリ上に保持することなく、階調低下画像である階調圧縮断層画像D8(x,y,z)だけをメモリ上に直接構築できる。続いて、以下の〔数式10〕に従った処理を実行して、下限値Lmin および上限値Lmaxを算出する。 In this case, tomographic image tone conversion means is further provided, and tone conversion is performed each time the tomographic image reading means 10 reads a single tomographic image. Specifically, a series of DICOM format tomographic images Do (x, y, z) (-32768 ≤ Do (x, y, z) ≤ 32767, 0 ≤ x ≤ Sx-1, 0 ≤ y ≤ Sy-1 , 0 ≤ z ≤ Sz-1; resolution: Rxy, Rz), the Sz/2th intermediate tomographic image Do (x, y, z/2) is first read, and all pixels in the same tomographic image Let Dmin be the minimum value of and Dmax be the maximum value of . For Dmin and Dmax, a method of determining the minimum and maximum values from all tomographic images may be used, but if a method of determining only from intermediate tomographic images is used, all slices of the large-capacity 16-bit original tomographic image may be used. Only the gradation-compressed tomographic image D8(x, y, z), which is a gradation-reduced image, can be constructed directly on the memory without reading it and storing it on the memory. Subsequently, a process according to [Equation 10] below is executed to calculate the lower limit value Lmin and the upper limit value Lmax.

〔数式10〕
下限値Lmin=(Dmax-Dmin)・γ+Dmin
上限値Lmax=(Dmax-Dmin)・(1-γ)+Dmin
[Formula 10]
Lower limit Lmin = (Dmax-Dmin) γ + Dmin
Upper limit value Lmax=(Dmax−Dmin)・(1−γ)+Dmin

〔数式10〕において、γは階調圧縮画像のコントラスト調整幅で、0に近いほどコントラストが増大するが輝度が小さくなる。γは0.3未満の実数値であるが、通常はγ=0.1に設定する。レンダリング画像の輝度コントラストはカラーマップなど種々の設定で調整できるので、γは固定で良い。そして、下限値Lminおよび上限値Lmaxの範囲を256段階に圧縮して階調圧縮断層画像D8(x,y,z)を得る。具体的には、階調圧縮断層画像D8(x,y,z)(0≦D8(x,y,z)≦255,0≦x≦Sx-1,0≦y≦Sy-1,0≦z≦Sz-1; 解像度:Rxy,Rz)としたとき、以下の〔数式11〕に従った処理を実行して、階調圧縮断層画像D8(x,y,z) を算出する。 In [Equation 10], γ is the contrast adjustment width of the gradation-compressed image, and the closer to 0, the higher the contrast but the lower the luminance. γ is a real value less than 0.3, but is usually set to γ=0.1. Since the luminance contrast of the rendered image can be adjusted by various settings such as a color map, γ may be fixed. Then, the range between the lower limit value Lmin and the upper limit value Lmax is compressed in 256 steps to obtain a gradation-compressed tomographic image D8(x, y, z). Specifically, the gradation compression tomographic image D8 (x, y, z) (0≤D8 (x, y, z)≤255, 0≤x≤Sx-1, 0≤y≤Sy-1, 0≤ When z≦Sz−1; resolution: Rxy, Rz), the process according to the following [Equation 11] is executed to calculate a gradation compression tomographic image D8(x, y, z).

〔数式11〕
D8(x,y,z)=(Do(x,y,z)-Lmin)・255/(Lmax-Lmin)
D8(x,y,z)>255の場合:D8(x,y,z)=255、D8(x,y,z)<0の場合:D8(x,y,z)=0
[Formula 11]
D8 (x, y, z) = (Do (x, y, z) - Lmin) 255 / (Lmax - Lmin)
If D8(x,y,z)>255: D8(x,y,z)=255 If D8(x,y,z)<0: D8(x,y,z)=0

〔数式11〕の第2式に示すように、信号値が上限値Lmaxを超える場合は255、下限値Lminを下回る場合は0として、下限値Lminから上限値Lmaxの範囲を0から255に線形変換する。なお、階調圧縮断層画像を用いてボクセル画像を作成する場合、図5のカラーマップに代えて、階調低下画像用のカラーマップとして、8ビットの信号値用のカラーマップを用意しておく。具体的には、信号値0~255に対応付けてR,G,B、αが記録されたカラーマップを用いる。 As shown in the second formula of [Equation 11], when the signal value exceeds the upper limit value Lmax, it is set to 255, and when it is below the lower limit value Lmin, it is set to 0. Convert. When creating a voxel image using a gradation-compressed tomographic image, a color map for 8-bit signal values is prepared as a color map for a gradation-reduced image instead of the color map in FIG. . Specifically, a color map in which R, G, B, and α are recorded in association with signal values 0 to 255 is used.

以上、本開示の好適な実施形態について説明したが、本開示は上記実施形態に限定されず、種々の変形が可能である。例えば、上記実施形態では、CPU1として、複数のCPUコアを有し、並列処理が可能なマルチコアCPUを用いるようにしたが、1つのCPUコアが1つの処理スレッドの処理のみを行うシングルコアCPUを用いるようにしてもよい。 Although the preferred embodiments of the present disclosure have been described above, the present disclosure is not limited to the above embodiments, and various modifications are possible. For example, in the above embodiment, a multi-core CPU having a plurality of CPU cores and capable of parallel processing is used as the CPU 1, but a single-core CPU in which one CPU core only processes one processing thread is used. may be used.

また、上記実施形態では、モアレ対策を行うため、ボクセル化領域の最外周のボクセルの不透明度を0として、ボクセル画像を作成するようにしたが、モアレが目立たない場合は、必ずしも最外周のボクセルの不透明度を0としてボクセル画像を作成する必要はない。 In the above-described embodiment, in order to prevent moiré, the voxel image is created by setting the opacity of the outermost voxel of the voxelized area to 0. However, if the moiré is not noticeable, the outermost voxel There is no need to create a voxel image with 0 opacity.

1・・・CPU(Central Processing Unit)
2・・・RAM(Random Access Memory)
3・・・記憶装置
4・・・指示入力I/F
5・・・データ入出力I/F
6・・・表示部
7・・・GPU
8・・・フレームメモリ
10・・・断層画像読込手段
20・・・カラーマップ読込手段
30・・・ROIクリッピング設定手段
40・・・マスク設定手段
50・・・不透明外接領域算出手段
60・・・ボクセル画像作成手段
61・・・不透明度補正手段
62・・・陰影付加手段
70・・・レンダリング手段
71・・・3Dテクスチャ登録手段
72・・・座標変換手段
73・・・積層四角形設定手段
74・・・画素値算出手段
80・・・レンダリング画像出力手段
100・・・ボリュームレンダリング装置
1 CPU (Central Processing Unit)
2 RAM (random access memory)
3... Storage device 4... Instruction input I/F
5 Data input/output I/F
6... Display unit 7... GPU
8 frame memory 10 tomographic image reading means 20 color map reading means 30 ROI clipping setting means 40 mask setting means 50 opaque circumscribed area calculation means 60 Voxel image creation means 61 Opacity correction means 62 Shadow addition means 70 Rendering means 71 3D texture registration means 72 Coordinate conversion means 73 Laminated rectangle setting means 74. ..Pixel value calculation means 80..Rendered image output means 100..Volume rendering device

Claims (15)

所定の対象物について所定の間隔で撮影された複数の2次元の断層画像に基づいて、信号値に対して色成分の値と不透明度を対応付けて定義されたカラ-マップを参照してレンダリング画像を生成するためのボリュームレンダリング装置であって、
前記各断層画像の各画素のうち、前記カラ-マップを参照して得られた不透明度が0でない画素が存在する領域に3次元の各軸方向において外接する領域である不透明外接領域を算出する不透明外接領域算出手段と、
前記各断層画像のうち、前記不透明外接領域に対応する領域をボクセル化領域とし、前記カラ-マップを参照して当該ボクセル化領域の各画素の信号値を変換し、画素値として色成分および不透明度が定義された2次元の要素画像が所定の間隔で重ねて配置されたボクセル画像を作成するボクセル画像作成手段と、
前記ボクセル画像を用いてレンダリング画像を生成するレンダリング手段と、
を有するボリュームレンダリング装置。
Rendering with reference to a color map defined by associating color component values and opacity with signal values, based on multiple 2D tomographic images of a given object taken at given intervals. A volume rendering device for generating an image, comprising:
calculating an opaque circumscribed region, which is a region that circumscribes in each three-dimensional axial direction the region in which pixels having non-zero opacity obtained by referring to the color map exist among the pixels of each of the tomographic images; opaque circumscribed area calculation means;
Among the tomographic images, a region corresponding to the opaque circumscribed region is defined as a voxelized region, and the signal value of each pixel in the voxelized region is converted by referring to the color map, and color components and non-color components are obtained as pixel values. voxel image creation means for creating a voxel image in which two-dimensional element images with defined transparency are superimposed at predetermined intervals;
rendering means for generating a rendered image using the voxel image;
volume rendering device.
前記ボクセル画像作成手段は、
前記ボクセル化領域における最外周となる画素に対応する不透明度が0でない場合に、当該画素に対応する不透明度を0に置き換えるようにボクセル画像を作成する請求項1に記載のボリュームレンダリング装置。
The voxel image creating means is
2. The volume rendering apparatus according to claim 1, wherein the voxel image is created such that, when the opacity corresponding to the outermost pixel in the voxelized area is not 0, the opacity corresponding to the pixel is replaced with 0.
各前記要素画像のx軸方向の左端に対応する座標をXso、x軸方向の右端に対応する座標をXeo、y軸方向の上端に対応する座標をYso、y軸方向の下端に対応する座標をYeo、第1番目の要素画像が配置されるz座標をZso、断層画像の総数であるM番目の要素画像が配置されるz座標をZeoとすると、Xso≦Xs<Xe≦Xeo、Yso≦Ys<Ye≦Yeo、Zso≦Zs<Ze≦Zeoを満たす、レンダリング画像を生成する対象となるボクセル画像領域を指定する6つの座標Xs,Xe,Ys,Ye,Zs,Zeが定義されている場合、
前記ボクセル画像作成手段は、x≦Xsまたはx≧Xeまたはy≦Ysまたはy≧Yeまたはz≦Zsまたはz≧Zeを満たす範囲においてボクセル画像を作成する請求項1または請求項2に記載のボリュームレンダリング装置。
Xso is the coordinate corresponding to the left end in the x-axis direction of each elemental image, Xeo is the coordinate corresponding to the right end in the x-axis direction, Yso is the coordinate corresponding to the upper end in the y-axis direction, and Yso is the coordinate corresponding to the lower end in the y-axis direction. is Yeo, Zso is the z-coordinate at which the first elemental image is arranged, and Zeo is the z-coordinate at which the M-th elemental image, which is the total number of tomographic images, is arranged. When six coordinates Xs, Xe, Ys, Ye, Zs, and Ze are defined that specify a voxel image area for which a rendering image is to be generated, satisfying Ys<Ye≦Yeo and Zso≦Zs<Ze≦Zeo ,
3. The volume according to claim 1, wherein said voxel image creation means creates a voxel image in a range that satisfies x≦Xs, x≧Xe, y≦Ys, y≧Ye, z≦Zs, or z≧Ze. rendering device.
前記断層画像に対応して、0(表示しない)または1(表示する)の値をもつマスクデータが定義されている場合、
前記不透明外接領域算出手段は、前記マスクデータを参照して、前記不透明度が0でない画素を特定するようにしている請求項1から請求項3のいずれか一項に記載のボリュームレンダリング装置。
When mask data having a value of 0 (not displayed) or 1 (displayed) is defined corresponding to the tomographic image,
4. The volume rendering apparatus according to any one of claims 1 to 3, wherein said opaque circumscribed region calculating means refers to said mask data to specify pixels whose opacity is not zero.
前記不透明外接領域算出手段は、所定の分割数をN(N>1)として、各前記断層画像をN個の断層画像群に分割し、N個の各断層画像群に対して、前記不透明外接領域の一部を作成する処理を並行して実行する請求項1から請求項4のいずれか一項に記載のボリュームレンダリング装置。 The opaque circumscribing region calculating means divides each of the tomographic images into N tomographic image groups with a predetermined number of divisions set to N (N>1), and divides each of the N tomographic image groups into the opaque circumscribing region. 5. The volume rendering apparatus according to any one of claims 1 to 4, wherein processes for creating a part of a region are executed in parallel. 前記要素画像に対応して、0(表示しない)または1(表示する)の値をもつマスクデータが定義されている場合、
前記ボクセル画像作成手段は、各画素に不透明度および色成分を与えながら前記要素画像を作成する際、当該要素画像に対応する前記マスクデータを参照し、当該画素に対応する前記マスクデータの値が0の場合は、当該要素画像の当該画素の不透明度を0にするようにしている請求項1から請求項5のいずれか一項に記載のボリュームレンダリング装置。
When mask data with a value of 0 (not displayed) or 1 (displayed) is defined corresponding to the element image,
The voxel image creation means refers to the mask data corresponding to the element image when creating the element image while giving opacity and color components to each pixel, and the value of the mask data corresponding to the pixel is 6. The volume rendering apparatus according to any one of claims 1 to 5, wherein the opacity of the pixel of the elemental image is set to 0 when the pixel is 0.
前記ボクセル画像作成手段は、ボクセル画像の3次元座標値により定まる不透明度補正テーブルを用いて、不透明度を補正する不透明度補正手段を備える請求項1から請求項6のいずれか一項に記載のボリュームレンダリング装置。 7. The voxel image creation means according to any one of claims 1 to 6, comprising opacity correction means for correcting opacity using an opacity correction table determined by three-dimensional coordinate values of the voxel image. Volume rendering device. 前記ボクセル画像作成手段は、所定の分割数をN(N>1)として、前記ボクセル化領域に対応する各前記断層画像をN個の断層画像群に分割し、N個の各断層画像群に対して、前記要素画像を作成する処理を並行して実行する請求項1から請求項7のいずれか一項に記載のボリュームレンダリング装置。 The voxel image creating means divides each of the tomographic images corresponding to the voxelized region into N tomographic image groups with a predetermined number of divisions being N (N>1). 8. The volume rendering apparatus according to any one of claims 1 to 7, wherein the process of creating the element images is executed in parallel. 前記ボクセル画像作成手段は、作成された各要素画像の各画素について、前記各画素を含む少なくともxyz軸方向の近傍に位置する画素の不透明度を参照して、前記要素画像の画素の色成分の値を補正する陰影付加手段を備える請求項8に記載のボリュームレンダリング装置。 The voxel image creating means refers to the opacity of each pixel of each created elemental image, which is positioned at least in the xyz-axis direction, including the pixel, to determine the color component of the pixel of the elemental image. 9. A volume rendering apparatus according to claim 8, comprising shading adding means for correcting values. 前記断層画像群において、順に配置された一端を先頭、他端を末尾としたとき、
前記陰影付加手段は、前記断層画像群の先頭の断層画像から末尾の断層画像までの全ての断層画像について前記要素画像が作成された後、前記先頭の断層画像に対応する要素画像と前記末尾の断層画像に対応する要素画像の画素の色成分の値を補正するようにしている請求項9に記載のボリュームレンダリング装置。
In the tomographic image group, when one end arranged in order is the head and the other end is the end,
After the element images are created for all the tomographic images from the top tomographic image to the last tomographic image of the group of tomographic images, the shading means adds the element image corresponding to the top tomographic image and the last tomographic image. 10. The volume rendering apparatus according to claim 9, wherein the color component values of the pixels of the elemental image corresponding to the tomographic image are corrected.
前記断層画像群において、順に配置された一端を先頭、他端を末尾としたとき、
前記ボクセル画像作成手段は、前記断層画像群の末尾の断層画像について、前記要素画像を作成した後、前記断層画像群の先頭の断層画像から末尾の1つ前の断層画像までの各断層画像に対して、前記要素画像を作成し、
前記陰影付加手段は、前記先頭の断層画像に対応する要素画像、前記末尾の1つ前の断層画像に対応する要素画像および前記末尾の断層画像に対応する要素画像に対して色成分の値を補正する請求項9に記載のボリュームレンダリング装置。
In the tomographic image group, when one end arranged in order is the head and the other end is the end,
The voxel image creating means, after creating the element image for the last tomographic image of the tomographic image group, creates each tomographic image from the first tomographic image to the last tomographic image of the tomographic image group. In contrast, creating the element image,
The shading means adds color component values to an element image corresponding to the head tomographic image, an element image corresponding to the tomographic image immediately before the tail, and an element image corresponding to the tail tomographic image. 10. A volume rendering apparatus according to claim 9, wherein the correction is performed.
前記レンダリング手段は、
前記ボクセル画像で構成される3Dテクスチャ画像を生成する3Dテクスチャ登録手段と、
前記3Dテクスチャ画像に対して所定の座標変換を行って変換後3Dテクスチャ画像を生成する座標変換手段と、
3次元空間のxy座標面上の四角形をz軸方向に並べ、前記各四角形の4頂点の各3次元座標を前記変換後3Dテクスチャ画像の所定の4箇所の各3次元座標に対応付けた積層四角形を設定する積層四角形設定手段と、
所定の視点からz軸方向に平行な視線上の前記積層四角形上の3次元座標に対応する前記変換後3Dテクスチャ画像のボクセルの(R,G,B)で構成される色成分を当該ボクセルの不透明度に基づいて前記視点から遠い四角形の順にアルファブレンディングして得られた色成分を、前記レンダリング画像の(R,G,B)で構成される画素値として与えるようにしている画素値算出手段と、
を備えている請求項1から請求項11のいずれか一項にボリュームレンダリング装置。
The rendering means is
3D texture registration means for generating a 3D texture image composed of the voxel image;
coordinate transformation means for performing a predetermined coordinate transformation on the 3D texture image to generate a post-transformation 3D texture image;
Lamination in which quadrilaterals on the xy coordinate plane of the three-dimensional space are arranged in the z-axis direction, and each of the three-dimensional coordinates of the four vertices of each of the quadrilaterals is associated with each of the predetermined four three-dimensional coordinates of the post-transformation 3D texture image. a laminated quadrangle setting means for setting a quadrangle;
A color component composed of (R, G, B) of a voxel of the converted 3D texture image corresponding to the three-dimensional coordinates on the stacked quadrangle on the line of sight parallel to the z-axis direction from a predetermined viewpoint is Pixel value calculation means for giving color components obtained by alpha blending in order of rectangles farther from the viewpoint based on opacity as pixel values composed of (R, G, B) of the rendered image. When,
12. A volume rendering apparatus according to any one of claims 1 to 11, comprising:
前記座標変換手段は、
所定の3次元座標系における回転を定義した4×4行列、視野角度、視点位置、クリッピング位置、xyz軸方向のオフセット値、xyz軸方向の拡大又は縮小倍率、z軸方向変倍率を含む所定の座標変換のパラメータを取得し、
前記3Dテクスチャ画像に対して、前記取得したパラメータを用いた前記所定の座標変換を行って前記変換後3Dテクスチャ画像を生成するようにしている請求項12にボリュームレンダリング装置。
The coordinate transformation means is
A 4×4 matrix defining rotation in a predetermined three-dimensional coordinate system, a predetermined Get the parameters of the coordinate transformation,
13. The volume rendering device according to claim 12, wherein the 3D texture image is subjected to the predetermined coordinate transformation using the acquired parameters to generate the post-transformation 3D texture image.
前記座標変換手段および前記画素値算出手段は、汎用コンピュータのビデオカードに搭載されているGPUおよびフレームメモリを用いて実行するようにしている請求項13にボリュームレンダリング装置。 14. A volume rendering apparatus according to claim 13, wherein said coordinate transformation means and said pixel value calculation means are executed using a GPU and frame memory mounted on a video card of a general-purpose computer. 請求項1から請求項14のいずれか一項に記載のボリュームレンダリング装置として、コンピュータを機能させるためのプログラム。 A program for causing a computer to function as the volume rendering device according to any one of claims 1 to 14.
JP2018218917A 2018-11-22 2018-11-22 volume rendering device Active JP7206846B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018218917A JP7206846B2 (en) 2018-11-22 2018-11-22 volume rendering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018218917A JP7206846B2 (en) 2018-11-22 2018-11-22 volume rendering device

Publications (2)

Publication Number Publication Date
JP2020086806A JP2020086806A (en) 2020-06-04
JP7206846B2 true JP7206846B2 (en) 2023-01-18

Family

ID=70908202

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018218917A Active JP7206846B2 (en) 2018-11-22 2018-11-22 volume rendering device

Country Status (1)

Country Link
JP (1) JP7206846B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6418344B1 (en) 2018-02-23 2018-11-07 大日本印刷株式会社 Computer program, image processing apparatus, and image processing method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6418344B1 (en) 2018-02-23 2018-11-07 大日本印刷株式会社 Computer program, image processing apparatus, and image processing method

Also Published As

Publication number Publication date
JP2020086806A (en) 2020-06-04

Similar Documents

Publication Publication Date Title
US7505037B2 (en) Direct volume rendering of 4D deformable volume images
Che et al. Surface shading in the cuberille environment
EP0758118B1 (en) A volume rendering apparatus and method
JP4205327B2 (en) Volume dataset rendering method and system
US20060262112A1 (en) System and method for three-dimensional shape generation from partial and incomplete views, and interactive design system using same
JP6863693B2 (en) Graphics processing system and method
US20050237336A1 (en) Method and system for multi-object volumetric data visualization
US8269770B1 (en) Tessellation of trimmed parametric surfaces by walking the surface
US20110082667A1 (en) System and method for view-dependent anatomic surface visualization
US7893938B2 (en) Rendering anatomical structures with their nearby surrounding area
EP2402910A2 (en) Seamless fracture generation in a graphic pipeline
JP6215057B2 (en) Visualization device, visualization program, and visualization method
JP7223312B2 (en) volume rendering device
JP7180123B2 (en) Medical image processing apparatus, medical image processing method, program, and data creation method
JP7206846B2 (en) volume rendering device
JP7013849B2 (en) Computer program, image processing device and image processing method
JP7131080B2 (en) volume rendering device
JP7003635B2 (en) Computer program, image processing device and image processing method
JP7167699B2 (en) volume rendering device
JP7155670B2 (en) Medical image processing apparatus, medical image processing method, program, and data creation method
JP5245811B2 (en) Voxel array visualization device
JP7095409B2 (en) Medical image processing device, medical image processing method, program, and MPR image generation method
JP7283603B2 (en) COMPUTER PROGRAM, IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD
JP6436258B1 (en) Computer program, image processing apparatus, and image processing method
US7961958B2 (en) System and method for rendering a binary volume in a graphics processing unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210928

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220622

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220628

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220829

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20221206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221219

R150 Certificate of patent or registration of utility model

Ref document number: 7206846

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150