JP2020038589A - Rendering device - Google Patents

Rendering device Download PDF

Info

Publication number
JP2020038589A
JP2020038589A JP2018166559A JP2018166559A JP2020038589A JP 2020038589 A JP2020038589 A JP 2020038589A JP 2018166559 A JP2018166559 A JP 2018166559A JP 2018166559 A JP2018166559 A JP 2018166559A JP 2020038589 A JP2020038589 A JP 2020038589A
Authority
JP
Japan
Prior art keywords
image
voxel
coordinates
value
divided
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.)
Granted
Application number
JP2018166559A
Other languages
Japanese (ja)
Other versions
JP6555408B1 (en
Inventor
茂出木 敏雄
Toshio Modegi
敏雄 茂出木
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 JP2018166559A priority Critical patent/JP6555408B1/en
Application granted granted Critical
Publication of JP6555408B1 publication Critical patent/JP6555408B1/en
Publication of JP2020038589A publication Critical patent/JP2020038589A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

To provide a method of creating a volume rendering image that can reduce the calculation load and shorten the computation time.SOLUTION: A rendering device includes two-dimensional projection image generation means 70 that divides a two-dimensional projection image generation region into N divided generation regions, irradiates a voxel image having each pixel associated with a plurality of two-dimensional tomographic images with a virtual beam in the line-of-sight direction from each pixel in the divided generation regions, extracts a plurality of voxels of the voxel image in which respective virtual beams cross each other, calculates a representative signal value on the basis of signal values of the extracted plurality of voxels, and gives the representative signal value as a pixel value of pixels of the divided generation regions irradiated with virtual beams, thereby generating a divided image for each of the divided generation regions. The two-dimensional projection image generation means 70 concurrently executes processing of generating divided images for the N divided generation regions to generate a two-dimensional projection image.SELECTED DRAWING: Figure 3

Description

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

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

3次元の情報を2次元に投影した2次元投影画像として可視化した画像の1つに、MIP(Maximum Intensity Projection)画像がある。MIP画像は、MIP(MPRのMIP表示モードと区別するため3D−MIPともいう)というボリュームレンダリングの一手法であり、レイキャスティング法と同様なアルゴリズムで生成される。このMIP画像を始めとするボリュームレンダリング像の作成は、、計算負荷が高く、計算時間が長くなるという問題がある。   One of the images visualized as a two-dimensional projection image obtained by projecting three-dimensional information in two dimensions is a MIP (Maximum Intensity Projection) image. The MIP image is a method of volume rendering called MIP (also referred to as 3D-MIP to distinguish it from the MIP display mode of MPR), and is generated by an algorithm similar to the ray casting method. Creation of a volume rendering image such as an MIP image has a problem that the calculation load is high and the calculation time is long.

これに対して、生成するMIP画像をxy軸方向に所定の間隔で間引きながらMIP画素を探索し、間引きされた画素に対しては、近傍で既に探索されたMIP画素の深さ方向の位置を中心に限定した範囲でMIP画素を探索することにより、高速化する手法が提案されている(特許文献1参照)。また、MIP画像を回転表示させるにあたり、任意のアングルで再計算する方法をとると、リアルタイムな表示が行えないため、8方向に限定し、正八面体に投影した像をあらかじめ算出しておき、ユーザ指定により、8方向のいずれかにリアルタイムに回転させ、併せて表示像のアングルを提示する手法も提案されている(特許文献2参照)。   On the other hand, the MIP pixel is searched for while thinning out the generated MIP image at a predetermined interval in the xy-axis direction. For the thinned-out pixel, the position in the depth direction of the already searched MIP pixel in the vicinity is determined. There has been proposed a method for increasing the speed by searching for MIP pixels within a range limited to the center (see Patent Document 1). In addition, if the method of recalculating at an arbitrary angle is used in rotating and displaying the MIP image, real-time display cannot be performed. Therefore, the MIP image is limited to eight directions, and the image projected on the regular octahedron is calculated in advance, and the user There is also proposed a method of rotating in any one of eight directions in real time by designation and presenting an angle of a display image (see Patent Document 2).

特開2005−46207号公報JP 2005-46207 A 特開2001−229399号公報JP 2001-229399 A

特許文献1、特許文献2に記載の技術では、MIP画素を探索する範囲を狭くする方法をとっているため、MIP表示モードでは問題が生じにくいが、RaySumのようにレイ方向に配列している全ボクセルの平均値を算出するという表示モードを実現できないという問題がある。即ち、特許文献1では、演算抑制の効果はMIPモードに限定され、RaySumモードやMinIPモードでは演算抑制の効果が働かない。また、特許文献2に記載の技術では、8方向以外のアングルでは再計算が必要になるため、任意の角度にアングルを微調整したいという要望に応えられないという問題がある。即ち、特許文献2では、演算抑制の効果は特定のアングルに限定され、任意の角度にアングルを微調整する場合、演算抑制の効果が働かない。   In the techniques described in Patent Literature 1 and Patent Literature 2, a problem is hardly generated in the MIP display mode because a method of narrowing the search range of MIP pixels is used. However, they are arranged in the ray direction like RaySum. There is a problem that a display mode of calculating an average value of all voxels cannot be realized. That is, in Patent Literature 1, the effect of operation suppression is limited to the MIP mode, and the effect of operation suppression does not work in the RaySum mode or the MinIP mode. Further, the technique described in Patent Literature 2 has a problem in that it is not possible to fine-tune the angle to an arbitrary angle because recalculation is required for angles other than eight directions. That is, in Patent Literature 2, the effect of calculation suppression is limited to a specific angle, and when the angle is finely adjusted to an arbitrary angle, the effect of calculation suppression does not work.

要するに、特許文献1、特許文献2に記載の技術では、適用される表示方法が限定されてしまう。   In short, the techniques described in Patent Literature 1 and Patent Literature 2 limit the applicable display methods.

本開示は、上記課題を解決する手段を複数含んでいるが、その一例を挙げるならば、
対象物に対して所定の間隔で撮影され、各画素に信号値が付与された複数の2次元の断層画像に基づいて、視線方向を通過する各画素の信号値を基に算出された代表信号値で構成される2次元投影画像を生成するためのレンダリング装置であって、
前記2次元投影画像を生成する領域である生成領域をN個の分割生成領域に分割し、前記分割生成領域を構成する各画素より、前記視線方向に仮想光線を照射し、
前記複数の2次元の断層画像を構成する各画素を対応させたボクセル画像と各仮想光線が交差する前記ボクセル画像のボクセルを複数抽出し、抽出された複数のボクセルの信号値を基に単一の代表信号値を算出し、算出された代表信号値を当該仮想光線が照射された前記分割生成領域の画素の画素値として与えることにより、各分割生成領域に対応する分割画像を生成する2次元投影画像生成手段を有し、
前記2次元投影画像生成手段は、前記N個に分割された分割生成領域に対して分割画像を生成する処理を並行して実行し前記2次元投影画像を生成する。
The present disclosure includes a plurality of means for solving the above-described problems.
A representative signal calculated based on a signal value of each pixel passing through the line of sight based on a plurality of two-dimensional tomographic images in which an image of an object is captured at predetermined intervals and a signal value is assigned to each pixel. A rendering device for generating a two-dimensional projection image composed of values,
Dividing a generation area, which is an area for generating the two-dimensional projection image, into N divided generation areas, and irradiating virtual rays in the line-of-sight direction from each pixel forming the divided generation areas,
A plurality of voxels of the voxel image in which each pixel constituting the plurality of two-dimensional tomographic images corresponds to each voxel image where each virtual ray intersects, and a single voxel is extracted based on the signal values of the plurality of extracted voxels. Two-dimensionally generating a divided image corresponding to each divided generation region by calculating the representative signal value of the divided generation region as a pixel value of a pixel of the divided generation region irradiated with the virtual ray. Having projection image generation means,
The two-dimensional projection image generation means generates the two-dimensional projection image by executing a process of generating a divided image in parallel with the N divided generation regions.

また、本開示は、
対象物に対して所定の間隔で撮影され、各画素に信号値が付与された複数の2次元の断層画像に基づいて、視線方向を通過する各画素の信号値を基に算出された代表信号値で構成されるモノクロ画像を生成するため、
コンピュータを、
前記モノクロ画像の生成領域をN個の分割生成領域に分割し、前記複数の2次元の断層画像と各画素を対応させたボクセル画像に対して、前記分割生成領域の各画素より視線方向に仮想光線を照射し、各仮想光線が交差する前記ボクセル画像のボクセルを複数抽出し、抽出された複数のボクセルの信号値を基に単一の代表信号値を算出し、算出された代表信号値を当該仮想光線が照射された前記分割生成領域の画素の画素値として与えることにより、各分割生成領域に対して、分割画像を生成するモノクロ画像生成手段として機能させ、
前記モノクロ画像生成手段は、前記N個に分割された分割生成領域に対して分割画像を生成する処理を並行して実行し、得られた分割画像を統合して前記モノクロ画像を生成するプログラムを提供する。
In addition, the present disclosure,
A representative signal calculated based on a signal value of each pixel passing through the line of sight based on a plurality of two-dimensional tomographic images in which an image of an object is captured at predetermined intervals and a signal value is assigned to each pixel. To generate a monochrome image consisting of values,
Computer
The generation region of the monochrome image is divided into N divided generation regions, and a voxel image in which the plurality of two-dimensional tomographic images and each pixel are associated with each other is imagined in a line-of-sight direction from each pixel of the divided generation region. Irradiate light rays, extract a plurality of voxels of the voxel image where each virtual ray intersects, calculate a single representative signal value based on the signal values of the extracted plurality of voxels, and calculate the calculated representative signal value. By giving as a pixel value of the pixel of the divided generation region irradiated with the virtual ray, for each divided generation region, function as a monochrome image generating means for generating a divided image,
The monochrome image generation means executes a process of generating a divided image in parallel with the N divided generation regions, and integrates the obtained divided images to generate the monochrome image. provide.

本開示によれば、複数の断層画像を用いて3次元的に可視化するための2次元投影画像の生成処理の速度を向上させることが可能となる。   According to the present disclosure, it is possible to improve the speed of a process of generating a two-dimensional projection image for three-dimensional visualization using a plurality of tomographic images.

複数の断層画像と、生成されるモノクロの2次元投影画像であるMIP画像を示す図である。FIG. 3 is a diagram illustrating a plurality of tomographic images and a generated MIP image that is a monochrome two-dimensional projected image. 本開示の一実施形態に係るレンダリング装置100のハードウェア構成図である。1 is a hardware configuration diagram of a rendering device 100 according to an embodiment of the present disclosure. 本実施形態に係るレンダリング装置の構成を示す機能ブロック図である。FIG. 2 is a functional block diagram illustrating a configuration of a rendering device according to the embodiment. 本実施形態に係るレンダリング装置の処理動作を示すフローチャートである。5 is a flowchart illustrating a processing operation of the rendering device according to the embodiment. MIP画像生成の詳細を示すフローチャートである。9 is a flowchart illustrating details of MIP image generation. 座標変換の概念図である。It is a conceptual diagram of coordinate conversion. 図5のステップS540における分割画像生成処理を示すフローチャートである。6 is a flowchart illustrating a divided image generation process in step S540 in FIG. 図7のステップS620における代表信号値Vmの算出処理を示すフローチャートである。8 is a flowchart showing a process of calculating a representative signal value Vm in step S620 of FIG. 起点座標探索手段77が各画素において起点座標を探索する処理を示すフローチャートである。6 is a flowchart illustrating a process in which a starting point coordinate search unit 77 searches for starting point coordinates in each pixel. 生成されたMIP画像の例を示す図である。FIG. 7 is a diagram illustrating an example of a generated MIP image. コンピュータによりレンダリング装置100を実現する場合の並列化処理を示す図である。FIG. 9 is a diagram illustrating a parallel processing when the rendering device 100 is implemented by a computer. コンピュータによりレンダリング装置100を実現する場合の並列化処理のソフトウェアによる流れを示す図である。FIG. 3 is a diagram illustrating a flow of software for parallel processing when the rendering apparatus 100 is implemented by a computer. プログレッシブレンダリングの処理手順を示すフローチャートである。6 is a flowchart illustrating a processing procedure of progressive rendering. プログレッシブレンダリングにより表示された画面例を示す図である。It is a figure showing the example of the screen displayed by progressive rendering. 生成領域を複数の分割生成領域に分割する場合の様々な態様を示す図である。It is a figure showing various modes at the time of dividing a generation field into a plurality of division generation fields. 各処理スレッドの終了ごとに表示処理を行う場合の並列化処理のソフトウェアによる流れを示す図である。It is a figure showing the flow by the software of the parallelization process in the case of performing a display process each time each processing thread ends.

以下、本開示の好適な実施形態について図面を参照して詳細に説明する。
本開示は、複数の断層画像に基づいて、所定の値をもつ2次元投影画像であるMIP画像を生成するものである。図1は、複数の断層画像と、生成される2次元投影画像であるMIP画像を示す図である。図1(a)は複数の断層画像、図1(b)は1枚の断層画像、図1(c)は2次元投影画像である。図1(a)(b)に示す断層画像は、DICOM形式のものを示している。図1(a)は、370枚の断層画像群であり、図1(b)は、そのうちの1枚を拡大したものである。後述する実施形態のレンダリング装置では、図1(a)に示したような複数の断層画像に対してレンダリング処理を実行して、図1(c)に示したような1枚の2次元投影画像を生成する。図1(c)に示した2次元投影画像は、広義のMIP画像と呼ばれ、各画素が単一の信号値を有している。広義のMIP画像は、単一の信号値として最大値を記録した「狭義のMIP」、単一の信号値として最小値を記録したMinIP、単一の信号値として平均値を記録したRaySumを含んでいる。以降、本明細書では、何らかの単一の信号値を記録した2次元投影画像である広義のMIP画像を、単にMIP画像と呼ぶことにする。なお、本実施形態で生成する2次元投影画像はモノクロのMIP画像であるが、モノクロ画像以外の2次元投影画像を生成することもできる。また、本開示におけるレンダリング装置におけるレンダリング処理は、「狭義のMIP」、「MinIP」、「RaySum」等に限定されず、レイキャスティング等、他のレンダリング処理にも適用される。
Hereinafter, preferred embodiments of the present disclosure will be described in detail with reference to the drawings.
The present disclosure is to generate a MIP image that is a two-dimensional projection image having a predetermined value based on a plurality of tomographic images. FIG. 1 is a diagram showing a plurality of tomographic images and a generated MIP image which is a two-dimensional projection image. 1A shows a plurality of tomographic images, FIG. 1B shows one tomographic image, and FIG. 1C shows a two-dimensional projected image. The tomographic images shown in FIGS. 1A and 1B are of the DICOM format. FIG. 1A shows a group of 370 tomographic images, and FIG. 1B shows an enlarged one of them. In a rendering apparatus according to an embodiment to be described later, a rendering process is performed on a plurality of tomographic images as illustrated in FIG. 1A, and a single two-dimensional projected image as illustrated in FIG. Generate The two-dimensional projected image shown in FIG. 1C is called a MIP image in a broad sense, and each pixel has a single signal value. The MIP image in a broad sense includes “MIP in a narrow sense” in which the maximum value is recorded as a single signal value, MinIP in which the minimum value is recorded as a single signal value, and RaySum in which the average value is recorded as a single signal value. In. Hereinafter, in this specification, a MIP image in a broad sense, which is a two-dimensional projection image in which some single signal value is recorded, is simply referred to as an MIP image. Although the two-dimensional projected image generated in the present embodiment is a monochrome MIP image, a two-dimensional projected image other than a monochrome image can be generated. Further, the rendering process in the rendering device according to the present disclosure is not limited to “MIP in a narrow sense”, “MinIP”, “RaySum”, and the like, but is also applied to other rendering processes such as ray casting.

<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 rendering device 100 according to an embodiment of the present disclosure. The rendering apparatus 100 according to the present embodiment can be realized by a general-purpose computer. As shown in FIG. 2, a CPU (Central Processing Unit) 1 and a RAM (Random Access Memory) 2 which is a main memory of the computer. A large-capacity storage device 3 such as a hard disk, a solid state drive (SSD), or a flash memory for storing programs and data to be executed by the CPU 1, an instruction input I / F (interface) 4 such as a keyboard and a mouse; 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 as a display device such as a liquid crystal display; and a GPU as an arithmetic processing unit specialized in graphics (Graphics Processing Unit) 7 and a frame memory 8 for holding an image to be displayed on the display unit 6. It is connected via a bus. Since the calculation result by the GPU 7 is written into the frame memory 8, the GPU 7 and the frame memory 8 are often mounted on a video card provided with an interface to the display unit 6 and mounted on a general-purpose computer via a bus.

本実施形態において、CPU1は、マルチコアCPUであり、複数のCPUコアを有し、並列処理が可能となっている。図2の例では、RAM2が1つだけ示されているが、CPU1の各CPUコアが、1つのRAM2にアクセスするように構成されている。なお、CPU1は複数であってもよい。またマルチコアCPUは、論理的に複数のCPUコアを有するCPUであってもよい。   In the present embodiment, the CPU 1 is a multi-core CPU, has a plurality of CPU cores, and can perform parallel processing. Although only one RAM 2 is shown in the example of FIG. 2, each CPU core of the CPU 1 is configured to access one RAM 2. Note that a plurality of CPUs 1 may be provided. Further, the multi-core CPU may be a CPU logically having a plurality of CPU cores.

図3は、本実施形態に係るレンダリング装置の構成を示す機能ブロック図である。図3において、10は断層画像読込手段、15は座標変換パラメータ入力手段、20はROIクリッピング設定手段、25はマスク設定手段、30はボクセル画像作成手段、70は2次元投影画像生成手段、80は画像出力手段である。   FIG. 3 is a functional block diagram illustrating a configuration of the rendering device according to the present embodiment. In FIG. 3, 10 is a tomographic image reading unit, 15 is a coordinate conversion parameter input unit, 20 is an ROI clipping setting unit, 25 is a mask setting unit, 30 is a voxel image creating unit, 70 is a two-dimensional projection image generating unit, and 80 is Image output means.

断層画像読込手段10は、CT、MRI、PETなどの医用画像診断機器により収集および蓄積されたPACSから、記憶媒体や入力部を経由して、複数の断層画像を読み込む手段である。断層画像は、対象物に対して所定の間隔で撮影されて得られたものであり、各画素に信号値が付与された2次元の断層画像である。座標変換パラメータ入力手段15は、座標変換のためのパラメータを入力する手段である。ROIクリッピング設定手段20は、読み込んだ複数の断層画像のうち、ボクセル画像の作成対象を、関心領域であるROIとして設定する手段である。マスク設定手段25は、読み込んだ複数の断層画像のうち、表示させない領域をマスク設定する手段である。ボクセル画像作成手段30は、複数の2次元の断層画像を所定の間隔でz軸方向に配置し、断層画像の各画素を三次元に配置した各ボクセルに対して、断層画像の各画素の画素値である信号値をもたせたボクセル画像を作成する手段である。   The tomographic image reading unit 10 is a unit that reads a plurality of tomographic images from a PACS collected and accumulated by a medical image diagnostic device such as CT, MRI, or PET via a storage medium or an input unit. The tomographic image is obtained by photographing the object at predetermined intervals, and is a two-dimensional tomographic image in which a signal value is assigned to each pixel. The coordinate conversion parameter input means 15 is a means for inputting parameters for coordinate conversion. The ROI clipping setting unit 20 is a unit that sets a voxel image creation target among a plurality of read tomographic images as an ROI that is a region of interest. The mask setting means 25 is a means for setting a mask of an area not to be displayed in the plurality of read tomographic images. The voxel image creation means 30 arranges a plurality of two-dimensional tomographic images at predetermined intervals in the z-axis direction, and, for each voxel in which each pixel of the tomographic image is arranged three-dimensionally, This is a means for creating a voxel image having a signal value as a value.

2次元投影画像生成手段70は、ボクセル画像を用いてモノクロのボリュームレンダリング像であるMIP画像を生成する手段である。2次元投影画像生成手段70は、2次元投影画像であるMIP画像として、狭義のMIP、MInIP、RaySumの3種類を生成可能となっている。画像出力手段80は、生成されたMIP画像を所定の態様で出力する手段である。通常は、表示部6等に表示出力が行われる。   The two-dimensional projection image generation unit 70 is a unit that generates a MIP image that is a monochrome volume rendering image using voxel images. The two-dimensional projection image generation unit 70 can generate three types of MIP, MInIP, and RaySum in a narrow sense, as MIP images that are two-dimensional projection images. The image output unit 80 is a unit that outputs the generated MIP image in a predetermined mode. Normally, display output is performed on the display unit 6 or the like.

断層画像読込手段10は、CPU1が補助しながら、主にデータ入出力I/F5において実現される。座標変換パラメータ入力手段15は、CPU1が補助しながら、主に指示入力I/F4において実現される。ROIクリッピング設定手段20は、CPU1が補助しながら、主に指示入力I/F4において実現される。マスク設定手段25は、CPU1が補助しながら、主に指示入力I/F4および表示部6において実現される。2次元投影画像生成手段70は、マルチコアCPUであるCPU1が、プログラムを実行することにより実現される。このプログラムは、MIP画像の生成領域を複数の分割生成領域に分割し、各コアに各分割生成領域を割り当てて、各コアがMIP画像の分割画像を生成する処理を並行して行う。画像出力手段80は、CPU1が補助しながら、主にフレームメモリ8と表示部6において実現される。   The tomographic image reading means 10 is realized mainly in the data input / output I / F 5 with the assistance of the CPU 1. The coordinate transformation parameter input means 15 is realized mainly in the instruction input I / F 4 with the assistance of the CPU 1. The ROI clipping setting means 20 is realized mainly at the instruction input I / F 4 with the assistance of the CPU 1. The mask setting unit 25 is realized mainly in the instruction input I / F 4 and the display unit 6 with the assistance of the CPU 1. The two-dimensional projection image generation unit 70 is realized by the CPU 1 that is a multi-core CPU executing a program. This program divides the MIP image generation region into a plurality of division generation regions, allocates each division generation region to each core, and performs processing in which each core generates a MIP image division image in parallel. The image output unit 80 is realized mainly in the frame memory 8 and the display unit 6 with the assistance of the CPU 1.

図3に示した各構成手段は、現実には図2に示したように、コンピュータおよびその周辺機器等のハードウェアに専用のプログラムを搭載することにより実現される。すなわち、コンピュータが、専用のプログラムに従って各手段の内容を実行することになる。本実施形態においては、CPUがマルチコアCPUであることが好ましい。CPUが、マルチコアCPUでなくても、複数のCPUで構成されるマルチプロセッサ構成などプログラムを並行して実行可能な並列処理を可能とする構成である必要がある。なお、本明細書において、コンピュータとは、CPU、GPU等の演算処理部を有し、データ処理が可能な装置を意味し、パーソナルコンピュータなどの汎用コンピュータだけでなく、マルチコアCPUを搭載するタブレットなどの携帯端末や様々な装置に組み込まれたコンピュータも含む。   Each component shown in FIG. 3 is actually realized by installing a dedicated program in hardware such as a computer and its peripheral devices as shown in FIG. That is, the computer executes the contents of each means according to the dedicated program. In the present embodiment, the CPU is preferably a multi-core CPU. Even if the CPU is not a multi-core CPU, the CPU must have a configuration that enables parallel processing that can execute programs in parallel, such as a multiprocessor configuration including a plurality of CPUs. Note that, in this specification, a computer means a device having an arithmetic processing unit such as a CPU and a GPU and capable of processing data, and is not limited to a general-purpose computer such as a personal computer, but also a tablet equipped with a multi-core CPU. Mobile terminals and computers embedded in 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枚積層されたものである。図1(b)における1枚の断層画像の左右方向がx軸、上下方向がy軸に対応し、図1(a)に示した複数の断層画像を重ねた場合の積層方向がz軸に対応する。
<2. Processing Operation>
Next, the processing operation of the rendering apparatus shown in FIGS. 2 and 3 will be described. FIG. 4 is a flowchart illustrating the processing operation of the rendering device according to the present embodiment. First, the tomographic image reading means 10 reads a plurality of tomographic images. The plurality of tomographic images have an aspect as shown in FIG. In the present embodiment, the tomographic image group Do (x, y, z) in DICOM format (−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 laminating Sz tomographic images having the x-coordinate size (number of pixels) of Sx and the y-coordinate size (number of pixels) of Sy. The horizontal direction of one tomographic image in FIG. 1B corresponds to the x-axis, the vertical direction corresponds to the y-axis, and the stacking direction when a plurality of tomographic images illustrated in FIG. Corresponding.

DICOM形式の複数の断層画像を読み込んだら、ROIクリッピング設定手段20が、ROIクリッピング設定を行う(ステップS10)。ROIとはRegion of Interestの略であり、本願明細書では3次元空間における関心領域を意味する(学術的には、ROIは2次元領域を指し、3次元領域の場合、VOI(Volume of Interest)と称するが、医用画像業界では3次元領域でもROIが多用される)。ここでは、MIP画像およびボクセル画像の作成対象とする領域を示す。ROIを設定することにより、3次元的に任意の位置で被写体を断裁したMIP画像を生成することができ、体表や骨に隠れた臓器や臓器の内部を描出するのに用いられる。ステップS20以降の処理において、所定の範囲にボクセル画像作成対象が限定されるように、ステップS10においてROIを設定する。   After reading a plurality of tomographic images in the DICOM format, the ROI clipping setting means 20 sets ROI clipping (step S10). ROI is an abbreviation of Region of Interest, and in the specification of the present application, means a region of interest in a three-dimensional space (scientifically, ROI indicates a two-dimensional region, and in the case of a three-dimensional region, VOI (Volume of Interest)). However, in the medical imaging industry, ROI is frequently used even in a three-dimensional area). Here, an area where a MIP image and a voxel image are to be created is shown. By setting the ROI, a MIP image in which a subject is cut three-dimensionally at an arbitrary position can be generated, and is used to depict an internal organ or an internal organ hidden by a body surface or a bone. In the processing after step S20, the ROI is set in step S10 so that the voxel image creation target is limited to a predetermined range.

読み込んだ各断層画像のx軸方向の左端に対応する座標をXso、x軸方向の右端に対応する座標をXeo、y軸方向の上端に対応する座標をYso、y軸方向の下端に対応する座標をYeo、第1スライスの断層画像に対応する座標をZso、最終スライスの断層画像に対応する座標をZeoとすると、Xso≦Xs<Xe≦Xeo、Yso≦Ys<Ye≦Yeo、Zso≦Zs<Ze≦Zeoを満たす[Xs,Xe]、[Ys,Ye]、[Zs,Ze]の6つの座標による直方体で定義される領域をROIと定義し処理対象として特定する。ステップS10におけるROIクリッピング設定の結果、処理対象の画素数が(Xeo−Xso+1)×(Yeo−Yso+1)×(Zeo−Zso+1)画素から、(Xe−Xs+1)×(Ye−Ys+1)×(Ze−Zs+1)画素に削減されることになる。ROIクリッピング設定手段20によるステップS10のROIクリッピング設定を行うことにより、観察対象の臓器を露出させたMIP画像が得られるという効果に加え、処理対象の画素が減って処理負荷を抑え応答性を向上させることができるという二重のメリットがあるため、設定される場合が多いが、必須の処理ではなく省略することも可能である。尚、ステップS10のROIクリッピング設定の段階では、ROIクリッピングを適用する範囲を定義するだけで、具体的なクリッピング処理は、ステップS20以降の各処理で実行される。各々の処理において、ボクセル画像のROI範囲に限定して演算が行われることにより処理負荷が軽減され、ステップS70のMIP画像生成処理でクリッピング(断裁)されたレンダリング像が生成される。   The coordinates corresponding to the left end in the x-axis direction of each read tomographic image correspond to Xso, the coordinates corresponding to the right end in the x-axis direction correspond to Xeo, the coordinates corresponding to the upper end in the y-axis direction correspond to Yso, and the lower end in the y-axis direction. Assuming that the coordinates are Yeo, the coordinates corresponding to the tomographic image of the first slice are Zso, and the coordinates corresponding to the tomographic image of the last slice are Zeo, Xso ≦ Xs <Xe ≦ Xeo, Yso ≦ Ys <Ye ≦ Yeo, Zso ≦ Zs A region defined by a rectangular parallelepiped defined by six coordinates [Xs, Xe], [Ys, Ye], and [Zs, Ze] that satisfies <Ze ≦ Zeo is defined as an ROI and specified as a processing target. As a result of the ROI clipping setting in step S10, the number of pixels to be processed is changed from (Xeo-Xso + 1) × (Yeo-Yso + 1) × (Zeo-Zso + 1) pixels to (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 20, in addition to the effect that an MIP image exposing the organ to be observed is obtained, the number of pixels to be processed is reduced, the processing load is suppressed, and the responsiveness is improved. In many cases, the setting is performed because there is a double merit that the setting can be performed, but it is possible to omit the processing instead of the essential processing. In the stage of setting the ROI clipping in step S10, a specific clipping process is executed in each process after step S20 only by defining a range to which the ROI clipping is applied. In each of the processes, the processing load is reduced by performing the calculation limited to the ROI range of the voxel image, and a clipped (cut) rendering image is generated in the MIP image generation process in step S70.

ROIクリッピング設定手段20により、ROIクリッピング設定が行われたら、次に、マスク設定手段25が、マスク設定を行う(ステップS15)。マスク設定とは、断層画像の各画素を表示させるか否かの設定である。マスク設定の手法は、特に限定されないが、本実施形態では、ステップS10において読み込んだ断層画像群をMPR画像(アキシャル・コロナル・サジタルの3画面)として画面表示するとともに、本願明細書に記載の方法に基づいて作成されるMIP画像または公知の手法により作成されるボリュームレンダリング像を表示させ、これら2次元投影された複数の画像の中から最も指示がしやすい画像を選択し、選択した画像の2次元領域を指示しながら、マスクして表示させない範囲とマスクせずに表示させる領域を特定する。   After the ROI clipping setting is performed by the ROI clipping setting means 20, the mask setting means 25 performs mask setting (step S15). The mask setting is a setting as to whether or not to display each pixel of the tomographic image. The mask setting method is not particularly limited, but in the present embodiment, the tomographic image group read in step S10 is displayed on the screen as an MPR image (three axial coronal sagittal screens), and the method described in the present specification is used. A MIP image created based on the image or a volume rendering image created by a known method is displayed, and an image that is most easily instructed is selected from among the two-dimensionally projected images, and the selected image 2 While specifying the dimensional area, a range not to be displayed by masking and an area to be displayed without masking are specified.

また、MIP画像の場合、公知のボリュームレンダリング像のようにカラーマップにより特定の信号領域を透明にするなどの制御ができないため、何も手を加えないと、骨領域だけが鮮明に映り他の臓器がボケてしまう。そこで本実施形態では、公知の骨除去手法を適用し、骨領域をマスクしたマスクデータを自動的に生成する機能も搭載している。このマスク設定により、断層画像群に対応した3次元空間におけるマスクデータが得られる。マスクデータMask(x,y,z)は、断層画像群Do(x,y,z)の各画素に対応して“0”か“1”かのいずれかの値が設定されたものである。MIP画像の場合、マスクデータを使用しないと、骨領域だけが鮮明に映り他の臓器がボケてしまうため、このような3次元マスクを作成する処理は必須の処理に近いが、省略することも可能である。   Further, in the case of the MIP image, since control such as making a specific signal region transparent by a color map as in a known volume rendering image cannot be performed, only a bone region is clearly displayed without any modification. The organ is blurred. Therefore, in the present embodiment, a function of automatically generating mask data in which a bone region is masked by applying a known bone removal method is also provided. With this mask setting, mask data in a three-dimensional space corresponding to the tomographic image group is obtained. The mask data Mask (x, y, z) is one in which a value of “0” or “1” is set corresponding to each pixel of the tomographic image group Do (x, y, z). . In the case of the MIP image, if no mask data is used, only the bone region is clearly seen and other organs are blurred. Therefore, the process of creating such a three-dimensional mask is almost indispensable, but may be omitted. It is possible.

観察対象の臓器を描出する方法として、上述のROIクリッピングもあるが、3次元マスクに比べ操作が簡便であり、処理負荷も減少するため、ROIクリッピング処理も併用される頻度が多い。ROIクリッピング設定手段20、マスク設定手段25により表示させるべき特定の領域が設定されることになるが、両手段で設定されている場合は、いずれも表示すべき領域として設定された領域が有効領域となり、いずれか一方が設定されている場合は、その結果、表示すべき領域として設定された領域が有効領域となる。ROIクリッピング設定手段20、マスク設定手段25のどちらにも設定されない場合は、読み込まれた断層画像群の全領域が有効領域となる。   As a method of delineating the organ to be observed, there is the ROI clipping described above. However, since the operation is simpler and the processing load is reduced as compared with the three-dimensional mask, the ROI clipping is frequently used together. A specific area to be displayed is set by the ROI clipping setting means 20 and the mask setting means 25. If both areas are set, the area set as the area to be displayed is the effective area. When either one is set, as a result, the area set as the area to be displayed becomes the effective area. If neither the ROI clipping setting means 20 nor the mask setting means 25 is set, the entire area of the read tomographic image group is the effective area.

次に、ボクセル画像作成手段30が、ボクセル画像作成処理を行う(ステップS20)。ボクセル画像とは、断層画像の各画素が三次元空間にボクセルとして配置されたボクセル構造体である。ステップS20における具体的な処理としては、クリッピング設定、マスク設定後の断層画像の有効領域(ROI、マスクにより特定)に含まれる各画素の信号値を、対応する各ボクセルに付与し、ボクセル画像を作成する。   Next, the voxel image creating means 30 performs a voxel image creating process (step S20). The voxel image is a voxel structure in which each pixel of the tomographic image is arranged as a voxel in a three-dimensional space. As a specific process in step S20, the signal value of each pixel included in the effective area (ROI, specified by the mask) of the tomographic image after clipping setting and mask setting is given to each corresponding voxel, and the voxel image is create.

ステップS20においては、ボクセル画像作成手段30が、複数の断層画像のXs≦x≦XeかつYs≦y≦YeかつZs≦z≦Zeの領域に対応する各画素(x,y,z)における信号値を取得する。複数(Sz)枚の断層画像における全ての画素に対して、この処理を行うことにより、複数枚の断層画像に対応した三次元のボクセル画像V(x,y,z)が得られる。本実施形態では、DICOM形式の断層画像群Do(x,y,z)の信号値をそのままボクセル値として与えているため、ボクセル画像V(x,y,z)の各画素は、1画素が16ビットで記録され、−32768〜32767の値をとる。このボクセル画像は、不揮発性の記憶装置3に記憶する必要はなく、RAM2上に一時的に作成すればよい。   In step S20, the voxel image creating means 30 outputs the signal at each pixel (x, y, z) corresponding to the region of Xs ≦ x ≦ Xe, Ys ≦ y ≦ Ye and Zs ≦ z ≦ Ze of the plurality of tomographic images. Get the value. By performing this process on all the pixels in the plurality of (Sz) tomographic images, a three-dimensional voxel image V (x, y, z) corresponding to the plurality of tomographic images is obtained. In the present embodiment, the signal value of the DICOM format tomographic image group Do (x, y, z) is given as a voxel value as it is, so that each pixel of the voxel image V (x, y, z) has one pixel. It is recorded in 16 bits and takes values from -32768 to 32767. This voxel image does not need to be stored in the non-volatile storage device 3 and may be created temporarily in the RAM 2.

次に、2次元投影画像生成手段70がMIP画像の生成を行う(ステップS70)。モノクロの2次元投影画像であるMIP画像は、視線方向を通過する各画素の信号値を基に算出された代表信号値で構成される。図5は、MIP画像生成の詳細を示すフローチャートである。まず、生成するMIP画像のサイズ(画素数)の設定を行う(ステップS510)。レンダリング像であるMIP画像は、2次元投影画像であるため、サイズとしては、x座標のサイズとy座標のサイズが設定され、断層画像のサイズと同一に設定されることが多いが、任意に設定することができる。本実施形態では、x座標のサイズとy座標のサイズを同一とし、Sizeとしている。   Next, the two-dimensional projection image generation means 70 generates a MIP image (step S70). The MIP image, which is a monochrome two-dimensional projected image, is composed of representative signal values calculated based on the signal values of each pixel passing through the line of sight. FIG. 5 is a flowchart showing details of MIP image generation. First, the size (the number of pixels) of the MIP image to be generated is set (step S510). Since the MIP image, which is a rendering image, is a two-dimensional projection image, the size is set to the size of the x coordinate and the size of the y coordinate, and is often set to be the same as the size of the tomographic image. Can be set. In the present embodiment, the size of the x coordinate and the size of the y coordinate are the same, and are set to Size.

次に、生成する座標変換パラメータの設定を行う(ステップS520)。2次元投影画像生成手段70は、以後のステップにおいて座標変換を実施する際に共通に用いるパラメータである座標変換パラメータを設定する。座標変換パラメータの設定は、ボクセルに対して仮想光を照射する際、ボクセル単位に逐次座標変換処理を円滑に行うことができるようにするために、視点を基準とする視点座標系における3次元座標を基にボクセル画像が定義されているボクセル座標系の3次元座標に変換し、ボクセル座標系において対応するボクセルの信号値を取得するための処理である。   Next, the generated coordinate conversion parameters are set (step S520). The two-dimensional projection image generation unit 70 sets a coordinate conversion parameter that is a parameter commonly used when performing coordinate conversion in the subsequent steps. The setting of the coordinate conversion parameters is such that, when irradiating the voxel with virtual light, the three-dimensional coordinates in the viewpoint coordinate system based on the viewpoint are set so that the coordinate conversion processing can be smoothly performed sequentially for each voxel. Is a process for converting the voxel image into three-dimensional coordinates in a voxel coordinate system in which a voxel image is defined, and obtaining a signal value of a corresponding voxel in the voxel coordinate system.

ここで、座標変換の概念図と座標変換パラメータの具体例については説明する。図6は、座標変換の概念図である。レンダリングにより得られるMIP画像は視点から見た画像であるので、MIP画像の各画素(x,y)の基準となる視点座標系は必ずしもボクセル座標系とは一致していない。そこで2次元投影画像生成手段70は、ボクセル座標系に定義されているボクセル画像を視点座標系に変換する必要がある。すなわち、本来は、図6(a)に示すように、投影面の各点からボクセル画像に対して任意の方向に仮想光線(レイ)を発射し、仮想光線が交差するボクセル画像内の指定範囲における信号値を複数抽出し、抽出された複数のボクセルの信号値を基に単一の代表信号値(最大値・最小値・平均値)を算出する。しかし、計算を簡単にするため、ボクセル画像に座標変換を施し、図6(b)に示すように、投影面の各点よりz軸負方向に指定範囲における代表信号値(最大値・最小値・平均値)を算出する。   Here, a conceptual diagram of coordinate conversion and a specific example of coordinate conversion parameters will be described. FIG. 6 is a conceptual diagram of the coordinate conversion. Since the MIP image obtained by rendering is an image viewed from the viewpoint, the viewpoint coordinate system serving as a reference for each pixel (x, y) of the MIP image does not always match the voxel coordinate system. Therefore, the two-dimensional projection image generation means 70 needs to convert the voxel image defined in the voxel coordinate system into the viewpoint coordinate system. That is, as shown in FIG. 6 (a), a virtual ray (ray) is originally emitted from each point on the projection plane to the voxel image in an arbitrary direction, and a designated range in the voxel image where the virtual rays intersect is designated. Are extracted, and a single representative signal value (maximum value, minimum value, average value) is calculated based on the extracted signal values of the plurality of voxels. However, in order to simplify the calculation, the voxel image is subjected to coordinate transformation, and as shown in FIG. 6B, representative signal values (maximum value / minimum value・ Average value is calculated.

座標変換を実施する際には、様々な座標変換パラメータを用いる。視点座標系とボクセル座標系の位置関係が同じであれば、座標変換パラメータも同じであると考えられる。即ち、2次元投影画像生成手段70において、視点座標系で参照される全てのボクセルに対して、ボクセル座標系に座標変換を実施するための座標変換パラメータは同一である。そこで2次元投影画像生成手段70は、ステップS520において座標変換パラメータをあらかじめ算出し、以後のステップにおいてはその座標変換パラメータを共通の座標変換パラメータとして流用する。座標変換パラメータとしては例えば以下のようなものが挙げられる。   When performing the coordinate conversion, various coordinate conversion parameters are used. If the positional relationship between the viewpoint coordinate system and the voxel coordinate system is the same, it is considered that the coordinate conversion parameters are also the same. That is, in the two-dimensional projection image generating means 70, the coordinate conversion parameters for performing the coordinate conversion to the voxel coordinate system for all the voxels referenced in the viewpoint coordinate system are the same. Therefore, the two-dimensional projection image generating means 70 previously calculates the coordinate conversion parameters in step S520, and uses the coordinate conversion parameters as common coordinate conversion parameters in the subsequent steps. The following are examples of the coordinate conversion parameters.

・所定の3次元座標系における回転を定義した3×3行列(逆方向に投影変換が行われるため、指示入力I/F4により指示され定義された3×3行列の逆行列)
・xyz軸方向のオフセット値:Xoff、Yoff、Zoff(単位:ボクセル)
・拡大又は縮小倍率:Scale(xyz各軸について同じ値を用いる。)
・z軸方向変倍率:Scz=Rxy/Rz(xy軸方向の解像度Rxyとz軸方向の解像度Rzの間の比率)
・仮想光線のサブサンプリング倍率:Sray(通常は1以上の整数、値が大きいと粗くなる、1未満の実数も指定可)
A 3 × 3 matrix defining rotation in a predetermined three-dimensional coordinate system (an inverse matrix of the 3 × 3 matrix specified and defined by the instruction input I / F 4 because projection transformation is performed in the reverse direction)
-Offset value in xyz axis direction: Xoff, Yoff, Zoff (unit: voxel)
Enlargement or reduction magnification: Scale (the same value is used for each axis of xyz)
• z-axis direction scaling factor: Scz = Rxy / Rz (ratio between resolution Rxy in xy-axis direction and resolution Rz in z-axis direction)
Sub-sampling magnification of the virtual ray: Sray (usually an integer of 1 or more, a larger value makes it coarser, and a real number less than 1 can also be specified)

MIP画像のサイズと、座標変換パラメータが設定されたら、設定されたサイズと座標変換パラメータに基づいて、MIP画像の生成を行う。MIP画像の生成は、設定されたサイズにより定まる生成領域を複数に分割し、得られた各分割生成領域について並行して処理を行って分割画像を生成することにより行う。まず、2次元投影画像生成手段70は、並列処理を行うための分割する分割生成領域を初期設定する(ステップS530)。本実施形態では、x座標については分割せず、y座標についてN個に分割する。具体的には、各分割生成領域のy座標の先頭座標をY1、末尾座標をY2とし、先頭座標Y1、末尾座標Y2に、設定されたサイズで特定される全体のMIP画像の分割生成領域を割り当てていく。初期値として、Y1=0、Y2=Size/N−1が設定される。   After the size of the MIP image and the coordinate conversion parameters are set, an MIP image is generated based on the set size and the coordinate conversion parameters. The generation of the MIP image is performed by dividing the generation area determined by the set size into a plurality of parts, and processing the obtained divided generation areas in parallel to generate a divided image. First, the two-dimensional projection image generation unit 70 initially sets a divided generation area to be divided for performing parallel processing (step S530). In the present embodiment, the x coordinate is not divided but the y coordinate is divided into N pieces. Specifically, the start coordinate of the y coordinate of each divided generation area is Y1, the end coordinate is Y2, and the start coordinate Y1 and the end coordinate Y2 are the divided generation areas of the entire MIP image specified by the set size. Assign. As initial values, Y1 = 0 and Y2 = Size / N−1 are set.

分割生成領域が設定されたら、次に、MIP画像の分割画像の生成処理を行う(ステップS540)。上述のように、MIP画像は、y座標においてのみN個に分割されているため、分割画像のx座標の画素数はSizeであり、分割画像のy座標の画素数は(Y2−Y1+1)となる。したがって、ステップS540においては、Size×(Y2−Y1+1)画素の分割画像を生成することになる。このステップS540の処理については後述する。   After the division generation area is set, the generation processing of the division image of the MIP image is performed (step S540). As described above, since the MIP image is divided into N only at the y coordinate, the number of pixels at the x coordinate of the divided image is Size, and the number of pixels at the y coordinate of the divided image is (Y2−Y1 + 1). Become. Therefore, in step S540, a divided image of Size × (Y2-Y1 + 1) pixels is generated. The processing in step S540 will be described later.

ステップS540の処理は、複数のCPUコアにより並行して行われる。このため、最初の分割範囲について分割画像の生成処理を1つのCPUコアに割り当てて実行処理を起動したら、処理終了を待たずに次の分割生成領域を設定および生成処理の起動を進める(ステップS550)。具体的には、Y1、Y2の値をそれぞれSize/Nだけ増加し、次の分割生成領域におけるy座標の先頭座標Y1、末尾座標Y2を新たに設定する。   The process of step S540 is performed by a plurality of CPU cores in parallel. For this reason, if the generation processing of the divided image is allocated to one CPU core for the first divided range and the execution processing is started, the next divided generation area is set and the start of the generation processing is advanced without waiting for the end of the processing (step S550). ). Specifically, the values of Y1 and Y2 are each increased by Size / N, and the start coordinate Y1 and the end coordinate Y2 of the y coordinate in the next divided generation area are newly set.

ステップS550において新たな分割生成領域を設定した後、新たな分割生成領域がMIP画像全体のサイズを超えている場合、すなわち、ここでは、Y2>Size−1を満たす場合は、全ての分割生成領域について設定および分割画像生成の処理の起動を終えたとして、図5に示すステップS70の処理を終了する。ただし、この段階ではステップS540における個々の分割画像生成の処理が終了している訳ではない。ステップS550において新たな分割生成領域を設定した後、新たな分割生成領域がMIP画像のサイズを超えていない場合、すなわち、ここでは、Y2≦Size−1を満たす場合は、全ての分割生成領域について処理を終えていないため、ステップS540に戻って、他のCPUコアに割り当て、分割画像の生成を起動する処理を繰り替えす。   After the new divided generation area is set in step S550, if the new divided generation area exceeds the size of the entire MIP image, that is, if Y2> Size-1 is satisfied, all divided generation areas are set. Assuming that the setting and the start of the divided image generation process have been completed, the process of step S70 shown in FIG. 5 is terminated. However, at this stage, the processing of generating the individual divided images in step S540 has not been completed. After setting the new divided generation area in step S550, if the new divided generation area does not exceed the size of the MIP image, that is, if Y2 ≦ Size-1 is satisfied, all the divided generation areas are set. Since the process has not been completed, the process returns to step S540, and the process of allocating to another CPU core and starting generation of the divided image is repeated.

ステップS540の処理について説明する。図7は、図5のステップS540における分割画像生成処理を示すフローチャートである。上述のように、分割画像生成処理においては、x軸方向については、画素数Sizeの全範囲、y軸方向については、先頭座標Y1、末尾座標Y2までの範囲で処理が行われる。まず、生成する分割画像の各画素の初期値を全て0とする(Image(x,y)=0)。また、代表信号値算出モードmode (0:MIP, 1:MinIP, 2:RaySum)を設定する。そして、各2次元座標(x,y)(0≦x≦Size−1,Y1≦y≦Y2)に対して図7のフローチャートに従った処理を実行する。   The process in step S540 will be described. FIG. 7 is a flowchart showing the divided image generation processing in step S540 of FIG. As described above, in the divided image generation processing, the processing is performed in the entire range of the number of pixels Size in the x-axis direction, and in the range from the start coordinate Y1 to the end coordinate Y2 in the y-axis direction. First, all the initial values of each pixel of the generated divided image are set to 0 (Image (x, y) = 0). Also, a representative signal value calculation mode mode (0: MIP, 1: MinIP, 2: RaySum) is set. Then, the process according to the flowchart of FIG. 7 is performed on each of the two-dimensional coordinates (x, y) (0 ≦ x ≦ Size−1, Y1 ≦ y ≦ Y2).

まず、処理対象とする画素の初期設定を行う(ステップS610)。最初は、x座標、y座標の値がともに最小であるy=Y1、x=0を処理対象の画素とする。次に、処理対象とされた画素に与えるべき代表信号値Vmの算出を行う(ステップS620)。このステップS620の処理については後述する。   First, initial setting of a pixel to be processed is performed (step S610). Initially, the pixel to be processed is set to y = Y1, x = 0 where the values of the x coordinate and the y coordinate are both minimum. Next, a representative signal value Vm to be given to the pixel to be processed is calculated (step S620). The processing in step S620 will be described later.

ステップS620における処理により、代表信号値Vmが算出されたら、処理対象の画素(x,y)の値として代表信号値Vmを与えて記録する。具体的には、Image(x,y)=Vmとする処理を行う(ステップS630)。処理対象とする画素に対応する代表信号値を記録したら、処理対象の画素を変更する。具体的には、x座標の値を1だけインクリメントする(ステップS640)。ステップS640において処理対象の画素を変更した結果、処理対象の画素がx座標のサイズ内である場合、すなわち、ここでは、x<Sizeを満たす場合は、ステップS620に戻って代表信号値Vmの算出を行う。ステップS640において処理対象の画素を変更した結果、処理対象の画素がx座標のサイズを超える場合、すなわち、ここでは、x≧Sizeを満たす場合は、y座標の値を1だけインクリメントする(ステップS650)。ステップS650において処理対象の画素を変更した結果、処理対象の画素がy座標のサイズ内である場合、すなわち、ここでは、y≦Y2を満たす場合は、ステップS620に戻って代表信号値Vmの算出を行う。ステップS650において処理対象の画素を変更した結果、処理対象の画素がy座標のサイズを超える場合、すなわち、ここでは、y>Y2を満たす場合は、割り当てられた分割範囲について処理を終えたとして、図7に示すステップS540の処理を終了する。   When the representative signal value Vm is calculated by the processing in step S620, the representative signal value Vm is given and recorded as the value of the pixel (x, y) to be processed. Specifically, a process for setting Image (x, y) = Vm is performed (step S630). After recording the representative signal value corresponding to the pixel to be processed, the pixel to be processed is changed. Specifically, the value of the x coordinate is incremented by 1 (step S640). As a result of changing the pixel to be processed in step S640, if the pixel to be processed is within the x-coordinate size, that is, if x <Size is satisfied here, the process returns to step S620 to calculate the representative signal value Vm. I do. As a result of changing the pixel to be processed in step S640, if the pixel to be processed exceeds the size of the x coordinate, that is, if x ≧ Size is satisfied here, the value of the y coordinate is incremented by 1 (step S650). ). As a result of changing the pixel to be processed in step S650, if the pixel to be processed is within the size of the y coordinate, that is, if y ≦ Y2 is satisfied, the process returns to step S620 to calculate the representative signal value Vm. I do. As a result of changing the pixel to be processed in step S650, if the pixel to be processed exceeds the size of the y coordinate, that is, if y> Y2 is satisfied, it is assumed that the processing has been completed for the assigned divided range. The process of step S540 shown in FIG. 7 ends.

次に、図7のステップS620の処理について詳細に説明する。図8は、図7のステップS620における代表信号値Vmの算出処理を示すフローチャートである。まず、変数の初期化を行う(ステップS710)。具体的には、代表信号値Vm、カウンタCnt、Zsの初期化を行う。Zsは、Zs=Size/Sray−1として初期値が算出される。代表信号値Vmは、モードにより異なる。3種類のモードのうち、mode=0の場合Vm=−32768、mode=1の場合Vm=32767、mode=2の場合Vm=0として初期化される。カウンタCntは、mode=2の場合のみ使用され、Cnt=0として初期化される。   Next, the process of step S620 in FIG. 7 will be described in detail. FIG. 8 is a flowchart showing the process of calculating the representative signal value Vm in step S620 of FIG. First, variables are initialized (step S710). Specifically, the representative signal value Vm, counters Cnt, and Zs are initialized. The initial value of Zs is calculated as Zs = Size / Sray-1. The representative signal value Vm differs depending on the mode. Of the three types of modes, Vm = −32768 when mode = 0, Vm = 32767 when mode = 1, and Vm = 0 when mode = 2. The counter Cnt is used only when mode = 2, and is initialized as Cnt = 0.

次に、起点座標の探索を行う(ステップS720)。ステップS720の処理については、図9を用いて説明する。図9は、起点座標探索手段77が各画素において起点座標を探索する処理を示すフローチャートである。起点座標探索手段77は、各対象画素(x,y)について図9に示したフローチャートに従った処理を実行する。   Next, a search for starting point coordinates is performed (step S720). The processing in step S720 will be described with reference to FIG. FIG. 9 is a flowchart showing a process in which the starting point coordinate searching means 77 searches for starting point coordinates in each pixel. The starting point coordinate search unit 77 executes a process according to the flowchart shown in FIG. 9 for each target pixel (x, y).

起点座標探索手段77は、起点座標を探索する対象画素(x,y)、視点座標系の3次元座標(x,y,z)をセットする(ステップS301)。探索開始座標であるz座標の初期値はz=Zs(上限値)とする。z座標の下限値は0、上限値はZsである。上限値であるZsは視点のz座標である。   The starting point coordinate search means 77 sets a target pixel (x, y) for searching for starting point coordinates and three-dimensional coordinates (x, y, z) of a viewpoint coordinate system (step S301). The initial value of the z coordinate which is the search start coordinate is z = Zs (upper limit). The lower limit of the z coordinate is 0, and the upper limit is Zs. The upper limit value Zs is the z coordinate of the viewpoint.

起点座標探索手段77は、3次元座標(x,y,z)について、座標変換を実施して対応するボクセル画像のボクセルの信号値Vsを算出する(ステップS302)。座標変換は、視点座標系をボクセル座標系に変換する操作であり、GUI側の変換操作とは逆になる。GUI側ではROIによるクリッピング、スケーリング、z軸方向変倍処理、回転、オフセット(xyz軸方向同時)の順に行うものと仮定し、与えられた視点座標系の3次元座標(x,y,z)(整数値)に対応するDICOM形式の複数の断層画像Do(x,y,z)の各画素に1対1で対応するボクセル画像のボクセルに対応する実数の座標(xr,yr,zr)を算出する。   The origin coordinate search means 77 performs coordinate transformation on the three-dimensional coordinates (x, y, z) to calculate a signal value Vs of a voxel of a corresponding voxel image (step S302). The coordinate conversion is an operation for converting the viewpoint coordinate system to the voxel coordinate system, and is the reverse of the conversion operation on the GUI side. On the GUI side, it is assumed that clipping by ROI, scaling, scaling processing in the z-axis direction, rotation, and offset (simultaneous in the xyz-axis directions) are performed in this order, and the three-dimensional coordinates (x, y, z) of the given viewpoint coordinate system The coordinates (xr, yr, zr) of the real number corresponding to the voxel of the voxel image corresponding to each pixel of the plurality of tomographic images Do (x, y, z) of the DICOM format corresponding to (integer value) on a one-to-one basis. calculate.

具体的には、まず、整数値である視点座標系の3次元座標(x,y,z)を実数値(xx,yy,zz)に変換する。視点座標系は、Size×Size×Size/Srayの直方体であり、Sx×Sy×Szのボクセル構造体とは独立して定義される。DICOM形式の断層画像のサイズSx×Syは、通常Sx=Sy=512であるため、Size=512とすることが多い。   Specifically, first, the three-dimensional coordinates (x, y, z) of the viewpoint coordinate system, which are integer values, are converted into real values (xx, yy, zz). The viewpoint coordinate system is a rectangular parallelepiped of Size × Size × Size / Sray, and is defined independently of the voxel structure of Sx × Sy × Sz. Since the size Sx × Sy of the tomographic image in the DICOM format is usually Sx = Sy = 512, it is often set to Size = 512.

視点座標系のz軸方向は仮想光線サブサンプル(1/Sray)倍(Sray>1)に縮小されていることを考慮して、最初に、以下の〔数式1〕に従った処理を実行してxyz軸方向同時にオフセット処理を行う。   Considering that the z-axis direction of the viewpoint coordinate system is reduced to the virtual ray subsample (1 / Sray) times (Sray> 1), first, processing according to the following [Equation 1] is executed. Offset processing is performed simultaneously in the xyz-axis direction.

〔数式1〕
xx=x−Size/2+Xoff
yy=y−Size/2+Yoff
zz=z・Sray−Size/2+Zoff
[Formula 1]
xx = x-Size / 2 + Xoff
yy = y-Size / 2 + Yoff
zz = zSray-Size / 2 + Zoff

続いて、生成された3×3回転逆行列を用いて、以下の〔数式2〕に従った処理を実行して回転処理を行う。   Subsequently, using the generated 3 × 3 rotation inverse matrix, a process according to the following [Equation 2] is executed to perform a rotation process.

〔数式2〕
xx´=R11・xx+R12・yy+R13・zz
yy´=R21・xx+R22・yy+R23・zz
zz´=R31・xx+R32・yy+R33・zz
[Equation 2]
xx ′ = R11 · xx + R12 · yy + R13 · zz
yy '= R21 · xx + R22 · yy + R23 · zz
zz ′ = R31 · xx + R32 · yy + R33 · zz

回転処理後の座標として(xx´,yy´,zz´)が得られる。続いて、以下の〔数式3〕に従った処理を実行して、スケーリング、z軸方向変倍処理を同時に行う。   (Xx ', yy', zz ') are obtained as the coordinates after the rotation processing. Subsequently, processing according to the following [Equation 3] is executed, and scaling and scaling processing in the z-axis direction are simultaneously performed.

〔数式3〕
xr=xx/Scale+Sx/2
yr=yy/Scale+Sy/2
zr=zz/(Scale・Scz)+Sz/2
[Equation 3]
xr = xx / Scale + Sx / 2
yr = yy / Scale + Sy / 2
zr = zz / (Scale · Scz) + Sz / 2

このようにしてボクセル座標系の座標(xr,yr,zr)が算出される。この座標(xr,yr,zr)は実数値である。次に、起点座標探索手段77は、算出されたボクセル座標系の座標(xr,yr,zr)を整数値化する。具体的には、以下の〔数式4〕に従った処理を実行して、整数値化を行う。   Thus, the coordinates (xr, yr, zr) of the voxel coordinate system are calculated. These coordinates (xr, yr, zr) are real values. Next, the starting point coordinate search means 77 converts the calculated coordinates (xr, yr, zr) of the voxel coordinate system into integer values. Specifically, a process according to the following [Equation 4] is executed to convert the value into an integer.

〔数式4〕
xi=INT[xr+0.5]
yi=INT[yr+0.5]
zi=INT[zr+0.5]
[Equation 4]
xi = INT [xr + 0.5]
yi = INT [yr + 0.5]
zi = INT [zr + 0.5]

〔数式4〕において、INTは[]内の数値の小数点以下を切り捨てて整数化することを意味する。したがって、〔数式4〕に従った処理により、実数値の座標(xr,yr,zr)の各値は、四捨五入されて、整数値の座標(xi,yi,zi)が得られる。   In [Equation 4], INT means that the value in [] is rounded down to the nearest integer to convert it into an integer. Therefore, by the processing according to [Equation 4], the values of the coordinates (xr, yr, zr) of the real value are rounded off to obtain the coordinates (xi, yi, zi) of the integer value.

このようにして、視点座標系の座標(x,y,z)に対応するボクセル座標系の座標(xi,yi,zi)が得られたら、ROIおよびマスクデータMaskを用いて、以下の〔数式5〕に従った処理を実行して、ボクセル座標系の座標(xi,yi,zi)に対応するボクセル信号値Vsを求める。   When the coordinates (xi, yi, zi) of the voxel coordinate system corresponding to the coordinates (x, y, z) of the viewpoint coordinate system are obtained in this way, the following [Equation [Math. 5] to obtain a voxel signal value Vs corresponding to the coordinates (xi, yi, zi) of the voxel coordinate system.

〔数式5〕
Mask(xi,yi,zi)=0(マスクされる箇所)、または、xi<Xsまたはxi>Xeまたはyi<Ysまたはyi>Yeまたはzi<Zsまたはzi>Ze(ROIの外)の場合(すなわち有効領域でない場合):Vs=−99999(無効値)
上記以外の場合(すなわち有効領域である場合):Vs=V(xi,yi,zi)
[Equation 5]
Mask (xi, yi, zi) = 0 (the place to be masked), or xi <Xs or xi> Xe or yi <Ys or yi> Ye or zi <Zs or zi> Ze (outside the ROI) ( That is, when the area is not an effective area): Vs = −99999 (invalid value)
In cases other than the above (that is, in the case of an effective area): Vs = V (xi, yi, zi)

〔数式5〕において、マスクされる箇所、またはROIの外である場合は、Vsに−99999を設定しているが、信号値が有効範囲の外であって無効であることを示すことができる値であれば、どのような値であってもよい。   In [Equation 5], if it is outside the masked portion or ROI, -99999 is set to Vs, but it can be shown that the signal value is out of the valid range and invalid. Any value may be used as long as it is a value.

ここで、有効領域とは、マスクデータによりマスクされておらず(Mask(xi,yi,zi)=1)、かつROI内である領域を示している。すなわち、ROIクリッピング、マスク設定のいずれにおいても、表示すべき領域として設定された領域が有効領域となる。また、有効範囲とは、画素がとり得る信号値の範囲であり、16ビットの場合、−32768〜32767が有効範囲となる。上記〔数式5〕では、変換後の座標が有効領域でない場合、有効範囲外の値を無効値として設定している。   Here, the effective area indicates an area that is not masked by the mask data (Mask (xi, yi, zi) = 1) and is within the ROI. That is, in both the ROI clipping and the mask setting, the area set as the area to be displayed is the effective area. The effective range is a range of signal values that the pixel can take, and in the case of 16 bits, the effective range is −32768 to 32767. In the above [Equation 5], if the converted coordinates are not in the valid area, values outside the valid range are set as invalid values.

Vsが−32768より小さければステップS303へ進み、Vsが−32768以上であればステップS305へ進む。この“−32768”は、ボクセルの16ビットの信号値がとり得る下限値である。すなわち、Vsが無効値であればステップS303へ進み、Vsが有効値であればステップS305へ進む。   If Vs is smaller than −32768, the process proceeds to step S303. If Vs is −32768 or more, the process proceeds to step S305. This “−32768” is a lower limit value that a 16-bit voxel signal value can take. That is, if Vs is an invalid value, the process proceeds to step S303, and if Vs is a valid value, the process proceeds to step S305.

ステップS303において、起点座標探索手段77は、z軸方向に所定個数のボクセルをスキップする。具体的には現在のz座標から所定数m2(例えばm2=8)を減算する。なお、ステップS740、S760で用いられる所定数m1と比較すると、m2>m1である。本実施形態ではm1=1である。減算した結果、z座標が0以上である場合はステップS302へ戻って同様の処理を繰り返す。z座標が0未満になった場合は、ステップS304へ進む。   In step S303, the starting point coordinate search means 77 skips a predetermined number of voxels in the z-axis direction. Specifically, a predetermined number m2 (for example, m2 = 8) is subtracted from the current z coordinate. Note that m2> m1 as compared with the predetermined number m1 used in steps S740 and S760. In the present embodiment, m1 = 1. As a result of the subtraction, if the z coordinate is 0 or more, the process returns to step S302 to repeat the same processing. If the z coordinate has become less than 0, the process proceeds to step S304.

ステップS304において、起点座標探索手段77は、現在の対象画素(x,y)に対応するz座標に対して、起点座標が見つからなかった旨を示す値(zの本来の下限値が0である場合、例えば−1などの負値)をセットして起点座標の探索処理を終了する。   In step S304, the starting point coordinate searching unit 77 determines that the starting point coordinates have not been found for the z coordinate corresponding to the current target pixel (x, y) (the original lower limit value of z is 0). In this case, for example, a negative value such as -1 is set, and the search processing of the starting point coordinates is ended.

ステップS305に進んだ場合、起点座標探索手段77は、変数iを初期化した後(ステップS305)、m1だけ加算する(ステップS306)。iがm2まで到達した場合、または現在のz座標にiを加算すると視点z座標である上限値Zsに達する場合は、ステップS308に進み、z座標に対して、現在のz座標にm1を加算する前のiを加算した値をセットする。iがm2まで到達しておらず、かつ現在のz座標にiを加算しても視点z座標である上限値Zsまで達しない場合は、ステップS307へ進む。   When the process proceeds to step S305, the starting point coordinate search means 77 initializes the variable i (step S305), and then adds m1 (step S306). If i has reached m2, or if i has been added to the current z-coordinate to reach the upper limit Zs, which is the viewpoint z-coordinate, the flow advances to step S308 to add m1 to the current z-coordinate for the z-coordinate. Is set to the value obtained by adding i before the execution. If i has not reached m2, and even if i is added to the current z coordinate, it does not reach the upper limit Zs, which is the viewpoint z coordinate, the process proceeds to step S307.

ステップS307において、起点座標探索手段77は、3次元座標(x,y,z+i)について、座標変換を実施して対応するボクセルの信号値Vsを算出する。算出手順はステップS302と同じである。Vsが−32768以上であればステップS306へ戻ってiにm1を加算して同様の処理を繰り返す。Vsが−32768より小さければステップS308へ進む。   In step S307, the starting point coordinate search unit 77 performs coordinate conversion on the three-dimensional coordinates (x, y, z + i) to calculate the corresponding voxel signal value Vs. The calculation procedure is the same as step S302. If Vs is equal to or larger than -32768, the process returns to step S306, and m1 is added to i, and the same processing is repeated. If Vs is smaller than -32768, the process proceeds to step S308.

ステップS308において、起点座標探索手段77は、現在の対象画素(x,y)に対応して、ステップS307の1つ手前のz座標(z+i−m1)をセットして起点座標の探索を終了する。   In step S308, the starting point coordinate search unit 77 sets the z coordinate (z + i-m1) immediately before step S307 corresponding to the current target pixel (x, y), and ends the search for the starting point coordinates. .

結局、起点座標探索手段77は、図9に示した処理に従い、z座標を所定の上限値より所定の下限値の範囲で前記所定数m1より大きい所定数m2(m2>m1)で減算させて、各3次元座標に対して、座標変換を行ってボクセルの信号値を算出し(S302)、所定数m2の減算後のz座標におけるボクセルの信号値が有効範囲に含まれる場合(S305)は、減算後のz座標より所定数m1を増加させて(S306)各3次元座標(x,y,z)に対して、座標変換を行ってボクセルの信号値を算出している(S307)。この処理は、MIPモードに限定されず、RaySumモードやMinIPモードにおいても利用可能であり、演算抑制の効果が得られる。   Eventually, the starting point coordinate search means 77 subtracts the z coordinate by a predetermined number m2 (m2> m1) larger than the predetermined number m1 in a range from a predetermined upper limit to a predetermined lower limit in accordance with the processing shown in FIG. For each three-dimensional coordinate, a coordinate conversion is performed to calculate a voxel signal value (S302). If the voxel signal value at the z coordinate after subtracting a predetermined number m2 is included in the effective range (S305), Then, a predetermined number m1 is increased from the z coordinate after the subtraction (S306), and coordinate conversion is performed on each three-dimensional coordinate (x, y, z) to calculate a voxel signal value (S307). This processing is not limited to the MIP mode, and can be used in the RaySum mode or the MinIP mode, and the effect of suppressing the calculation can be obtained.

図9に示した処理を実行して、起点座標zが探索されたら、図8に示すステップS720の処理を終えたことになる。得られた起点座標zがz<0である場合は、有効ボクセルが存在しなかったことを意味するので、ステップS770に進む。得られた起点座標zがz≧0である場合は、3次元座標(x,y,z+i)を座標変換してボクセル信号値Vsを取得する(ステップS730)。   When the process shown in FIG. 9 is executed and the starting point coordinate z is searched, the process of step S720 shown in FIG. 8 has been completed. If the obtained starting point coordinate z is z <0, it means that there is no valid voxel, and the process proceeds to step S770. If the obtained starting point coordinate z satisfies z ≧ 0, the three-dimensional coordinates (x, y, z + i) are subjected to coordinate conversion to obtain a voxel signal value Vs (step S730).

具体的には、ステップS302、S308における〔数式1〕〜〔数式3〕に従った処理を実行して、与えられた視点座標系の3次元座標(x,y,z)(整数値)に対応するDICOM形式の複数の断層画像Do(x,y,z)の各画素に1対1で対応するボクセル画像のボクセルに対応する実数の座標(xr,yr,zr)を算出する。   Specifically, the processing according to [Equation 1] to [Equation 3] in steps S302 and S308 is executed to convert the given three-dimensional coordinates (x, y, z) (integer value) of the viewpoint coordinate system. A real number coordinate (xr, yr, zr) corresponding to a voxel of a voxel image corresponding to each pixel of the corresponding plurality of tomographic images Do (x, y, z) in the DICOM format is calculated.

次に、算出されたボクセル座標系の座標(xr,yr,zr)を整数値化する。ステップS302、S308の処理とは異なり、まず、小数点以下を切り捨て整数化した座標を(xia,yia,zia)とし、切り捨てた小数点以下の端数を(wx,wy,wz)とする。すなわち、xr=xia+wx,yr=yia+wy,zr=zia+wzとなる。   Next, the calculated coordinates (xr, yr, zr) of the voxel coordinate system are converted into integer values. Different from the processing in steps S302 and S308, first, the coordinates obtained by rounding down the decimal point to an integer are set to (xia, yia, zia), and the fractions rounded down to the decimal point are set to (wx, wy, wz). That is, xr = xia + wx, yr = yia + wy, and zr = zia + wz.

次に、ROIおよびマスクデータMaskを用いて、以下の〔数式6〕に従った処理を実行して、ボクセル座標系の座標(xia,yia,zia)に対応するボクセル信号値Vsを求める。以下の〔数式6〕においては、3通りに分けて処理が行われる。   Next, using the ROI and the mask data Mask, a process according to the following [Equation 6] is executed, and a voxel signal value Vs corresponding to the coordinates (xia, yia, zia) of the voxel coordinate system is obtained. In the following [Equation 6], processing is performed in three ways.

〔数式6〕
1)Mask(xia,yia,zia)=0(マスクされる箇所)、または、xia<Xsまたはxia>Xeまたはyia<Ysまたはyia>Yeまたはzia<Zsまたはzia>Ze(ROI範囲外)の場合:Vs=−99999(無効値)
2)上記1)を満たさず、xia+1>Xeまたはyia+1>Yeまたはzia+1>Zeの場合、補間処理を実行せずにVs=V(xia,yia,zia)
3)上記1)2)を満たさない場合、以下の補間処理を実行
Vs=(1−wz)(1−wy)(1−wx)・V(xia,yia,zia)
+(1−wz)(1−wy)・wx・V(xia+1,yia,zia)
+(1−wz)・wy・(1−wx)・V(xia,yia+1,zia)
+(1−wz)・wy・wx・V(xia+1,yia+1,zia)
+wz・(1−wy)(1−wx)・V(xia,yia,zia+1)
+wz・(1−wy)・wx・V(xia+1,yia,zia+1)
+wz・wy・(1−wx)・V(xia,yia+1,zia+1)
+wz・wy・wx・V(xia+1,yia+1,zia+1)
[Equation 6]
1) Mask (xia, yia, zia) = 0 (the place to be masked) or xia <Xs or xia> Xe or yia <Ys or yia> Ye or zia <Zs or zia> Ze (outside the ROI range) Case: Vs = -99999 (invalid value)
2) If the above 1) is not satisfied and xia + 1> Xe or yia + 1> Ye or zia + 1> Ze, Vs = V (xia, yia, zia) without performing the interpolation process
3) When the above 1) and 2) are not satisfied, the following interpolation processing is executed. Vs = (1−wz) (1−wy) (1−wx) · V (xia, yia, zia)
+ (1-wz) (1-wy) · wx · V (xia + 1, yia, zia)
+ (1-wz) · wy · (1-wx) · V (xia, yia + 1, zia)
+ (1-wz) · wy · wx · V (xia + 1, yia + 1, zia)
+ Wz · (1-wy) (1-wx) · V (xia, yia, zia + 1)
+ Wz · (1-wy) · wx · V (xia + 1, yia, zia + 1)
+ Wz · wy · (1-wx) · V (xia, yia + 1, zia + 1)
+ Wz · wy · wx · V (xia + 1, yia + 1, zia + 1)

