医療の3D技術でいちばん重要な段階である。印刷物の正確さは、印刷機ではなくセグメンテーションの質で決まる。
要点は閾値をどう決めたか、その根拠を言えるかである。
- セグメンテーションの原理と限界
- 画像から何を作るのか — 4つの工程
- 撮像装置ごとの違い — 何が画像になっているのか
- 手法の比較 — 何を選び、なぜそれが破れるか
- 診断・治療計画・研究・教育での価値
- AI・倫理・法規と、これから
セグメンテーションの原理と限界

セグメンテーション=医用画像のボクセル1つ1つを「対象/背景」に振り分けること。3Dモデルはこの結果の表面を三角形で張ったものである。
主な手法:
- 閾値法(thresholding)——CT 値(HU)の範囲で選ぶ。骨は +200〜+3000 HU、水は 0、空気は −1000
- 領域拡張(region growing)——種となる点から、条件を満たす隣接ボクセルへ広げる
- エッジ検出——勾配の大きいところを境界とする
- アトラス/モデル基準——解剖学的な形の事前知識を使う
- 深層学習(U-Net など)——学習済みモデルで自動抽出
出力は STL(三角形メッシュ)で保存する。

閾値法は骨には有効だが軟部組織には効かない。理由はコントラストが足りないから——肝・脾・腎の HU 値は重なっており、単一のしきい値で分けられない。だから肝臓のセグメンテーションは造影 CT を使い、それでも手作業の修正が要る。
部分容積効果(partial volume effect)が最大の誤差源である。1つのボクセルの中に骨と軟部組織が混在すると、その中間の HU 値が記録される。スライス厚が厚いほど影響が大きいので、印刷用のデータは薄いスライス(0.5〜1 mm)で撮る必要がある。既存の診断用CTを流用すると、細い構造が途切れたり融合したりする。
閾値を1つ変えるだけで骨の厚さが変わる。低くすれば骨が太り、高くすれば痩せる。手術ガイドではこれが直接ミリ単位の誤差になるので、「見た目が綺麗だから」で決めてはいけない。基準を持つこと(既知の寸法での検証、同一プロトコルの踏襲)が求められる。
金属アーチファクト(既存のインプラント・歯科補綴)はストリーク状の偽像を作り、セグメンテーションを大きく狂わせる。再建手術の対象患者ほど金属が入っているという皮肉があり、MAR(金属アーチファクト低減)アルゴリズムや MRI との併用が必要になる。
検証(validation)を必ず行う。作った STL を元の画像に重ねて(オーバーレイ)ずれを確認する。「印刷できた」ことは「正しい」ことの証明にならない——これは MEDICUS の他の作業と同じ原則である。
English version
Core
Segmentation = assigning every voxel of a medical image to "object" or "background". A 3D model is the surface of that result covered with triangles.
The principal methods:
- Thresholding — selecting by a range of CT number (HU). Bone is +200 to +3000 HU, water 0, air −1000.
- Region growing — from a seed point, spreading to neighbouring voxels that satisfy a condition.
- Edge detection — taking the places of large gradient as the boundary.
- Atlas- or model-based — using prior knowledge of anatomical shape.
- Deep learning (U-Net and the like) — automatic extraction with a trained model.
The output is saved as STL (a triangle mesh).
Going further
Thresholding works for bone and not for soft tissue. The reason is that the contrast is insufficient — the HU values of liver, spleen and kidney overlap and cannot be separated by a single threshold. Hence the liver segmentation uses contrast CT, and even then manual correction is needed.
The partial volume effect is the greatest source of error. When bone and soft tissue are mixed within one voxel, an intermediate HU is recorded. The thicker the slice the greater the effect, so data for printing must be acquired in thin slices (0.5–1 mm). Reuse a diagnostic CT and fine structures break up or fuse.
Changing one threshold changes the thickness of the bone. Lower it and the bone fattens; raise it and it thins. In a surgical guide this becomes an error of millimetres directly, so it must not be decided "because it looks nice". Having a standard (verification against a known dimension, following the same protocol) is required.
Metal artefact (an existing implant, dental restorations) creates streak artefacts and badly distorts the segmentation. There is the irony that the very patients who need reconstruction are the ones with metal in them, and MAR (metal artefact reduction) algorithms or the use of MRI alongside become necessary.
Always carry out validation. Overlay the STL on the original image and check the deviation. "It printed" is no proof that "it is right" — the same principle as the rest of the work in MEDICUS.
画像から何を作るのか — 4つの工程
工程を混同しないことが、この章の一番の要点。
①前処理 pre-processing——まだ何も分けていない。画像そのものを扱いやすくする段階で、ノイズ除去・平滑化・コントラスト調整・リサンプリング・位置合わせ・アーチファクト補正。出てくるのは「きれいになった画像」。
②特徴抽出 feature extraction——画素から判断の材料になる量を取り出す。濃度値・勾配(エッジ)・テクスチャ・形状など。出てくるのは「数値の集まり」で、まだ領域ではない。
③セグメンテーション——各画素がどの構造に属するかを決める。出てくるのは「ラベルの付いた領域(マスク)」。
④後処理 post-processing——分けた後の手直し。穴埋め・平滑化・小さな島の除去・表面の再構成(marching cubes)・メッシュの簡略化。出てくるのは「印刷できる表面モデル」。
覚え方——「①はまだ分けていない、③で分ける、②はその材料、④は分けた後」。

