<div dir="ltr">Hi to all,<div> </div><div>@ Ken, thank you so much for your response. Really admire it.</div><div><br></div><div>1. Yes, i am 100% certain that all the masks are called in. </div><div>But let me be more into detail. </div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>2. I will try that out too.</div><div><br></div><div>Anyhow, thank you so much for your detailed response Ken. That is a great help.</div><div><br></div><div><br></div><div>-- <br><div class="gmail_signature">Warm regards,<div>Chathuri Gunasekera.</div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 12:08 AM, Moreland, Kenneth <span dir="ltr"><<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">Chathuri Gunasekera,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">(Responding back to ParaView list to allow others to see and comment.)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">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?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">-Ken<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"><u></u> <u></u></span></p>
<div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Chathuri Gunasekera <<a href="mailto:cgunases@gmail.com" target="_blank">cgunases@gmail.com</a>><br>
<b>Date: </b>Tuesday, May 10, 2016 at 12:03 PM<br>
<b>To: </b>Kenneth Moreland <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>></span></p><div><div class="h5"><br>
<b>Subject: </b>[EXTERNAL] Re: [Paraview] [ParaView] How to add thickness to each slice when generating a 3D model<u></u><u></u></div></div><p></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Hi Ken, <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Your detailed description is very much appreciated. Thank you so much.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Kindly note that following is what i have done in MatLab :<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">a. Segmented images as Masks (just x,y cordinates)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">b. Saved as a .mat file<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">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)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">d. Convert the 3D image into real world coordinates . So x,y,z all are in mm now. (saved as .mat file)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">e. Since i have about 8 sets and about 50 images per set. Then find the smallest dimension for a particular set.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">f. Crop the image (saved as .mat file)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">g. Stack the image (saved as .mat file)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">h. Finally convert the .mat file to .vtk file<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">i. Then open the .vtk files in Paraview<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Let me send you 2 outputs which i have obtained so far<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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 .<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Kindly note that in order to obtain above output i have used couple of masks(slices) and stacked them together.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<p class="MsoNormal">Warm regards, <u></u><u></u></p>
<div>
<p class="MsoNormal">Chathuri Gunasekera.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, May 10, 2016 at 9:50 PM, Moreland, Kenneth <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>> wrote:<u></u><u></u></p>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">I think we need more information before we can answer your questions.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">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.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">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):
<a href="http://www.mathworks.com/matlabcentral/fileexchange/47814-export-3d-data-to-paraview-in-vtk-legacy-file-format" target="_blank">
http://www.mathworks.com/matlabcentral/fileexchange/47814-export-3d-data-to-paraview-in-vtk-legacy-file-format</a> . I haven’t used it myself (I use MATLAB very infrequently), but it looks pretty full featured. You might want to check that out.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">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.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri">-Ken</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri"> </span><u></u><u></u></p>
<div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From:
</span></b><span style="font-family:Calibri;color:black">ParaView <<a href="mailto:paraview-bounces@paraview.org" target="_blank">paraview-bounces@paraview.org</a>> on behalf of Chathuri Gunasekera <<a href="mailto:cgunases@gmail.com" target="_blank">cgunases@gmail.com</a>><br>
<b>Date: </b>Tuesday, May 10, 2016 at 4:49 AM<br>
<b>To: </b>ParaView <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
<b>Subject: </b>[EXTERNAL] Re: [Paraview] [ParaView] How to add thickness to each slice when generating a 3D model</span><u></u><u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Also,i need to mention that segmented images are saved as Masks.
<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">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)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Hope to hear from you soon.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">On Tue, May 10, 2016 at 2:53 PM, Chathuri Gunasekera <<a href="mailto:cgunases@gmail.com" target="_blank">cgunases@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt">
<div>
<p class="MsoNormal">Hello everyone,
<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">My goal is to generate a 3D model of human organ.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Suppose i have segmented images in each set(each slice is saved using MatLab software).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">So i want to know what are the options which paraview have in order to add the thickness to each slice.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Your feedback is appreciated.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)"> </span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)"> </span><u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)"> </span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)">--
</span><u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)">Warm regards,
</span><u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)">Chathuri Gunasekera.</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal">--
<u></u><u></u></p>
<div>
<p class="MsoNormal">Warm regards,
<u></u><u></u></p>
<div>
<p class="MsoNormal">Chathuri Gunasekera.<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div><br>
</div></div>