〔数式6〕の3)においては、補間処理を行う際に、実数値のボクセル座標(xr,yr,zr)の近傍に位置する整数値のボクセル座標(xia,yia,zia)等を8個取得し、この値を用いて、各信号値に所定の重みwx、wy、wz、(1−wx)、(1−wy)、(1−wz)を掛けながら加算した値を、3次元座標に対応するボクセルの信号値Vsとして与えている。〔数式6〕において、マスクされる箇所またはROIの外である場合、すなわち有効領域の外である場合は、Vsに−99999を設定しているが、無効であることを示すことができる値であれば、どのような値であってもよい。   In (3) of [Equation 6], when performing the interpolation process, eight integer-valued voxel coordinates (xia, yia, zia) and the like located near the real-valued voxel coordinates (xr, yr, zr) are used. Using this value, a value obtained by multiplying each signal value by a predetermined weight wx, wy, wz, (1-wx), (1-wy), (1-wz) is used as a three-dimensional coordinate. Is given as the signal value Vs of the voxel corresponding to. In [Equation 6], if it is outside the masked location or ROI, that is, if it is outside the effective area, Vs is set to -99999, but a value that can indicate that it is invalid is set to Vs. Any value may be used.

Vsが−32768より小さければステップS740へ進み、Vsが−32768以上であればステップS750へ進む。この“−32768”は、ボクセルの16ビットの信号値がとり得る下限値である。すなわち、Vsが無効値であればステップS740へ進み、Vsが有効値であればステップS750へ進む。   If Vs is smaller than −32768, the process proceeds to step S740, and if Vs is −32768 or more, the process proceeds to step S750. This “−32768” is a lower limit value that a 16-bit voxel signal value can take. That is, if Vs is an invalid value, the process proceeds to step S740, and if Vs is a valid value, the process proceeds to step S750.