「前処理と特徴抽出の違い」「セグメンテーションと後処理の違い」は、どちらもこの区別だけの問題である。「前処理と特徴抽出の違い」=画像を返すか数値を返すか、「セグメンテーションと後処理の違い」=分けるのか、分けた結果を直すのかと整理すれば足りる。
English version
Core
Not confusing the stages is the chief point of this chapter.
① Pre-processing — nothing has been divided yet. The stage of making the image easier to handle: noise removal, smoothing, contrast adjustment, resampling, registration, artefact correction. What comes out is "a cleaner image".
② Feature extraction — taking from the pixels the quantities that will be the material of a judgement: intensity, gradient (edges), texture, shape. What comes out is "a set of numbers", not yet regions.
③ Segmentation — deciding which structure each pixel belongs to. What comes out is "labelled regions (a mask)".
④ Post-processing — tidying up after the division: filling holes, smoothing, removing small islands, reconstructing the surface (marching cubes), simplifying the mesh. What comes out is "a printable surface model".
A way to remember — ① has not divided anything yet, ③ divides, ② is the material for it, ④ is after the division.
Going further
"The difference between pre-processing and feature extraction" and "the difference between segmentation and post-processing" are both questions of this distinction alone. Putting it as "the difference between pre-processing and feature extraction" = whether it returns an image or numbers, and "the difference between segmentation and post-processing" = whether it divides or tidies what has been divided is enough.
撮像装置ごとの違い — 何が画像になっているのか
CT——X線の減弱を測る。値は Hounsfield 単位(HU)で物理量として標準化されている(水=0、空気=−1000、皮質骨=+1000以上)。だから閾値法が最もよく効く。骨と空気に強い。
CBCT——歯科・顎顔面で使う。被曝が少なく空間分解能が高いが、HU が正しく較正されていないので閾値をそのまま使えない。下顎再建の手術ガイドで扱うのはこれ。
MRI——水素核の緩和(T1・T2)を測る。値は装置と条件で変わり、絶対値の意味を持たないので閾値法が使えない。軟部組織のコントラストは最良。
超音波——反射を測る。実時間で安価だが、ノイズ(スペックル)と陰影が多く、自動分割は難しい。
核医学(PET/SPECT)——機能を映すが分解能が低いので、単独ではなく CT と重ねて使う。
要点は「値が物理量として標準化されているかどうか」——それが手法の選択を決める。

