

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# AWS HealthImaging 像素資料驗證
<a name="pixel-data-verification"></a>

在匯入期間，HealthImaging 透過檢查每個映像的無失真編碼和解碼狀態，提供內建像素資料驗證。此功能可確保使用 [ HTJ2K 解碼程式庫解碼](reference-libraries.md)的影像一律符合匯入 HealthImaging 的原始 DICOM P10 影像。
+ 當匯入任務在匯入之前擷取 DICOM P10 映像的原始像素品質狀態時，映像加入程序就會開始。使用 CRC32 演算法為每個影像產生唯一的不可變影像影格解析度檢查總和 (IFRC)。IFRC 檢查總和值會顯示在`job-output-manifest.json`中繼資料文件中。如需詳細資訊，請參閱[了解匯入任務](understanding-import-jobs.md)。
+ 將影像匯入 HealthImaging [資料存放區](getting-started-concepts.md#concept-data-store)並轉換為[影像集](getting-started-concepts.md#concept-image-set)後，HTJ2K-encoded[的影像影格](getting-started-concepts.md#concept-image-frame)會立即解碼，並計算新的 IFRCs。HealthImaging 接著會將原始影像的完整解析度 IFRCs與匯入影像影格的新 IFRCs進行比較，以驗證準確性。
+ 匯入任務輸出日誌 (`job-output-manifest.json`) 中會擷取對應的每個影像描述性錯誤條件，供您檢閱和驗證。

**驗證像素資料**

1. 匯入醫療影像資料後，請檢視匯入任務輸出日誌 中擷取的每個影像集描述性成功 （或錯誤條件）`job-output-manifest.json`。如需詳細資訊，請參閱[了解匯入任務](understanding-import-jobs.md)。

1. [影像集](getting-started-concepts.md#concept-image-set)由[中繼資料](getting-started-concepts.md#concept-metadata)和[影像影格](getting-started-concepts.md#concept-image-frame) （像素資料） 組成。影像集中繼資料包含關聯影像影格的相關資訊。使用 `GetImageSetMetadata`動作來取得映像集的中繼資料。如需詳細資訊，請參閱[取得映像集中繼資料](get-image-set-metadata.md)。

1. `PixelDataChecksumFromBaseToFullResolution` 包含完整解析度影像的 IFRC （檢查總和）。對於存放在原始傳輸語法 1.2.840.10008.1.2.4.203、1.2.840.10008.1.2.4.91、1.2.840.10008.1.2.4.50 和 1.2.840.10008.1.2.1 （僅限二進位分段） 中的影像，檢查總和會計算在原始影像上。對於存放在 HTJ2K Lossless with RPCL 中的影像，檢查總和會在解碼的全解析度影像上計算。如需詳細資訊，請參閱[支援的傳輸語法](supported-transfer-syntaxes.md)。

   以下是 IFRC 的範例中繼資料輸出，這是匯入任務程序的一部分產生並記錄至 `job-output-manifest.json`。

   ```
   "ImageFrames": [{
   "ID": "67890678906789012345123451234512",
   "PixelDataChecksumFromBaseToFullResolution": [
   {
       "Width": 512,
       "Height": 512,
       "Checksum": 2510355201
   }
   ]
   ```

   對於存放在原始傳輸語法 1.2.840.10008.1.2.4.203、1.2.840.10008.1.2.4.91、1.2.840.10008.1.2.4.50 和 1.2.840.10008.1.2.1 （僅限二進位分段） 中的影像， `MinPixelValue`和 `MaxPixelValue` 將無法使用。`FrameSizeInBytes` 表示原始影格的大小。

   ```
   "PixelDataChecksumFromBaseToFullResolution": [
      {"Width": 512, "Height": 512, "Checksum": 1379921327 }
   ],
   "MinPixelValue": null,
   "MaxPixelValue": null,
   "FrameSizeInBytes": 429
   ```

   對於存放在 HTJ2K Lossless with RPCL 中的影像， `FrameSizeInBytes`表示解碼影像影格的大小。

   ```
   "PixelDataChecksumFromBaseToFullResolution": [
      {"Width": 512, "Height": 512, "Checksum": 1379921327 }
   ],
   "MinPixelValue": 11,
   "MaxPixelValue": 11,
   "FrameSizeInBytes": 1652
   ```

1. 對於包含視訊的執行個體，HealthImaging 會執行輕量型轉碼器驗證，以驗證 DICOM 中繼資料中指定的傳輸語法是否符合視訊轉碼器。

   HealthImaging 會使用 CRC32 演算法，在原始影片物件上計算 IFRC 檢查總和值。IFRC 檢查總和值會記錄到 `job-output-manifest.json`，並保留在 HealthImaging 中繼資料中。如同存放在原始傳輸語法中的映像 （如上所述）， `MinPixelValue`和 `MaxPixelValue` 將無法使用。FrameSizeInBytes 指出原始影格的大小。

1. HealthImaging 會驗證像素資料、存取 GitHub 上的[像素資料驗證](https://github.com/aws-samples/aws-healthimaging-samples/tree/main/pixel-data-verification)程序，並遵循 檔案中`README.md`的指示，以獨立驗證 HealthImaging 所使用的各種 [影像影格解碼程式庫](reference-libraries.md)的無失真映像處理。載入完整映像後，您可以計算您端原始輸入資料的 IFRC，並將其與 HealthImaging 中繼資料中提供的 IFRC 值進行比較，以驗證像素資料。