ステップS740において、起点座標探索手段77は、視点の座標を所定数m1だけ減じる。この所定数m1は整数である。上述のように、本実施形態では、m1=1であり、m1<m2である。そして、ステップS720へ戻って同様の処理を繰り返す。   In step S740, the starting point coordinate search means 77 reduces the coordinates of the viewpoint by a predetermined number m1. This predetermined number m1 is an integer. As described above, in the present embodiment, m1 = 1 and m1 <m2. Then, the process returns to step S720 to repeat the same processing.

ステップS750において、起点座標探索手段77は、代表信号値Vmを設定する。ステップS750においては、設定されているモードにより処理が異なる。具体的には、以下の〔数式7〕に従った処理を実行して、代表信号値Vmを設定する。   In step S750, the starting point coordinate search means 77 sets the representative signal value Vm. In step S750, processing differs depending on the set mode. Specifically, a process according to the following [Equation 7] is executed to set the representative signal value Vm.

〔数式7〕
mode=0(MIPmode):Vs>VmならばVm=Vs
mode=1(MinIPmode):Vs<VmならばVm=Vs
mode=2(RaySummode):Vm←Vm+Vs,cnt←cnt+1
[Equation 7]
mode = 0 (MIPmode): If Vs> Vm, Vm = Vs
mode = 1 (MinIPmode): If Vs <Vm, Vm = Vs
mode = 2 (RaySummode): Vm ← Vm + Vs, cnt ← cnt + 1