3Dプリント用の元データはほぼ CT か CBCTである。等方性のボクセル(スライス厚が面内解像度と同じ)で撮るほど、積み上げた表面が滑らかになる。スライス厚が段差(階段状アーチファクト)の原因。
English version
Core
CT — measures the attenuation of X-rays. The values are in Hounsfield units (HU) and are standardised as a physical quantity (water = 0, air = −1000, cortical bone above +1000). Hence thresholding works best here. Strong for bone and air.
CBCT — used in dentistry and maxillofacial work. Lower dose and high spatial resolution, but the HU are not properly calibrated, so a threshold cannot be used as it stands. This is what surgical guides for mandibular reconstruction use.
MRI — measures the relaxation of hydrogen nuclei (T1, T2). The values change with machine and conditions and have no absolute meaning, so thresholding cannot be used. The contrast of soft tissue is the best.
Ultrasound — measures reflection. Real-time and cheap, but full of noise (speckle) and shadowing, and automatic segmentation is difficult.
Nuclear medicine (PET/SPECT) — images function but has low resolution, so it is used overlaid on CT rather than alone.
The point is whether the values are standardised as a physical quantity — that is what decides the choice of method.
Going further
The source data for 3D printing are almost always CT or CBCT. The more nearly isotropic the voxels (slice thickness equal to the in-plane resolution), the smoother the stacked surface. Slice thickness is the cause of the staircase artefact.
手法の比較 — 何を選び、なぜそれが破れるか
閾値法 thresholding——HU の範囲で切る。速く再現性が高い。骨に最適。コントラストが無い境界では無力。
領域拡張 region growing——種を置いて似た画素へ広げる。連結性を保証できる。境界が漏れていると隣へ流れ出す(leakage)。
エッジ検出——勾配で境界を探す。ノイズに弱く、輪郭が途切れる。
変形モデル(スネーク・レベルセット)——曲面を滑らかに保ちながら境界へ収束させる。初期値に依存する。
アトラス法——標準の解剖を重ねる。変異が大きい症例で外れる。
深層学習(U-Net 系)——現在の主流。速くて精度が高いが、学習データに無いものに弱く、なぜそう分けたか説明できない。
共通の難所——①部分容積効果(1ボクセルに複数の組織が混ざる)②低コントラスト(軟部組織どうし)③金属アーチファクト④個体差と病変による変形⑤スライス厚による異方性⑥観察者間・観察者内のばらつき⑦正解(ground truth)が無い。
実務では単独では使わない——閾値で大枠を取り、領域拡張で連結を整え、最後は必ず人が断面を1枚ずつ直す。「半自動が標準」と答えるのが正確。
English version
Core
Thresholding — cutting by a range of HU. Fast and reproducible. Best for bone. Powerless at a boundary with no contrast.
Region growing — a seed is placed and spreads to similar pixels. It guarantees connectivity. If the boundary has a gap it leaks into the neighbour.
Edge detection — finding the boundary by gradient. Weak against noise, and the contour breaks up.
Deformable models (snakes, level sets) — converging on the boundary while keeping the surface smooth. They depend on the initial state.
Atlas methods — overlaying a standard anatomy. They fail in cases with large variation.
Deep learning (the U-Net family) — the present mainstream. Fast and accurate, weak on what was not in the training data, and unable to explain why it divided as it did.
The common difficulties — ① the partial volume effect (several tissues mixed in one voxel) ② low contrast (soft tissue against soft tissue) ③ metal artefact ④ individual variation and distortion by disease ⑤ anisotropy from slice thickness ⑥ inter- and intra-observer variation ⑦ there is no ground truth.
Going further
In practice none is used alone — thresholding takes the outline, region growing tidies the connectivity, and in the end a person corrects the slices one by one. "Semi-automatic is the standard" is the accurate answer.
診断・治療計画・研究・教育での価値
診断の精度——①体積を数えられる(腫瘍の体積、心室容積、肺の含気量)——大きさを「径」で語るより正確 ②断面では見えない立体的な関係が見える ③経時比較が定量的にできる ④読影者間のばらつきが減る。
治療計画——切除範囲と切離線を術前に決める、危険部位(血管・神経)との距離を測る、患者専用のガイドとインプラントを作る、放射線治療の照射野を作る、シミュレーションで手術時間を短縮する。
研究——大量の症例から形態の定量化ができ、ラジオミクス(画像から取り出した特徴量と予後の関連)や、深層学習の学習データそのものになる。
実例——下顎再建の手術ガイド(手術時間と適合精度が改善したという報告が多い)、先天性心疾患の術前モデル、肝切除の門脈支配域の計画、患者専用チタンインプラント。
教育と AR——立体を手に取って学べる。AR の限界は、視野が狭い・位置合わせ(レジストレーション)がずれる・臓器が動くと追随できない・装着の負担・滅菌の問題。「教育では有用だが、術中の実用は位置合わせの精度が壁」と整理できる。
体積や距離という数字が出ることが、セグメンテーションの最大の価値である。「見える」だけなら断面でも見えるが、「測れる」のは分けた後だけ。
English version
Core
Accuracy of diagnosis — ① volumes can be counted (tumour volume, ventricular volume, aerated lung) — more accurate than speaking of size by a diameter ② three-dimensional relations invisible on a section become visible ③ comparison over time becomes quantitative ④ variation between readers falls.
Treatment planning — deciding the extent and the lines of resection before the operation, measuring the distance to structures at risk (vessels, nerves), making patient-specific guides and implants, creating radiotherapy fields, shortening operating time by simulation.
Research — quantification of form across many cases, radiomics (the relation of image-derived features to prognosis), and the training data for deep learning itself.
Actual examples — surgical guides for mandibular reconstruction (operating time and fit are reported to improve), preoperative models of congenital heart disease, planning of portal territories in liver resection, patient-specific titanium implants.
Teaching and AR — solids can be picked up and learned from. The limits of AR are a narrow field of view, drift of registration, inability to follow a moving organ, the burden of wearing it, and sterilisation. Sum it up as "it is useful in teaching, and the accuracy of registration is the wall to use during surgery".
Going further
That numbers come out — volumes and distances — is the greatest value of segmentation. "Seeing" is possible on a section too; "measuring" is possible only after division.
AI・倫理・法規と、これから
AI の影響——手作業で数時間かかった分割が数十秒になった。U-Net 系が標準で、基盤モデル(SAM など)が汎用の方向へ進んでいる。不確実性を出力するモデルが臨床では重視される。
倫理と法——①個人情報——医用画像は個人データで、頭部CTは顔を復元できるため匿名化が難しい(GDPR)②説明と同意——研究利用・AI 学習への利用は別の同意が要る ③責任の所在——AI が誤って分けた結果で手術ガイドを作ったら誰の責任か ④規制——患者ごとの手術ガイドや埋植物は EU MDR の医療機器にあたり、CE マーキングと製造管理が要る。「大学の実習で作った物をそのまま患者に使うことはできない」が結論 ⑤学習データの偏り——特定の集団に偏ると他で精度が落ちる。
計算資源の壁——3Dの深層学習はメモリを大量に食う。対策はパッチ分割・モデルの軽量化(枝刈り・量子化・蒸留)・2.5D で近似・クラウドで推論(ただし個人情報の移転が問題)・院内共有のサーバ。
これから——対話的な修正(人が数点直すとモデルが再計算する)が現実解。完全自動より、人が最終判断を持つ半自動が臨床で受け入れられる。
AI のこれからはワークフローの問いでもある。「精度を上げる」だけでなく「臨床医の時間を減らすか」で評価すべきだ、と考えるのが的を射ている。
English version
Core
The impact of AI — a segmentation that took hours by hand now takes tens of seconds. The U-Net family is standard, and foundation models (SAM and others) are moving towards the general. Models that output their uncertainty are valued clinically.
Ethics and law — ① personal data — medical images are personal data, and a head CT can reconstruct the face, so anonymisation is difficult (GDPR) ② explanation and consent — use in research and for training AI needs separate consent ③ where responsibility lies — who is responsible if a surgical guide is made from an AI’s mis-segmentation ④ regulation — patient-specific surgical guides and implants are medical devices under the EU MDR and require CE marking and manufacturing control. "Something made in a university practical cannot be used on a patient as it is" is the conclusion ⑤ bias in the training data — skewed to one population, the accuracy falls in others.
The wall of computing resources — 3D deep learning consumes a great deal of memory. The countermeasures are patch-based division, lightening the model (pruning, quantisation, distillation), approximating in 2.5D, inference in the cloud (with the problem of transferring personal data), and a shared server within the hospital.
What is coming — interactive correction (a person fixes a few points and the model recomputes) is the realistic answer. Semi-automatic with the person keeping the final judgement is accepted clinically, rather than full automation.
Going further
What is coming for AI is also a question about workflow. Holding that it should be assessed "by whether it reduces the clinician’s time" rather than only by accuracy is to the point.
まとめ
| セグメンテーションの原理と限界 | セグメンテーション=医用画像のボクセル1つ1つを「対象/背景」に振り分けること。 |
|---|---|
| 画像から何を作るのか — 4つの工程 | 工程を混同しないことが、この章の一番の要点。 |
| 撮像装置ごとの違い — 何が画像になっているのか | CT——X線の減弱を測る。値は Hounsfield 単位(HU)で物理量として標準化されている(水=0、空気=−1000、皮質骨=+1000以上)。 |
| 手法の比較 — 何を選び、なぜそれが破れるか | 閾値法 thresholding——HU の範囲で切る。 |
| 診断・治療計画・研究・教育での価値 | 診断の精度——①体積を数えられる(腫瘍の体積、心室容積、肺の含気量)——大きさを「径」で語るより正確 ②断面では見えない立体的な関係が見える ③経時比較が定量的にできる ④読影者間… |
| AI・倫理・法規と、これから | AI の影響——手作業で数時間かかった分割が数十秒になった。 |
このノートは医学生が授業の内容を自分の言葉でまとめたもので、診療の判断に使うものではありません。誤りに気づいたらお知らせください。

