Adjust Label after resampling medical volume

3 ビュー (過去 30 日間)
Odo Luo
Odo Luo 2022 年 11 月 14 日
コメント済み: Odo Luo 2022 年 11 月 21 日
I resampled a medical volume (nifti) following these instructions:
ctFile=medicalVolume('E:\git\maskRCNN\norm\LD\case_00167.nii.gz');
targetVoxelSize=[3.11 1.59 1.59];
ratios = targetVoxelSize ./ ctFile.VoxelSpacing;
origSize = size(ctFile.Voxels);
newSize = round(origSize ./ ratios);
origRef = ctFile.VolumeGeometry;
origMapping = intrinsicToWorldMapping(origRef);
tform = origMapping.A;
newMapping4by4 = tform.* [ratios([2 1 3]) 1];
newMapping = affinetform3d(newMapping4by4);
newRef = medicalref3d(newSize,newMapping);
newRef = orient(newRef,origRef.PatientCoordinateSystem);
newCTFile = resample(ctFile,newRef,Method='linear');
write(newCTFile,"E:\git\maskRCNN\norm\LD\case_00167");
ctFile is an image with Voxels 512x512,103 , taken from the kits19 challenge (https://github.com/neheller/kits19/tree/master/data)
However, the label (also a nifti file) that marked a organ on the original image (ctFile), does not mark the same area on the new, resampled image (newCTFile). I assume I need to tranform the label too. How do I do that?
  1 件のコメント
cr
cr 2022 年 11 月 14 日
Please consider providing more information like data sizes, code etc for community to be able to understand and possibly answer.

サインインしてコメントする。

採用された回答

Harsha
Harsha 2022 年 11 月 18 日
Hi Odo Luo
Consider the Labels Nifti files also as a medical volume and apply all the transformations(that are performed on the CT file) as given in the link mentioned by you.
  1 件のコメント
Odo Luo
Odo Luo 2022 年 11 月 21 日
Thank you !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by