代表信号値Vmが設定されたら、次に、zを所定数m1だけ減じる(ステップS760)。本実施形態では、m1=1であり、m1<m2である。そして、zが0以上であれば、ステップS730へ戻って同様の処理を繰り返す。zが0未満であれば、対象とするボクセルがなくなるので、ステップS770へ進む。〔数式1〕の第3式に示したように、ステップS302におけるオフセット処理の際、zは仮想光線のサブサンプリング倍率Srayと乗じられる。そのため、実質的には、z軸方向においては、所定の参照間隔(m1・Sray)ごとにボクセルが参照されてボクセル信号値Vsが取得されることになる。したがって、(m1・Sray)>1であれば、z軸方向に対しては、全てのボクセルを参照して処理するのではなく、間引いたボクセルを参照して処理を行うことになる。そのため、z軸方向に対して処理するボクセル数が少なくなり効率化が図られる。本実施形態では、m1=1であるため、Sray>1であることが好ましい。また、Sray≦1である場合は、(m1・Sray)>1となるような値になるようにm1を設定することが好ましい。参照間隔(m1・Sray)は、(m1・Sray)=1であってもよいが、(m1・Sray)≧2であることがより好ましい。   After the representative signal value Vm is set, z is reduced by a predetermined number m1 (step S760). In the present embodiment, m1 = 1 and m1 <m2. If z is equal to or greater than 0, the process returns to step S730 to repeat the same processing. If z is less than 0, there are no more voxels of interest, and the process proceeds to step S770. As shown in the third equation of [Equation 1], z is multiplied by the sub-sampling magnification Sray of the virtual ray at the time of the offset processing in step S302. Therefore, in the z-axis direction, the voxel is referenced at every predetermined reference interval (m1 · Sray), and the voxel signal value Vs is acquired. Therefore, if (m1 · Sray)> 1, in the z-axis direction, processing is performed not by referring to all voxels but by referring to thinned voxels. Therefore, the number of voxels to be processed in the z-axis direction is reduced, and efficiency is improved. In this embodiment, since m1 = 1, it is preferable that Sray> 1. When Sray ≦ 1, it is preferable to set m1 such that the value satisfies (m1 · Sray)> 1. The reference interval (m1 · Sray) may be (m1 · Sray) = 1, but more preferably (m1 · Sray) ≧ 2.

