フィルターのクリア

Using tform from pcregistercpd to move another pointcloud

6 ビュー (過去 30 日間)
Vignesh
Vignesh 2023 年 10 月 12 日
回答済み: Milan Bansal 2023 年 11 月 15 日
Hi,
I have two pointclouds of prostate gland (from contours of ultasound and CT) and used pcregistercpd to register the pointclouds. Now, I need to the bring the lesions (pointcloud) from CT space to the merged space (ultrasound). I tried using pctransform. However, it requires the displacement field and the Location property of the pointcloud to be of same size which is not true in my case.
I am attaching image for your reference. The top left image is point cloud from contour of ultrasound prostate and the top right image is point cloud from contour of CT prostate. The left bottom image is merged PCs with pointcloud of lesion far away.
My aim is to move the lesion to the merged pointcloud non-rigidly. Please let me know which technique I can use to use tform to move the lesion pointcloud to the merged pointcloud.
Thanks,
Vignesh

回答 (1 件)

Milan Bansal
Milan Bansal 2023 年 11 月 15 日
Hi Vignesh,
It is my understanding that you are using "pcregistercpd" to register the point clouds and then want to use the obtained "tform" to bring the lesions from CT space to the merged space but the size of displacement field in the "tform" and "location" property of the lesion does not match.
The "pcregistercpd" function when used for non-rigid transformation returns the "tform" with the dimensions equal to the dimensions of the "location" property of the moving point cloud (lesions from CT in this case) which was passed in the function. If the fixed and moving point clouds were downsampled before passing into the "pcregistercpd" function, then the "tform" returned will be according to the downspamled moving point cloud and therefore will have different dimensions than the "location" property of the orginal moving point cloud. As a result, the down sampled "tform" cannot be used to bring down the lesions from CT into the merged space using "pctransform" function.
To overcome this issue, avoid downsampling the point clouds before passing them in the "pcregistercpd" function. Please refer to the below code snippet that illustrates the workflow.
% read the point clouds
fixedPc = pcread("ultrasoundPC.pcd");
movingPc = pcread("CTPc.pcd");
% non-rigid registration without downsampling
tform = pcregistercpd(movingPc,fixedPc);
% transform the moving point cloud
movingTransformed = pctransform(movingPc,tform);
Alternatively, set the "Transform" property of the "pcregistercpd" function as "Rigid and get rigid "tform" by passing downsampled point clouds into the function. The obtained rigid "tform" can be used to transform the original moving point cloud (lesion from CT) using "pctransform". Please refer to the below code snippet that illustrated the workflow.
% read the point clouds
fixedPc = pcread("ultrasoundPC.pcd");
movingPc = pcread("CTPc.pcd");
% downsample the point clouds
movingDownsampled = pcdownsample(movingPc,'gridAverage',0.03);
fixedDownsampled = pcdownsample(fixedPc,'gridAverage',0.03);
% non-rigid registration without downsampling
tform = pcregistercpd(movingPc,fixedPc, Transform = "Rigid");
% transform the moving point cloud
movingTransformed = pctransform(movingPc,tform);
Refer to the documentation to learn more about "pcregistercpd" function.
Hope it helps!

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by