[Paraview] [ParaView] How to add thickness to each slice when generating a 3D model

Chathuri Gunasekera cgunases at gmail.com
Tue May 10 22:31:19 EDT 2016


Hi to all,

@ Ken, thank you so much for your response. Really admire it.

1. Yes, i am 100% certain that all the masks are called in.
But let me be more into detail.
Basically, i have: 1 big mask and 3 patches (which are also saved as
masks). Sorry Ken, i think i should have use patch instead of hole [ this
patch eventually represent some special features{but these features
eventually build up as tubes when it comes to a 3D model.} in a human organ
as i am trying to model a human organ itself ]. ANyhow, i am sorry if i
make you confuse.

You're right Ken, most of the stuff is done in MatLab but all the work
looks error-free(because it works fine atleast in MatLab). But i am skeptic
of one thing. Should i have to have a transparent big mask in order to see
the 3 patches inside the big mask?  Is that why , i don't see the patches ?
Kindly guide me.

2. I will try that out too.

Anyhow, thank you so much for your detailed response Ken. That is a great
help.


-- 
Warm regards,
Chathuri Gunasekera.




On Wed, May 11, 2016 at 12:08 AM, Moreland, Kenneth <kmorel at sandia.gov>
wrote:

> 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>
> 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> on behalf of Chathuri
> Gunasekera <cgunases at gmail.com>
> *Date: *Tuesday, May 10, 2016 at 4:49 AM
> *To: *ParaView <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>
> 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/20160511/0b261209/attachment.html>


More information about the ParaView mailing list