ステップS770、S780では、モードに応じた処理を行う。まず、ステップS770では、mode=2であるか否かを判定する。そして、mode=2でない場合、すなわち、mode=0または1である場合は、処理を終了する。mode=2である場合、Vmをcntで除算して、新たなVmを得る(ステップS780)。そして、処理を終了する。   In steps S770 and S780, processing according to the mode is performed. First, in step S770, it is determined whether or not mode = 2. If the mode is not mode = 2, that is, if the mode is 0 or 1, the process ends. If mode = 2, Vm is divided by cnt to obtain a new Vm (step S780). Then, the process ends.

以上のようにして代表信号値Vmを得る処理を、N個の各CPUが、図5に示したステップS540の処理を、N個に分割された各分割画像に対して実行し、得られた分割画像を統合することにより、設定されたSize×Sizeのモノクロの2次元投影画像であるMIP画像が生成される。なお、必ずしも設定されたSize×Sizeの2次元投影画像に統合する必要はなく、各分割画像を順次表示する場合には、分割画像の統合は行わない。   The process of obtaining the representative signal value Vm as described above is performed by the N CPUs executing the process of step S540 shown in FIG. 5 on each of the N divided images. By integrating the divided images, a MIP image, which is a set two-dimensional projected image of Size × Size, is generated. It is not always necessary to integrate the set two-dimensional projected images of Size × Size. When displaying the divided images sequentially, the divided images are not integrated.

MIP画像が生成されたら、次に、MIP画像の表示処理を行う。MIP画像の表示を行う表示機器は、1画素8ビットであることが多い。そのため、1画素16ビットで記録されたMIP画像を表示する場合は、表示部6のビット数に合わせるため、MIP画像の階調を落として表示処理を行う必要がある。具体的には、以下の〔数式8〕に従った処理を実行することにより、MIP画像の階調を8ビットに変換する。   After the generation of the MIP image, a process of displaying the MIP image is performed. Display devices that display MIP images often have 8 bits per pixel. Therefore, when displaying a MIP image recorded with 16 bits per pixel, it is necessary to perform display processing with the gradation of the MIP image reduced to match the bit number of the display unit 6. Specifically, by executing the processing according to the following [Equation 8], the gradation of the MIP image is converted to 8-bit.

〔数式8〕
Image´(x,y)=(Image(x,y)−Lmin)・255/(Lmax−Lmin)
Image´(x,y)>255の場合:Image´(x,y)=255、Image´(x,y)<0の場合:Image´(x,y)=0
[Equation 8]
Image ′ (x, y) = (Image (x, y) −Lmin) · 255 / (Lmax−Lmin)
If Image '(x, y)> 255: Image' (x, y) = 255, If Image '(x, y) <0: Image' (x, y) = 0

〔数式8〕の第2式に示すように、信号値が上限値Lmaxを超える場合は255、下限値Lminを下回る場合は0として、下限値Lminから上限値Lmaxの範囲を0から255に線形変換する。   As shown in the second expression of [Equation 8], when the signal value exceeds the upper limit value Lmax, 255, and when the signal value is lower than the lower limit value Lmin, it is set to 0, and the range from the lower limit value Lmin to the upper limit value Lmax is linearly changed from 0 to 255. Convert.

なお、〔数式8〕において用いる下限値Lminと上限値Lmax については、表示中にGUIを通じてユーザが任意に変更・調整できるようにしている。医療分野では、下限値Lminと上限値Lmax の代わりに、DICOM規格のWindow Width(ウィンドウ幅:WW)、Window Level(ウィンドウレベル:WL)を使用する習慣があるため、GUIもこれに基づいて設計される。WL=(Lmax+Lmin)/2, WW=Lmax −Lminで定義されていることから、WL、WWが与えられた場合、Lmax=WL+WW/2, Lmin=WL−WW/2と設定される。   The lower limit Lmin and upper limit Lmax used in [Equation 8] can be arbitrarily changed and adjusted by the user through the GUI during display. In the medical field, there is a custom to use a window width (window width: WW) and a window level (window level: WL) of the DICOM standard instead of the lower limit value Lmin and the upper limit value Lmax. Therefore, the GUI is also designed based on this. Is done. Since WL = (Lmax + Lmin) / 2 and WW = Lmax−Lmin, when WL and WW are given, Lmax = WL + WW / 2 and Lmin = WL−WW / 2 are set.

図10は、生成されたMIP画像の例を示す図である。いずれもROIとして、x:0-511, y:170-250 (0-511), z:0-369とした例を示しており、後述する8ビットに圧縮した階調圧縮断層画像に基づいて生成された8ビット階調のMIP画像である。図10(a)は、MIP(mode=0)のMIP画像、図10(b)は、MinIP(mode=1)のMIP画像、図10(c)は、RaySum(mode=2)のMIP画像を示している。図10(a)のMIP画像では、8ビット階調で50−180の範囲(16ビット階調換算では、Lmin=−406、Lmax=574、WL=84、WW=980)を256段階で表示する態様としている。図10(b)のMIP画像では、8ビット階調で0−120の範囲(16ビット階調換算では、Lmin=−784、Lmax=121、WL=―331、WW=905)を256段階で表示する態様としている。図10(c)のMIP画像では、8ビット階調で0−130の範囲(16ビット階調換算では、Lmin=−784、Lmax=196、WL=−294、WW=980)を256段階で表示する態様としている。   FIG. 10 is a diagram illustrating an example of the generated MIP image. Each shows an example in which the ROIs are x: 0-511, y: 170-250 (0-511), and z: 0-369, based on a gradation-compressed tomographic image compressed to 8 bits, which will be described later. It is a generated 8-bit gradation MIP image. 10A is a MIP image of MIP (mode = 0), FIG. 10B is a MIP image of MinIP (mode = 1), and FIG. 10C is a MIP image of RaySum (mode = 2) Is shown. In the MIP image of FIG. 10A, a range of 50 to 180 (8 min gradation: Lmin = −406, Lmax = 574, WL = 84, WW = 980) is displayed in 256 steps in 8 bit gradation. It is a mode to do. In the MIP image of FIG. 10B, the range of 0 to 120 in 8-bit gray scale (Lmin = −784, Lmax = 121, WL = −331, WW = 905 in 16-bit gray scale conversion) is set in 256 steps. This is a mode of displaying. In the MIP image of FIG. 10C, the range of 0 to 130 in the 8-bit gradation (Lmin = −784, Lmax = 196, WL = −294, WW = 980 in 16-bit gradation conversion) is set in 256 steps. This is a mode of displaying.

