[Paraview] [ParaView] How to add thickness to each slice when generating a 3D model
Moreland, Kenneth
kmorel at sandia.gov
Tue May 10 14:38:17 EDT 2016
Chathuri Gunasekera,
(Responding back to ParaView list to allow others to see and comment.)
1. I’m not sure why you are not see the 3 holes you expect in your mask. It looks like most of your process is building the data in MATLAB. Perhaps something is going wrong there. ParaView must be recognizing the mask since the region outside of the external boundary is removed. Are you sure your three holds are represented in the mask?
2. It sounds like you are finding the mask boundary in a slice. A slice is by definition contained in a 2D plane. You can restore the 2mm thickness manually by running the Extract Surface filter and then the Linear Extrusion filter.
-Ken
From: Chathuri Gunasekera <cgunases at gmail.com>
Date: Tuesday, May 10, 2016 at 12:03 PM
To: Kenneth Moreland <kmorel at sandia.gov>
Subject: [EXTERNAL] Re: [Paraview] [ParaView] How to add thickness to each slice when generating a 3D model
Hi Ken,
Your detailed description is very much appreciated. Thank you so much.
Kindly note that following is what i have done in MatLab :
a. Segmented images as Masks (just x,y cordinates)
b. Saved as a .mat file
c. Then append z coordinate( z coordinate is the slice thickness which, each slice has a thickness of 2mm) to the above said mask. Hence, now the image is 3D (saved as .mat file)
d. Convert the 3D image into real world coordinates . So x,y,z all are in mm now. (saved as .mat file)
e. Since i have about 8 sets and about 50 images per set. Then find the smallest dimension for a particular set.
f. Crop the image (saved as .mat file)
g. Stack the image (saved as .mat file)
h. Finally convert the .mat file to .vtk file
i. Then open the .vtk files in Paraview
Let me send you 2 outputs which i have obtained so far
1. segmented masked images. I prefer this method because this image looks close to my expectation(i expect a 3D model). Also i have 3 more masks which represent 3 more features inside the big mask (meaning i expect 3 holes inside the big image). But i simply cannot see the 3 holes inside this big mask. What mistake i am doing here? Why can't i see the 3 holes inside the big mask.
2. segmented masked --> converted RGB image to binary and then find the boundary of the mask. So the reason for why i asked the thickness is that for this output i can't see the 2mm thickness .
Kindly note that in order to obtain above output i have used couple of masks(slices) and stacked them together.
Your assistance is really appreciated here as i was struggling to get a proper 3D model for sometime now and all my efforts are not succeeded yet.
Thank you.
--
Warm regards,
Chathuri Gunasekera.
On Tue, May 10, 2016 at 9:50 PM, Moreland, Kenneth <kmorel at sandia.gov<mailto:kmorel at sandia.gov>> wrote:
I think we need more information before we can answer your questions.
Your first question was how to “add thickness” to image slices. If you have image slices, you usually want to load them in as a 3D stack and treat them like a volume. The spacing between the slices is typically specified by the data file itself or by an option in the reader (of which there are almost 100 different types in ParaView). So how you do that depends on your data format.
You simply said that your data comes from MATLAB. That’s not very specific, since it is possible to output lots of different types of files from MATLAB. If you are not doing it yet, you might consider this MATLAB module that writes out VTK files (which ParaView handles very well): http://www.mathworks.com/matlabcentral/fileexchange/47814-export-3d-data-to-paraview-in-vtk-legacy-file-format . I haven’t used it myself (I use MATLAB very infrequently), but it looks pretty full featured. You might want to check that out.
You also mentioned that the image segmentation is represented by masks. The easiest way to deal with that is probably to use the Threshold filter to remove all cells that are masked out.
-Ken
From: ParaView <paraview-bounces at paraview.org<mailto:paraview-bounces at paraview.org>> on behalf of Chathuri Gunasekera <cgunases at gmail.com<mailto:cgunases at gmail.com>>
Date: Tuesday, May 10, 2016 at 4:49 AM
To: ParaView <paraview at paraview.org<mailto:paraview at paraview.org>>
Subject: [EXTERNAL] Re: [Paraview] [ParaView] How to add thickness to each slice when generating a 3D model
Also,i need to mention that segmented images are saved as Masks.
Kindly tell me, when using Paraview software should i have to use the boundary or the mask of the segmented image for the purpose of building a 3D model. (kindly correct me, if i am wrong as i am new to Paraview)
Hope to hear from you soon.
Thank you.
On Tue, May 10, 2016 at 2:53 PM, Chathuri Gunasekera <cgunases at gmail.com<mailto:cgunases at gmail.com>> wrote:
Hello everyone,
My goal is to generate a 3D model of human organ.
Suppose i have segmented images in each set(each slice is saved using MatLab software).
So i want to know what are the options which paraview have in order to add the thickness to each slice.
Your feedback is appreciated.
--
Warm regards,
Chathuri Gunasekera.
--
Warm regards,
Chathuri Gunasekera.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160510/632aec5c/attachment.html>
More information about the ParaView
mailing list