0

として 3D ボリュームがitkImage<unsigned char, 3>あり、それを DICOM シリーズとして保存したいと考えています。シリーズの保存は今のところ機能しますが、メタデータ タグ "Image Position Patient" と "Image Orientation Patient" は dicom ファイルに保存されません。他のすべてのタグは正しく保存されます。

メタデータ ディクショナリをコンソールに出力すると、これらのタグが正しく出力されます。ITK-SNAP でファイルを開くと、これら 2 つのタグが失われています。

0010|0010 患者

0010|0020 12345

0020|0032 0\0\0

0020|0037 1\0\0\0\1\0

これは、これらのタグがメタデータに格納されるコードの一部です。実際の例で要点を作成しました。

UC3ImageType::PointType position;
UC3ImageType::IndexType index;
index[0] = 0;
index[1] = 0;
index[2] = f;
image->TransformIndexToPhysicalPoint(index, position);
value.str("");
value << position[0] << "\\" << position[1] << "\\" << position[2];
itk::EncapsulateMetaData<std::string>(*dictionary, "0020|0032", value.str());
value.str("");
value << position[2];
itk::EncapsulateMetaData<std::string>(*dictionary, "0020|1041", value.str());

itk::EncapsulateMetaData<std::string>(*dictionary, "0020|0037", "1\\0\\0\\0\\1\\0");

このコードの何が問題になっていますか? これらのタグも保存されるように、必要な他のタグはありますか?

4

1 に答える 1