上述のように、本実施形態に係るレンダリング装置100では、2次元投影画像生成手段70が、マルチコアCPUであるCPU1が、プログラムを実行することにより実現される。このプログラムは、MIP画像の生成領域を複数に分割し、各コアに各分割生成領域を割り当てて、各コアがMIP画像の部分画像を生成する処理を並行して行う。レンダリング装置100を、汎用的なコンピュータであるパソコンで実現した場合について説明する。図11は、コンピュータによりレンダリング装置100を実現する場合の並列化処理を示す図である。図11に示すように、2次元投影画像生成手段70が、アプリケーションプログラムにより実現され、例えばN=4個にMIP画像を分割する場合、アプリケーションプログラムは、4個の各分割生成領域に対する処理を4つの処理スレッド♯n1〜処理スレッド♯n4に分割する。そして、2次元投影画像生成手段70(アプリケーションプログラム)が稼働するマルチタスク・オペレーティングシステムのジョブスケジューラが、複数のCPUコアが有するCPUスレッド#1〜CPUスレッド#8に割り当てる。   As described above, in the rendering apparatus 100 according to the present embodiment, the two-dimensional projection image generation unit 70 is realized by the CPU 1 that is a multi-core CPU executing a program. This program divides the MIP image generation region into a plurality of regions, allocates each divided generation region to each core, and performs processing in which each core generates a partial image of the MIP image in parallel. A case where the rendering apparatus 100 is realized by a personal computer which is a general-purpose computer will be described. FIG. 11 is a diagram illustrating a parallelization process when the rendering device 100 is implemented by a computer. As shown in FIG. 11, when the two-dimensional projection image generation unit 70 is realized by an application program, and divides the MIP image into N = 4, for example, the application program performs processing for each of the four divided generation regions by four. It is divided into two processing threads # n1 to # n4. Then, the job scheduler of the multitasking operating system on which the two-dimensional projection image generating means 70 (application program) operates allocates the threads to the CPU threads # 1 to # 8 of the plurality of CPU cores.

図12は、コンピュータによりレンダリング装置100を実現する場合の並列化処理のソフトウェアによる流れを示す図である。図12に示すように、2次元投影画像生成手段70を実現するアプリケーションプログラムは、4個の各分割生成領域に対する処理を4つの処理スレッド♯n1〜処理スレッド♯n4に分割した後、それぞれ並列処理関数を起動する。そうすると、マルチタスク・オペレーティングシステムのジョブスケジューラが、4つのスレッド♯n1〜スレッド♯n4を複数のCPUコアが有するCPUスレッド#3、CPUスレッド#5、CPUスレッド#7、CPUスレッド#2、にそれぞれ割り当てる。このようにして、オペレーティングシステムにより空いているCPUコアのCPUスレッドに、処理すべき処理スレッドが割り当てられるため、並列処理が可能となる。図12の例では、アプリケーションプログラムが各CPUスレッドからの終了メッセージを待ち、全てのCPUスレッドから終了メッセージが得られたら、生成された分割画像を統合した画像を生成し、一括して表示部6に出力し、表示を行う。4コア構成のCPU(Intel CORE-i7)が実装されているWindows10/64bitsのパーソナルコンピュータで実測した結果、図12の構成ではシングルスレッド実行時(512×512のフル解像度画像の生成時間:約1.6sec)の3倍弱程度の処理速度しか得られず(同生成時間:約0.6sec)、一部のCPUスレッドに処理待ちが生じていた。そこで、MIP画像生成処理の分割数をN=8に上げて、8処理スレッドで並列処理を行ったら、シングルスレッド実行時のほぼ4倍の処理性能が得られ(同生成時間:約0.4sec)、N>8に上げても処理性能は殆ど変化せず4倍で頭打ちであった。   FIG. 12 is a diagram illustrating a flow of software for parallel processing when the rendering apparatus 100 is implemented by a computer. As shown in FIG. 12, the application program for realizing the two-dimensional projection image generation unit 70 divides the processing for each of the four divided generation areas into four processing threads # n1 to # n4, and then executes the parallel processing. Invoke the function. Then, the job scheduler of the multitask operating system assigns four threads # n1 to # n4 to the CPU threads # 3, # 5, # 7, and # 2 of the plurality of CPU cores, respectively. assign. In this manner, the processing thread to be processed is allocated to the CPU thread of the CPU core that is free by the operating system, so that parallel processing is possible. In the example of FIG. 12, the application program waits for an end message from each CPU thread, and when the end messages are obtained from all the CPU threads, generates an integrated image of the generated divided images and collectively displays the display unit 6. And display it. As a result of actual measurement on a Windows 10 / 64-bit personal computer on which a 4-core CPU (Intel CORE-i7) is mounted, the configuration shown in FIG. 12 shows a single thread execution (generation time of a 512 × 512 full-resolution image: about 1.6). (Second), a processing speed of less than about three times (same generation time: about 0.6 sec) was obtained, and some CPU threads had to wait for processing. Therefore, if the number of divisions of the MIP image generation processing is increased to N = 8 and parallel processing is performed by eight processing threads, processing performance almost four times that of the single thread execution can be obtained (same generation time: about 0.4 sec). , N> 8, the processing performance hardly changed and reached 4 times.

図12に示した例は、全ての処理スレッドの終了を待って、生成された分割画像を統合して表示処理を開始する場合の例であるが、各処理スレッドの終了ごとに、分割画像を統合せずに表示処理を行う流れとすることもできる。図16は、各処理スレッドの終了ごとに表示処理を行う場合の並列化処理のソフトウェアによる流れを示す図である。図12に示した例と同様、2次元投影画像生成手段70を実現するアプリケーションプログラムは、4個の各分割生成領域に対する処理を4つの処理スレッド♯n1〜処理スレッド♯n4に分割した後、それぞれ並列処理関数を起動する。そうすると、マルチタスク・オペレーティングシステムのジョブスケジューラが、4つの処理スレッド♯n1〜処理スレッド♯n4を複数のCPUコアが有するCPUスレッド#3、CPUスレッド#5、CPUスレッド#7、CPUスレッド#2、にそれぞれ割り当てる。図16の例では、アプリケーションプログラムが各CPUスレッドからの終了メッセージを待ち、各CPUスレッドから終了メッセージが得られたら、生成された分割画像ごとに表示部6に出力し、表示を行う。   The example shown in FIG. 12 is an example in which display processing is started by integrating generated divided images after waiting for the end of all processing threads. A flow in which display processing is performed without integration may be adopted. FIG. 16 is a diagram showing a flow of software for parallel processing when display processing is performed every time each processing thread ends. As in the example shown in FIG. 12, the application program that implements the two-dimensional projection image generation unit 70 divides the processing for each of the four divided generation regions into four processing threads # n1 to # n4, Invokes a parallel processing function. Then, the job scheduler of the multitasking operating system executes the CPU thread # 3, the CPU thread # 5, the CPU thread # 7, and the CPU thread # 2 having four processing threads # n1 to # n4 of the plurality of CPU cores. Respectively. In the example of FIG. 16, the application program waits for an end message from each CPU thread, and when an end message is obtained from each CPU thread, outputs the divided image to the display unit 6 for each of the generated divided images for display.

<3.プログレッシブレンダリング>
次に、本実施形態に係るレンダリング装置を用いて、プログレッシブレンダリングを行う処理について説明する。図13は、プログレッシブレンダリングの処理手順を示すフローチャートである。まず、指示入力機器であるマウスボタンのプレス操作に基づいて、マウス座標およびxy回転角の初期設定を行う(ステップS810)。具体的には、所定の位置にマウス座標を設定し、xy回転角(x軸中心の回転角およびy軸中心の回転角、z軸中心の回転角は直接指定できないがxy回転操作を繰り返すことで変更可)を所定角度に設定し、3次元座標系における回転を定義した3×3行列を生成する。そして、生成された3×3行列に基づいて座標変換パラメータを設定し、x軸方向、y軸方向それぞれに1/4ずつ間引いてMIP画像を生成し、表示部6に表示出力する(ステップS820)。すなわち、x軸方向、y軸方向それぞれに1/4間引かれたMIP画像が初期画像として表示されることになる。ステップS820においては、図5のフローチャートに従った処理を実行して、MIP画像を生成する。ただし、全ての画素に対して実行するのではなく、x軸方向、y軸方向それぞれに1/4、全体としては1/16の画素に対して、レンダリングによる画素値の算出処理を行い。残りの15/16の画素に対しては、レンダリングにより得られた画素を補間することにより画素値を求める。図5のフローチャートに従った処理を実行する際には、ステップS810で初期設定されたxy回転角をステップS520において取得し、3次元座標系における回転を定義した3×3行列を生成した上で、座標変換パラメータを設定する。
<3. Progressive rendering>
Next, a process of performing progressive rendering using the rendering device according to the present embodiment will be described. FIG. 13 is a flowchart illustrating the processing procedure of the progressive rendering. First, initial settings of mouse coordinates and xy rotation angles are performed based on a press operation of a mouse button as an instruction input device (step S810). Specifically, mouse coordinates are set at predetermined positions, and the xy rotation angle (the rotation angle about the x axis, the rotation angle about the y axis, and the rotation angle about the z axis cannot be directly specified, but the xy rotation operation is repeated. Is set to a predetermined angle, and a 3 × 3 matrix defining rotation in a three-dimensional coordinate system is generated. Then, coordinate conversion parameters are set based on the generated 3 × 3 matrix, a MIP image is generated by thinning out 1/4 in each of the x-axis direction and the y-axis direction, and displayed on the display unit 6 (step S820). ). That is, MIP images thinned out by 1/4 in the x-axis direction and the y-axis direction are displayed as initial images. In step S820, a process according to the flowchart of FIG. 5 is executed to generate a MIP image. However, the pixel value calculation processing by rendering is not performed for all the pixels, but is performed for 1/4 pixels in the x-axis direction and the y-axis direction, and 1/16 pixels as a whole. For the remaining 15/16 pixels, pixel values are obtained by interpolating the pixels obtained by rendering. When the processing according to the flowchart of FIG. 5 is executed, the xy rotation angle initially set in step S810 is acquired in step S520, and a 3 × 3 matrix defining the rotation in the three-dimensional coordinate system is generated. , And set the coordinate conversion parameters.

マウスのドラッグ操作(ボタンを押しながら移動)が行われると、マウス座標の移動量に基づき、xy回転角の更新を行う(ステップS830)。具体的には、所定のタイミングでマウス移動が検知された場合、取得されたマウス座標の、前回取得されたマウス座標からの移動量を求め、x座標の移動量を基にy軸中心の回転角を更新し、y座標の移動量を基にx軸中心の回転角を更新する。そして、更新されたxy回転角に基づいて3×3行列を更新し、更新された3×3行列に基づいて座標変換パラメータを設定し、x軸方向、y軸方向それぞれに1/4ずつ間引いてMIP画像を生成し、表示部6に表示出力する(ステップS840)。この時、MIP画像の生成はフル解像度の生成時間(4コアCPUの場合、約0.4秒)の約1/16で実行されるため、マウスのドラッグ操作に追従して、間引き表示されているMIP画像がリアルタイムに更新されるため、利用者から見れば、マウスのドラッグ操作を行うことにより、アングル(回転角)の変更指示を行っていることになる。ステップS840における処理は、ステップS820と同様にして行われる。ステップS830、ステップS840の処理は、マウスボタンがプレスした状態で、ドラッグ操作が継続している間、繰り返し実行される。したがって、利用者がマウスを用いてドラッグ操作を続けている間、表示部6の画面には、x軸方向、y軸方向それぞれに1/4に間引きされたMIP画像が角度を変えながら表示され続けることになる。   When a mouse drag operation (movement while pressing a button) is performed, the xy rotation angle is updated based on the amount of movement of the mouse coordinates (step S830). Specifically, when the mouse movement is detected at a predetermined timing, the amount of movement of the acquired mouse coordinates from the previously acquired mouse coordinates is obtained, and the rotation about the y axis is determined based on the amount of movement of the x coordinates. The angle is updated, and the rotation angle about the x axis is updated based on the movement amount of the y coordinate. Then, the 3 × 3 matrix is updated based on the updated xy rotation angle, the coordinate conversion parameters are set based on the updated 3 × 3 matrix, and 1/4 is thinned out in each of the x-axis direction and the y-axis direction. Then, a MIP image is generated and displayed on the display unit 6 (step S840). At this time, since the generation of the MIP image is executed in about 1/16 of the generation time of the full resolution (about 0.4 seconds in the case of a 4-core CPU), the MIP image is thinned out and displayed following the drag operation of the mouse. Since the existing MIP image is updated in real time, from the user's point of view, an instruction to change the angle (rotation angle) is issued by performing a mouse drag operation. The process in step S840 is performed in the same manner as in step S820. The processes of steps S830 and S840 are repeatedly executed while the drag operation is continued with the mouse button pressed. Therefore, while the user continues the drag operation using the mouse, the MIP image thinned to 1/4 in the x-axis direction and the y-axis direction is displayed on the screen of the display unit 6 while changing the angle. Will continue.

マウスボタンのリリース操作が行われると、マウス座標の移動量に基づき、xy回転角の更新を行う(ステップS850)。具体的には、マウスボタンのリリース時において取得されたマウス座標の、前回取得されたマウス座標からの移動量を求め、x座標の移動量を基にy軸中心の回転角を更新し、y座標の移動量を基にx軸中心の回転角を更新する。そして、更新されたxy回転角に基づいて3×3行列を更新し、更新された3×3行列に基づいて座標変換パラメータを設定し、間引きを行わずにMIP画像を生成し、表示部6に表示出力する(ステップS860)。すなわち、図5のフローチャートに従った処理を実行して、全ての画素について画素値を算出し、MIP画像を生成し、表示する。このため、マウスのドラッグ操作を中止し、マウスボタンをリリースした際には、表示部6の画面には、静止した状態で間引きされていないフル解像度のMIP画像が表示されることになる。したがって、利用者から見れば、マウスボタンのリリース操作を行うことにより、アングル(回転角)の確定指示を行っていることになる。   When the release operation of the mouse button is performed, the xy rotation angle is updated based on the movement amount of the mouse coordinates (step S850). Specifically, the amount of movement of the mouse coordinates obtained at the time of releasing the mouse button from the previously obtained mouse coordinates is obtained, and the rotation angle about the y-axis is updated based on the amount of movement of the x-coordinate. The rotation angle about the x-axis is updated based on the movement amount of the coordinates. Then, the 3 × 3 matrix is updated based on the updated xy rotation angle, the coordinate conversion parameters are set based on the updated 3 × 3 matrix, a MIP image is generated without thinning, and the display unit 6 Is displayed (step S860). That is, the process according to the flowchart of FIG. 5 is executed, the pixel values are calculated for all the pixels, and the MIP image is generated and displayed. For this reason, when the mouse drag operation is stopped and the mouse button is released, the screen of the display unit 6 displays a still-resolution full-resolution MIP image that is not thinned out. Therefore, from the user's point of view, by performing the release operation of the mouse button, the angle (rotation angle) is instructed.

図14は、プログレッシブレンダリングにより表示された画面例を示す図である。図14(a)は、ステップS820、S840における表示の際の画面であり、図14(b)は、ステップS860における表示の際の画面である。マウスのドラッグ操作時には、間引き表示を行っているため、図14(a)に示すように、画像は粗くなるが、マウスの移動操作に追従して回転角度が異なる画像を次々にリアルタイムに表示することができる。そして、マウスのドラッグ操作を終えて回転角度が確定された際には、図14(b)に示すように、高精細な画像を表示することができる。   FIG. 14 is a diagram illustrating an example of a screen displayed by progressive rendering. FIG. 14A shows a screen at the time of display in steps S820 and S840, and FIG. 14B shows a screen at the time of display in step S860. At the time of mouse drag operation, since the thinning-out display is performed, the image becomes coarse as shown in FIG. 14A, but images having different rotation angles are sequentially displayed in real time following the mouse movement operation. be able to. Then, when the rotation angle is determined after the mouse drag operation is completed, a high-definition image can be displayed as shown in FIG.

<4.断層画像の階調落とし>
上記実施形態では、各画素が16ビットの信号値を記録した断層画像をそのまま用いてボクセル画像を作成するようにしたが、断層画像を8ビットに階調変換して階調低下画像を作成した後、ボクセル画像を作成するようにしてもよい。断層画像を8ビットに階調変換することにより、各画素の処理における負荷を削減することができ、MIP画像の高速な生成に寄与する。
<4. Degradation of tomographic image>
In the above-described embodiment, a voxel image is created using a tomographic image in which each pixel records a 16-bit signal value as it is. However, a gradation-reduced image is created by converting the tomographic image to 8 bits. Later, a voxel image may be created. By converting the tomographic image into 8-bit gradation, the load in processing each pixel can be reduced, which contributes to high-speed generation of a MIP image.

この場合、断層画像階調変換手段を更に設け、断層画像読込手段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)だけをメモリ上に直接構築できる。続いて、以下の〔数式9〕に従った処理を実行して、下限値Lmin および上限値Lmaxを算出する。下限値Lmin および上限値Lmaxは、〔数式8〕において用いる下限値Lminと上限値Lmax と同様な作用をするが、〔数式8〕と異なり固定的に与える。   In this case, a tomographic image gradation conversion unit is further provided, and the gradation conversion is performed every time the tomographic image reading unit 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 / 2-th intermediate tomographic image Do (x, y, z / 2) is read first, and all pixels in the tomographic image are read. Is Dmin, and the maximum value is Dmax. For Dmin and Dmax, a method of obtaining the minimum value and the maximum value from all the tomographic images may be used. However, if a method of determining only the intermediate tomographic images is used, all slices of a large-capacity 16-bit original tomographic image are obtained. It is possible to directly construct only the gradation-compressed tomographic image D8 (x, y, z), which is a gradation-reduced image, on the memory without reading and holding it on the memory. Subsequently, the processing according to the following [Equation 9] is executed to calculate the lower limit Lmin and the upper limit Lmax. The lower limit Lmin and the upper limit Lmax operate in the same manner as the lower limit Lmin and the upper limit Lmax used in [Equation 8], but are fixedly provided unlike in [Equation 8].

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

