- Acquire your 3D image and use segmentation tools to segment the region of interest containing the structure you are interested in.
- Generate mesh. In MATLAB you can use “generateMesh” for that.
- Use the transformation matrix to transform the pixel coordinates from the image space to the mesh space.
How to go from a coordinate in a 3D slicer software to a coordinate on the new STL
조회 수: 8 (최근 30일)
이전 댓글 표시
I was wanting to take a 3D image and use a 3D slicer tool (ITKSNAP, 3D Object Slicer, or any other reccomended software) to obtain a new mesh file.
How could I design a pipeline to go from a coordinate of a specific pixel in a 3D image to identifying the coordinates of the same pixel on a mesh generated from the original 3D image?
Thanks
댓글 수: 0
답변 (1개)
Anurag
2023년 11월 24일
Hi Andrew,
I understand that you want to generate and identify the coordinates of 3D of pixels on a mesh generated from the original 3D image.
Refer to the pipeline below for doing the same:
Example in MATLAB using NIfTL Header information:
% Load NIfTI image
image = load_nii('path/to/your/image.nii');
% Voxel coordinates
voxel_coords = [i, j, k];
% Apply transformation to get physical world coordinates
world_coords = image.hdr.hist.qform * [voxel_coords, 1]';
In this example, image.hdr.hist.qform is the transformation matrix stored in the NIfTI header.
"World_coords" now represent the physical world coordinates.
Hope this helps!
Regards,
Anurag
Please refer to the below documentation to know more about the “generateMesh” and further readings:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!