〔数式9〕において、γは階調圧縮画像のコントラスト調整幅で、0に近いほどコントラストが増大するが輝度が小さくなる。γは0.3未満の実数値であるが、通常はγ=0.1に設定する。MIP画像の輝度コントラストはGUI側において後述する〔数式10〕と同様な計算式で調整できるので、γは固定で良い。そして、下限値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)としたとき、以下の〔数式10〕に従った処理を実行して、階調圧縮断層画像D8(x,y,z) を算出する。   In [Equation 9], γ is the contrast adjustment width of the gradation-compressed image. As the value approaches 0, the contrast increases but the luminance decreases. Although γ is a real value less than 0.3, γ is usually set to 0.1. Since the brightness contrast of the MIP image can be adjusted on the GUI side by a calculation formula similar to [Equation 10] described later, γ 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), a process according to the following [Equation 10] is executed to calculate the gradation compressed tomographic image D8 (x, y, z).

〔数式10〕
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
[Equation 10]
D8 (x, y, z) = (Do (x, y, z) −Lmin) · 255 / (Lmax−Lmin)
When D8 (x, y, z)> 255: D8 (x, y, z) = 255, When D8 (x, y, z) <0: D8 (x, y, z) = 0

〔数式10〕の第2式に示すように、信号値が上限値Lmaxを超える場合は255、下限値Lminを下回る場合は0として、下限値Lminから上限値Lmaxの範囲を0から255に線形変換する。算出された階調圧縮断層画像D8(x,y,z)に対して、図5に基づく処理を実行すると階調が8ビットのMIP画像が生成される。そのため、原理的には〔数式8〕に従った処理を行わずに表示処理を行うことができる。しかし、MinIPやRaySumモードでは256階調の下側に画素値が集中することが多く、適切なコントラストで表示することが難しい。そこで、16ビット階調のMIP画像を表示する場合と同様に、GUI側でWindow Width(ウィンドウ幅:WW)、Window Level(ウィンドウレベル:WL)を調整し、256階調の範囲で下限値Lminと上限値Lmaxを設定し、〔数式8〕に従った処理を行うことが多い。前述の図10は3つとも8ビットのMIP画像の生成例で、図10(a)はLmin=50,Lmax=180に、図10(b)はLmin=0,Lmax=120に、図10(c)はLmin=0,Lmax=130に、各々設定して〔数式8〕に従った処理を行って表示したものである。   As shown in the second equation of [Equation 10], when the signal value exceeds the upper limit value Lmax, 255, and when the signal value is lower than the lower limit value Lmin, the value is set to 0, and the range from the lower limit value Lmin to the upper limit value Lmax is linearly changed from 0 to 255. Convert. When the processing based on FIG. 5 is performed on the calculated gradation-compressed tomographic image D8 (x, y, z), a MIP image with 8-bit gradation is generated. Therefore, in principle, display processing can be performed without performing processing according to [Equation 8]. However, in the MinIP or RaySum mode, pixel values are often concentrated below 256 gradations, and it is difficult to display with appropriate contrast. Therefore, as in the case of displaying a 16-bit gradation MIP image, Window Width (window width: WW) and Window Level (window level: WL) are adjusted on the GUI side, and the lower limit Lmin is set in the range of 256 gradations. And the upper limit Lmax are set, and processing according to [Equation 8] is often performed. FIG. 10 described above is an example of generating an 8-bit MIP image for all three. FIG. 10A shows Lmin = 50 and Lmax = 180, FIG. 10B shows Lmin = 0 and Lmax = 120, and FIG. (C) is displayed by setting Lmin = 0 and Lmax = 130, respectively, and performing the processing according to [Equation 8].

上記実施形態では、MIP画像の生成領域をy軸方向のみに複数に分割するようにしたが、複数の領域に分割することができれば、分割の態様は特に限定されない。図15に、生成領域を複数の分割生成領域に分割する場合の様々な態様を示す図である。図15において、矩形は、画像の生成領域を示し、左右方向がx軸、上下方向がy軸である。また、図15においては、いずれもN=4として、4個の分割生成領域R1〜R4に分割する例を示している。図15(a)は、y軸方向のみに複数に分割した例を示している。上記実施形態では、図15(a)のような分割態様を想定して説明した。図15(b)は、x軸方向のみに複数に分割した例を示している。図15(c)は、x軸方向、y軸方向ともに分割した例を示している。図15(a)〜図15(c)の例では、いずれも、1つの分割生成領域は1つの連続した領域となっている。   In the above embodiment, the MIP image generation region is divided into a plurality of regions only in the y-axis direction. However, as long as the region can be divided into a plurality of regions, the mode of division is not particularly limited. FIG. 15 is a diagram illustrating various modes when the generation area is divided into a plurality of division generation areas. In FIG. 15, a rectangle indicates an image generation area, and the horizontal direction is the x axis, and the vertical direction is the y axis. FIG. 15 shows an example in which N is set to N = 4 and divided into four divided generation regions R1 to R4. FIG. 15A shows an example in which the image is divided into a plurality of parts only in the y-axis direction. In the above-described embodiment, the description has been made assuming a division mode as shown in FIG. FIG. 15B shows an example in which the image is divided into a plurality of parts only in the x-axis direction. FIG. 15C shows an example in which the image is divided in both the x-axis direction and the y-axis direction. In the examples of FIGS. 15A to 15C, one divided generation region is one continuous region.

図15(a)〜図15(c)に示した例の中では、図15(b)に示したように、x軸方向のみに複数に分割することが好ましく、次に図15(a)に示したように、y軸方向のみに複数に分割することが好ましい。通常、CPUは、スクリーン(表示画面)のy軸方向は、正面アングルでは、ボクセル画像のz軸方向に対応し、各分割生成領域はz軸方向に飛び飛びのアドレスでボクセル画像にアクセスすることになる。この際、x軸方向のみに分割すれば、各分割生成領域について殆ど同一のz座標でボクセル画像にアクセスすることになり、アクセス時間が短縮する。このため、使用頻度の高い正面アングルにおいて最も高速化できるx軸方向のみに分割するようにしてもよい。また、アングルに応じて分割する方向を切り替えるようにしてもよい。   In the examples shown in FIGS. 15A to 15C, as shown in FIG. 15B, it is preferable to divide the image into a plurality only in the x-axis direction. As shown in the above, it is preferable to divide into a plurality only in the y-axis direction. Normally, the CPU determines that the y-axis direction of the screen (display screen) corresponds to the z-axis direction of the voxel image at the front angle, and that each divided generation area accesses the voxel image at a discrete address in the z-axis direction. Become. At this time, if the image is divided only in the x-axis direction, the voxel image is accessed with almost the same z-coordinate for each divided generation area, and the access time is reduced. For this reason, division may be performed only in the x-axis direction where the speed can be increased at the most frequently used front angle. Further, the dividing direction may be switched according to the angle.

図15(d)の例では、1つの分割生成領域が1つの連続した領域となっておらず、1つの分割生成領域が離れた態様となった例を示している。図15(d)の例においても、N=4であり、4つの分割生成領域R1〜R4に分割されるが、さらに各分割生成領域R1〜R4が4つのブロックに分割されている。このように、1つの分割生成領域を複数のブロックに分けて処理を行う場合、各CPUスレッドが、1つの連続する領域を処理するのではなく、離れた複数のブロックを処理することになる。   In the example of FIG. 15D, one divided generation area is not a single continuous area, and one divided generation area is separated. Also in the example of FIG. 15D, N = 4 and the image is divided into four divided generation regions R1 to R4, and each divided generation region R1 to R4 is further divided into four blocks. As described above, when processing is performed by dividing one divided generation area into a plurality of blocks, each CPU thread processes a plurality of distant blocks instead of processing one continuous area.

図12を用いて説明したように、全ての処理スレッドの終了を待って、表示処理を開始する場合は、1つの分割生成領域が1つの連続した領域となっていても、1つの分割生成領域が複数のブロックに分かれていても変わりはない。しかし、図16を用いて説明したように、各処理スレッドの終了ごとに表示処理を行う場合は、表示の態様に違いが生じる。図15(a)〜図15(c)の例のように1つの分割生成領域が連続している場合は、CPUスレッドが処理されるごとに画像の表示出力を行うと、偏った一部分から先に表示されることになる。例えば、分割生成領域R1の処理だけが先に終わると、上だけ、左だけ、左上だけが先に表示される。これに対して、図15(d)の例のように1つの分割生成領域が複数のブロックに分かれている場合は、全体にバランスよく表示が行われることになる。例えば、分割生成領域R1の処理だけが先に終わったとしても、4箇所の離れたブロックが表示される。   As described with reference to FIG. 12, when the display process is started after all the processing threads are finished, even if one divided generation area is one continuous area, one divided generation area It does not change even if is divided into multiple blocks. However, as described with reference to FIG. 16, when the display process is performed every time each processing thread ends, a difference occurs in a display mode. When one divided generation area is continuous as in the examples of FIGS. 15A to 15C, display output of an image is performed every time the CPU thread is processed. Will be displayed. For example, when only the processing of the divided generation region R1 is completed first, only the upper part, only the left part, and only the upper left part are displayed first. On the other hand, when one divided generation area is divided into a plurality of blocks as in the example of FIG. 15D, the display is performed in a well-balanced manner as a whole. For example, even if only the processing of the divided generation region R1 is completed first, four separated blocks are displayed.

更に、図15(d)の例の分割区画を更に細かくし、R1〜R4の各分割生成領域を1画素にする構成をとることもできる。即ち、2×2画素の隣接する4画素に、異なる処理スレッドで実行させる方法である。この方法は、いずれか1つの処理スレッドの実行が終了すれば、1つ置きに間引かれた画像が完成し、処理途上で完成像を概ね確認できるというメリットがある。   Further, it is also possible to adopt a configuration in which the divided sections in the example of FIG. 15D are made finer, and each of the divided generation areas of R1 to R4 is one pixel. That is, this is a method in which four adjacent pixels of 2 × 2 pixels are executed by different processing threads. This method has the advantage that, once the execution of any one of the processing threads is completed, every other thinned image is completed, and the completed image can be generally confirmed during the processing.

以上、本開示の好適な実施形態について説明したが、本開示は上記実施形態に限定されず、種々の変形が可能である。本開示の趣旨を逸脱しない範囲で変更された態様は、本開示の技術的範囲に含まれる。   As described above, the preferred embodiments of the present disclosure have been described, but the present disclosure is not limited to the above embodiments, and various modifications are possible. Aspects changed without departing from the spirit of the present disclosure are included in the technical scope of the present disclosure.

また、上記実施形態では、各分割画像の生成を、各CPUコアに割り当てるようにしたが、1つのCPUコアが複数の処理を並行して実行できる場合、1つのCPUコアに複数の分割画像の生成を割り当てるようにしてもよい。   In the above embodiment, the generation of each divided image is assigned to each CPU core. However, when one CPU core can execute a plurality of processes in parallel, a plurality of divided images are assigned to one CPU core. Generation may be assigned.

1・・・CPU(Central Processing Unit)
2・・・RAM(Random Access Memory)
3・・・記憶装置
4・・・指示入力I/F
5・・・データ入出力I/F
6・・・表示部
7・・・GPU
8・・・フレームメモリ
10・・・断層画像読込手段
15・・・座標変換パラメータ入力手段
20・・・ROIクリッピング設定手段
25・・・マスク設定手段
30・・・ボクセル画像作成手段
70・・・2次元投影画像生成手段
77・・・起点座標探索手段
80・・・画像出力手段
100・・・レンダリング装置
1 ... CPU (Central Processing Unit)
2 ... RAM (Random Access Memory)
3. Storage device 4. Instruction input I / F
5 Data I / F
6 Display unit 7 GPU
8 Frame memory 10 Tomographic image reading means 15 Coordinate transformation parameter input means 20 ROI clipping setting means 25 Mask setting means 30 Voxel image creating means 70 Two-dimensional projection image generation means 77 ... origin coordinate search means 80 ... image output means 100 ... rendering device

Claims (17)

所定の対象物について所定の間隔で撮影された複数の2次元の断層画像を、所定の視線方向から観察した状態を表す2次元投影画像を生成するためのレンダリング装置であって、
前記2次元投影画像を生成する領域である生成領域をN個の分割生成領域に分割し、
前記分割生成領域を構成する各画素より、前記視線方向に仮想光線を照射し、
前記複数の2次元の断層画像を構成する各画素を対応させたボクセル画像と前記仮想光線が交差する前記ボクセル画像のボクセルを複数抽出し、抽出された複数のボクセルの信号値を基に単一の代表信号値を算出し、算出された代表信号値を当該仮想光線が照射された前記分割生成領域を構成する各画素の画素値として与えることにより、各分割生成領域に対応する分割画像を生成する2次元投影画像生成手段を有し、
前記2次元投影画像生成手段は、前記N個に分割された分割生成領域に対応する分割画像を生成する処理を並行して実行し、前記2次元投影画像を生成するレンダリング装置。
A rendering apparatus for generating a two-dimensional projection image representing a state in which a plurality of two-dimensional tomographic images captured at predetermined intervals of a predetermined target object are observed from a predetermined line-of-sight direction,
Dividing a generation area, which is an area for generating the two-dimensional projection image, into N divided generation areas;
From each pixel constituting the divided generation area, irradiate a virtual ray in the line of sight direction,
A plurality of voxels of the voxel image in which the virtual rays intersect with a voxel image corresponding to each pixel constituting the plurality of two-dimensional tomographic images are extracted, and a single voxel is extracted based on the extracted signal values of the plurality of voxels. By calculating the representative signal values of the above and giving the calculated representative signal values as the pixel values of the respective pixels constituting the divided generation area irradiated with the virtual ray, a divided image corresponding to each divided generation area is generated. A two-dimensional projection image generating means,
A rendering apparatus for generating the two-dimensional projection image, wherein the two-dimensional projection image generation means executes a process of generating a divided image corresponding to the N divided generation regions in parallel.
前記2次元投影画像生成手段は、前記代表信号値として前記抽出された複数のボクセルの信号値の最大値、最小値または平均値のいずれかを算出するようにしている請求項1に記載のレンダリング装置。   2. The rendering according to claim 1, wherein the two-dimensional projection image generation unit is configured to calculate any one of a maximum value, a minimum value, and an average value of the signal values of the extracted voxels as the representative signal value. 3. apparatus. 前記2次元投影画像生成手段は、
前記各分割生成領域が所定の視線方向と交差する領域として視点座標系に定義されている場合、
前記視点座標系において、前記分割生成領域の各画素より、前記視線方向において所定の参照間隔で前記ボクセル画像の対応する複数のボクセルの信号値を取得し、取得された複数のボクセルの信号値を基に前記単一の代表信号値を算出する請求項1または請求項2に記載のレンダリング装置。
The two-dimensional projection image generating means includes:
When each of the divided generation areas is defined in the viewpoint coordinate system as an area that intersects a predetermined line-of-sight direction,
In the viewpoint coordinate system, from each pixel of the divided generation area, obtain signal values of a plurality of voxels corresponding to the voxel image at predetermined reference intervals in the line of sight direction, and obtain signal values of the obtained voxels. The rendering device according to claim 1, wherein the single representative signal value is calculated based on the value.
前記2次元投影画像生成手段は、
前記分割生成領域の所定の画素において、前記視線方向の上限値を探索開始座標として、有効範囲に含まれる前記視線方向のうち最大となる座標値を起点座標として、探索する起点座標探索手段を備え、
前記起点座標探索手段により算出された起点座標より下限値に向けて所定数m1で前記視線方向における座標を減じながら、視点座標系の3次元座標ごとに所定の座標変換を行って前記ボクセル画像の対応するボクセルの信号値を算出するようにしている請求項3に記載のレンダリング装置。
The two-dimensional projection image generating means includes:
In a predetermined pixel of the divided generation area, an upper limit value of the line of sight direction is set as a search start coordinate, and a starting point coordinate search unit is searched with a coordinate value of a maximum among the line of sight directions included in the effective range as a start point coordinate. ,
While reducing the coordinates in the line-of-sight direction by a predetermined number m1 toward the lower limit value from the start point coordinates calculated by the start point coordinate search means, predetermined coordinate conversion is performed for each three-dimensional coordinate of the viewpoint coordinate system, and the voxel image The rendering device according to claim 3, wherein a signal value of a corresponding voxel is calculated.
前記2次元投影画像生成手段は、
前記分割生成領域の所定の画素に対して、前記視線方向の座標において算出されたボクセルの信号値が前記有効範囲に含まれ、前記所定数m1を減じた後の前記視線方向の座標において算出されたボクセルの信号値が前記有効範囲に含まれない場合、
前記起点座標探索手段は、前記所定数m1を減じた後の前記視線方向の座標を探索開始座標として、前記有効範囲に含まれる起点座標を探索するようにしている請求項4に記載のレンダリング装置。
The two-dimensional projection image generating means includes:
For a predetermined pixel of the divided generation area, the signal value of the voxel calculated at the coordinates of the line of sight is included in the effective range, and the signal value of the voxel is calculated at the coordinates of the line of sight after subtracting the predetermined number m1. Voxel signal value is not included in the effective range,
5. The rendering device according to claim 4, wherein the starting point coordinate search unit searches for starting point coordinates included in the effective range, using coordinates in the line of sight direction after subtracting the predetermined number m1 as search start coordinates. 6. .
前記起点座標探索手段は、
前記視線方向の座標を所定の上限値より所定の下限値の範囲で前記所定数m1より大きい所定数m2(m2>m1)で減算させて、各3次元座標に対して、前記座標変換を行ってボクセルの信号値を算出し、
前記所定数m2の減算後の前記視線方向の座標におけるボクセルの信号値が前記有効範囲に含まれる場合は、前記減算後の前記視線方向の座標より前記所定数m1を増加させて各3次元座標に対して、前記座標変換を行ってボクセルの信号値を算出する請求項4または請求項5に記載のレンダリング装置。
The starting point coordinate search means includes:
The coordinates in the direction of the line of sight are subtracted by a predetermined number m2 (m2> m1) greater than the predetermined number m1 in a range of a predetermined lower limit from a predetermined upper limit, and the coordinate conversion is performed on each three-dimensional coordinate. To calculate the voxel signal value,
If the signal value of the voxel at the coordinates in the line-of-sight direction after the subtraction of the predetermined number m2 is included in the effective range, the three-dimensional coordinates are increased by increasing the predetermined number m1 from the coordinates in the line-of-sight direction after the subtraction. The rendering apparatus according to claim 4, wherein the coordinate conversion is performed on the image data to calculate a voxel signal value.
前記所定数m1の増加後の前記視線方向の座標における3次元座標に対応するボクセルの信号値が前記有効範囲に含まれない場合は、前記所定数m1の増加後の前記視線方向の座標からm1だけ減算した値を前記起点座標として与えるようにする請求項6に記載のレンダリング装置。   When the signal value of the voxel corresponding to the three-dimensional coordinates in the coordinates of the gaze direction after the increase of the predetermined number m1 is not included in the effective range, m1 is calculated from the coordinates of the gaze direction after the increase of the predetermined number m1. 7. The rendering apparatus according to claim 6, wherein a value obtained by subtracting the first value is given as the starting point coordinates. 前記所定数m2の減算後の前記視線方向の座標におけるボクセルの信号値のいずれもが前記有効範囲に含まれない場合は、前記起点座標として前記視線方向の座標の下限値より小さい値を与えるようにしている請求項6または請求項7に記載のレンダリング装置。   If none of the voxel signal values at the coordinates in the line-of-sight direction after the subtraction of the predetermined number m2 is included in the effective range, a value smaller than the lower limit value of the coordinates in the line-of-sight direction is given as the starting point coordinate. The rendering device according to claim 6 or 7, wherein: 前記起点座標探索手段は、
前記座標変換を行って実数値のボクセル座標を算出し、算出された実数値のボクセル座標の各値を四捨五入して整数値のボクセル座標を取得し、
前記取得した整数値のボクセル座標が所定の有効領域に含まれる場合、前記ボクセル座標に対応する前記ボクセル画像の画素値を前記3次元座標に対応するボクセルの信号値として与え、
前記ボクセル座標が前記有効領域に含まれない場合は、前記3次元座標に対応するボクセルの信号値として、前記有効範囲に含まれない値を与える請求項8に記載のレンダリング装置。
The starting point coordinate search means includes:
Calculate the voxel coordinates of the real value by performing the coordinate transformation, to obtain the voxel coordinates of the integer value by rounding each value of the calculated voxel coordinates of the real value,
When the voxel coordinates of the obtained integer value are included in a predetermined effective area, a pixel value of the voxel image corresponding to the voxel coordinates is given as a signal value of a voxel corresponding to the three-dimensional coordinates,
9. The rendering apparatus according to claim 8, wherein when the voxel coordinates are not included in the effective area, a value not included in the effective range is given as a voxel signal value corresponding to the three-dimensional coordinates.
前記2次元投影画像生成手段は、
前記座標変換を行って実数値のボクセル座標を算出し、算出された実数値のボクセル座標の近傍に位置する整数値のボクセル座標を複数個取得し、
取得された複数の整数値のボクセル座標の中で、所定の有効領域に含まれる整数値のボクセル座標に対応する前記ボクセル画像の複数のボクセルを特定し、特定した複数のボクセルの各信号値に所定の重みを掛けながら加算した値を、前記3次元座標に対応するボクセルの信号値として与えるようにしている請求項4に記載のレンダリング装置。
The two-dimensional projection image generating means includes:
The coordinate conversion is performed to calculate real-valued voxel coordinates, and a plurality of integer-valued voxel coordinates located near the calculated real-valued voxel coordinates are obtained,
Among the obtained voxel coordinates of the plurality of integer values, the plurality of voxels of the voxel image corresponding to the voxel coordinates of the integer values included in the predetermined effective area are specified, and the signal values of the specified plurality of voxels are specified. The rendering device according to claim 4, wherein a value added while multiplying by a predetermined weight is given as a voxel signal value corresponding to the three-dimensional coordinates.
前記ボクセル画像を構成する各断層画像のx軸方向の左端に対応する座標をXso、x軸方向の右端に対応する座標をXeo、y軸方向の上端に対応する座標をYso、y軸方向の下端に対応する座標をYeo、最初の断層画像が配置されるz座標をZso、最終の断層画像が配置されるz座標をZeoとすると、Xso≦Xs<Xe≦Xeo、Yso≦Ys<Ye≦Yeo、Zso≦Zs<Ze≦Zeoを満たす、6つの座標Xs,Xe,Ys,Ye,Zs,Zeが定義されている場合、
前記有効領域は、前記6つの座標Xs,Xe,Ys,Ye,Zs,Zeに囲まれた領域である請求項9または請求項10に記載のレンダリング装置。
The coordinates corresponding to the left end in the x-axis direction of each tomographic image constituting the voxel image are Xso, the coordinates corresponding to the right end in the x-axis direction are Xeo, the coordinates corresponding to the top end in the y-axis direction are Yso, If the coordinates corresponding to the lower end are Yeo, the z coordinate at which the first tomographic image is arranged is Zso, and the z coordinate at which the final tomographic image is arranged is Zeo, Xso ≦ Xs <Xe ≦ Xeo, Yso ≦ Ys <Ye ≦ When six coordinates Xs, Xe, Ys, Ye, Zs, Ze satisfying Yeo, Zso ≦ Zs <Ze ≦ Zeo are defined,
The rendering device according to claim 9, wherein the effective area is an area surrounded by the six coordinates Xs, Xe, Ys, Ye, Zs, and Ze.
前記ボクセル画像に対応して、0(表示しない)または1(表示する)の値をもつマスクデータMaskがあらかじめ定義されている場合、前記有効領域は、Mask=1である請求項9から請求項11のいずれか一項に記載のレンダリング装置。   10. The effective area is Mask = 1 when mask data Mask having a value of 0 (not displayed) or 1 (displayed) corresponding to the voxel image is defined in advance. The rendering device according to any one of claims 11 to 13. 前記座標変換のパラメータを入力する座標変換パラメータ入力手段と、前記2次元投影画像生成手段により生成される2次元投影画像を表示出力する画像出力手段を更に備え、
外部より所定の変更指示が行われている場合には、
前記座標変換パラメータ入力手段により、座標変換パラメータの入力を行い、
所定の間隔で間引きながら、前記2次元投影画像の画素に対して、前記2次元投影画像生成手段を実行し、残りの画素に対しては、前記2次元投影画像生成手段が実行された画素を基に補間するようにして生成された2次元投影画像を、前記画像出力手段は表示するようにし、
前記所定の確定指示がなされた場合には、
前記座標変換パラメータ入力手段により、座標変換パラメータの入力を行い、
前記2次元投影画像の全ての画素に対して、前記2次元投影画像生成手段が実行され生成された2次元投影画像を、前記画像出力手段は表示するようにしている請求項9から請求項12のいずれか一項に記載のレンダリング装置。
Coordinate conversion parameter input means for inputting the parameters for the coordinate conversion, and image output means for displaying and outputting a two-dimensional projection image generated by the two-dimensional projection image generation means,
If a predetermined change instruction is issued from outside,
By the coordinate conversion parameter input means, input of a coordinate conversion parameter,
The pixels of the two-dimensional projection image are subjected to the two-dimensional projection image generation means while the pixels of the two-dimensional projection image are thinned out at predetermined intervals. The image output means displays a two-dimensional projection image generated by interpolating based on the
When the predetermined confirmation instruction is given,
By the coordinate conversion parameter input means, input of a coordinate conversion parameter,
13. The image output means displays the two-dimensional projection image generated by the two-dimensional projection image generation means being executed for all the pixels of the two-dimensional projection image. The rendering device according to claim 1.
前記2次元投影画像生成手段により生成された2次元投影画像の各画素値が8ビットを超える階調をもつ場合に、あらかじめ定義された階調の下限値Lminと階調の上限値Lmaxを用い、
前記画素値Image(x,y)がLmin≦Image(x,y)≦Lmaxの場合、前記画素値を(Image(x,y)´=(Image(x,y)−Lmin)・255/(Lmax(x,y)−Lmin)とし、
前記画素値Image(x,y)がImage(x,y)>Lmaxの場合、前記画素値をImage´(x,y)=255とし、
前記画素値Image(x,y)がImage(x,y)<Lminの場合、前記画素値をImage´(x,y)=0として、
前記各画素値を8ビットの階調に変換して表示するようにしている請求項13に記載のレンダリング装置。
When each pixel value of the two-dimensional projection image generated by the two-dimensional projection image generation means has a gradation exceeding 8 bits, a predefined lower limit value Lmin and an upper limit value Lmax of the gradation are used. ,
When the pixel value Image (x, y) satisfies Lmin ≦ Image (x, y) ≦ Lmax, the pixel value is calculated as (Image (x, y) ′ = (Image (x, y) −Lmin) · 255 / ( Lmax (x, y) -Lmin),
When the pixel value Image (x, y) is Image (x, y)> Lmax, the pixel value is set to Image ′ (x, y) = 255,
When the pixel value Image (x, y) is Image (x, y) <Lmin, the pixel value is set to Image ′ (x, y) = 0,
14. The rendering device according to claim 13, wherein each of the pixel values is converted into 8-bit gradation and displayed.
前記生成領域をx軸方向、y軸方向の2次元の領域とした場合、
前記N個の分割生成領域は、x軸方向のみまたはy軸方向のみに分割されたものであり、
各分割生成領域は、1つの連続した領域である請求項1から請求項14のいずれか一項に記載のレンダリング装置。
When the generation region is a two-dimensional region in the x-axis direction and the y-axis direction,
The N divided generation areas are divided only in the x-axis direction or only in the y-axis direction,
The rendering device according to any one of claims 1 to 14, wherein each of the divided generation areas is one continuous area.
前記生成領域をx軸方向、y軸方向の2次元の領域とした場合、前記各分割生成領域は、複数の離れたブロックである請求項1から請求項14のいずれか一項に記載のレンダリング装置。   The rendering according to any one of claims 1 to 14, wherein when the generation area is a two-dimensional area in the x-axis direction and the y-axis direction, each of the divided generation areas is a plurality of separated blocks. apparatus. 所定の対象物について所定の間隔で撮影された複数の2次元の断層画像を、所定の視線方向から観察した状態を表す2次元投影画像を生成するため、
コンピュータを、
前記2次元投影画像を生成する領域である生成領域をN個の分割生成領域に分割し、前記分割生成領域の各画素より前記視線方向に仮想光線を照射し、前記複数の2次元の断層画像を構成する各画素を対応させたボクセル画像と前記仮想光線が交差する前記ボクセル画像のボクセルを複数抽出し、抽出された複数のボクセルの信号値を基に単一の代表信号値を算出し、算出された代表信号値を当該仮想光線が照射された前記分割生成領域を構成する各画素の画素値として与えることにより、各分割生成領域に対応する分割画像を生成する2次元投影画像生成手段として機能させ、
前記2次元投影画像生成手段は、前記N個に分割された分割生成領域に対応する分割画像を生成する処理を並行して実行し前記2次元投影画像を生成するプログラム。
In order to generate a two-dimensional projected image representing a state in which a plurality of two-dimensional tomographic images taken at predetermined intervals of a predetermined target object are observed from a predetermined line of sight,
Computer
The generation area, which is an area for generating the two-dimensional projection image, is divided into N divided generation areas, and a virtual ray is irradiated from each pixel of the divided generation area in the line of sight direction, and the plurality of two-dimensional tomographic images are obtained. A plurality of voxels of the voxel image and the voxel image where the virtual ray intersects each pixel constituting the pixel are extracted, and a single representative signal value is calculated based on the signal values of the extracted voxels, By providing the calculated representative signal value as a pixel value of each pixel constituting the divided generation region irradiated with the virtual ray, a two-dimensional projection image generating unit that generates a divided image corresponding to each divided generation region Let it work,
A program for generating the two-dimensional projection image by executing, in parallel, a process of generating a divided image corresponding to the N divided generation regions.
JP2018166559A 2018-09-06 2018-09-06 Rendering device Active JP6555408B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018166559A JP6555408B1 (en) 2018-09-06 2018-09-06 Rendering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018166559A JP6555408B1 (en) 2018-09-06 2018-09-06 Rendering device

Publications (2)

Publication Number Publication Date
JP6555408B1 JP6555408B1 (en) 2019-08-07
JP2020038589A true JP2020038589A (en) 2020-03-12

Family

ID=67539854

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018166559A Active JP6555408B1 (en) 2018-09-06 2018-09-06 Rendering device

Country Status (1)

Country Link
JP (1) JP6555408B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004348702A (en) * 2002-09-06 2004-12-09 Sony Computer Entertainment Inc Image processing method, its apparatus, and its processing system
JP2006000126A (en) * 2004-06-15 2006-01-05 Fuji Photo Film Co Ltd Image processing method, apparatus and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004348702A (en) * 2002-09-06 2004-12-09 Sony Computer Entertainment Inc Image processing method, its apparatus, and its processing system
JP2006000126A (en) * 2004-06-15 2006-01-05 Fuji Photo Film Co Ltd Image processing method, apparatus and program

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
三浦 嘉章: ""技術解説/X線画像の進化−三次元撮影技術解説−"", 全国循環器撮影研究会誌, vol. 23, JPN6018042451, 2011, pages 18 - 29, ISSN: 0003989189 *
杉本 祐樹 他2名: ""ボリュームレンダリングにおける効率的なテクスチャ参照"", 情報処理学会研究報告 PISJ SIG TECHNICAL REPORT, vol. Vol.2011-HPC-130, JPN6018042450, 28 July 2011 (2011-07-28), pages 23, ISSN: 0003989188 *
篠本 雄基 他5名: ""並列ボリュームレンダリングにおける投機的描画に関する考察"", 社団法人 情報処理学会 研究報告 IPSJ SIG TECHNICAL REPORT, vol. 2005-ARC-164(25), JPN6018042452, 4 August 2005 (2005-08-04), pages 145 - 150, ISSN: 0003989187 *

Also Published As

Publication number Publication date
JP6555408B1 (en) 2019-08-07

Similar Documents

Publication Publication Date Title
JP7112549B2 (en) Varying the effective resolution with screen position by changing the active color sample count within multiple render targets
JP7004645B2 (en) Foveal geometry tessellation
JP6392370B2 (en) An efficient re-rendering method for objects to change the viewport under various rendering and rasterization parameters
TWI616846B (en) A graphics subsystem, a computer-implemented method and a computing device for enhanced anti-aliasing by varying sample patterns spatially and/or temporally
US7742060B2 (en) Sampling methods suited for graphics hardware acceleration
US8379955B2 (en) Visualizing a 3D volume dataset of an image at any position or orientation from within or outside
JP5225999B2 (en) Combined intensity projection
US20050237336A1 (en) Method and system for multi-object volumetric data visualization
US7893938B2 (en) Rendering anatomical structures with their nearby surrounding area
JP2006326312A (en) Simultaneous projection of multi-branched blood vessels and their context on single image
JP2009247490A (en) Image processor, image processing method and program
JP6555408B1 (en) Rendering device
JP6544472B1 (en) Rendering device, rendering method, and program
JP7123798B2 (en) Image processing device, image processing method, image processing program, image processing system
US9035945B1 (en) Spatial derivative-based ray tracing for volume rendering
CN111210898A (en) Method and device for processing DICOM data
JP7223312B2 (en) volume rendering device
JP2010182094A (en) Apparatus and method for drawing stereoscopic image, and stereoscopic image drawing program
JP7131080B2 (en) volume rendering device
JP2006000126A (en) Image processing method, apparatus and program
JP7167699B2 (en) volume rendering device
JP6443574B1 (en) Ray casting program, search control data, search control data generation method, and ray casting apparatus
JP7206846B2 (en) volume rendering device
JP5245811B2 (en) Voxel array visualization device
Gallo et al. High-fidelity visualization of large medical datasets on commodity hardware

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180920

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20180920

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20180925

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181030

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190305

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190419

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: 20190611

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190624

R150 Certificate of patent or registration of utility model

Ref document number: 6555408

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150