Thanks Yixun! Can you guide me how to show the volume in x, y and z planes and get the intensity?<br><br>Thanks for all your help.<br><br>Ashish<br><br><div><span class="gmail_quote">On 9/18/06, <b class="gmail_sendername">
Yixun Liu</b> <<a href="mailto:yxliu@fudan.edu.cn">yxliu@fudan.edu.cn</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div bgcolor="#ffffff">
<div><font face="Bookman Old Style">You can show the volume in x,y and z slice
and move the mouse on the specific tissue. The intensity below the mouse will be
shown.</font></div>
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style">AddPoint will build a interpolation
function. For example,</font></div>
<div><font face="Bookman Old Style">tfun->AddPoint(100,0.0);</font></div>
<div><font face="Bookman Old Style">tfun->AddPoint(200,0.0);</font></div>
<div><font face="Bookman Old Style">tfun->AddPoint(300,1.0);</font></div>
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style">The tissue with intensity between(100,200)
will be transparent, which menas that this tissue will not be shown. The tissue
with intensity(200,300) will be shown.</font></div></div><div><span class="sg">
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style">Yixun</font></div>
</span></div><div><blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"></blockquote></div><div><span class="q">
<div>----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><b>From:</b>
<a title="mrasingh@gmail.com" href="mailto:mrasingh@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Ashish Singh</a>
</div></span></div><div><span class="e" id="q_10dc1822bdd2eafa_4">
<div><b>To:</b> <a title="yxliu@fudan.edu.cn" href="mailto:yxliu@fudan.edu.cn" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Yixun Liu</a> ; <a title="vtkusers@vtk.org" href="mailto:vtkusers@vtk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
VTK</a> </div>
<div><b>Sent:</b> Monday, September 18, 2006 10:58
PM</div>
<div><b>Subject:</b> Re: [vtkusers] Re: Re: Re: Creating
a Volume from 2D BMP files.</div>
<div><br></div>Thanks Yixun,<br><br>(1) Is there a way to find out the
intensity range of the tissue? <br>(2) Also what does the AddPoint Function
does and what do the numerical values
represent?<br><br>Thanks,<br>Ashish<br><br>
<div><span class="gmail_quote">On 9/18/06, <b class="gmail_sendername">Yixun
Liu</b> <<a href="mailto:yxliu@fudan.edu.cn" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">yxliu@fudan.edu.cn</a>>
wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div bgcolor="#ffffff">
<div><font face="Bookman Old Style">Yes, you firstly need to know the
intensity range of the tissue. For example, if the range of the heart is
between 100 and 500 and its color is red you can </font></div>
<div><font face="Bookman Old Style">ctfun->AddRGBPoint(100.0,1.0,0.0,0.0);</font></div>
<div><font face="Bookman Old Style">ctfun->AddRGBPoint(500.0,1.0,0.0,0.0);</font></div></div>
<div><span>
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style">Yixun</font></div></span></div>
<div><span>
<div><font face="Bookman Old Style"></font> </div>
<div>----- Original Message ----- </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><b>From:</b>
<a title="mrasingh@gmail.com" href="mailto:mrasingh@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Ashish Singh</a> </div>
<div><b>To:</b> <a title="yxliu@fudan.edu.cn" href="mailto:yxliu@fudan.edu.cn" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Yixun Liu</a> ; <a title="amy.squillacote@kitware.com" href="mailto:amy.squillacote@kitware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Amy
Squillacote</a> ; <a title="sharwari@gmail.com" href="mailto:sharwari@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Sharwari Mavalankar</a> ;
<a title="vtkusers@vtk.org" href="mailto:vtkusers@vtk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">VTK</a> </div>
<div><b>Sent:</b> Monday, September 18, 2006 10:35 PM</div>
<div><b>Subject:</b> Re: [vtkusers] Re: Re: Re: Creating a Volume from 2D
BMP files.</div>
<div><br></div>Thanks Yixun. I tried the few lines of code that you
suggested to color the volume. With the numerical values that you used my
volume looks reddish pink in color. I was wondering if anyone can tell me
what the numerical values in functions AddPoint and AddRGBPoint, mean. How
do we choose what numerical values to use? My volume is of the abdominal
region, showing: the heart, intestines, rib cage, kidneys etc. Can I use
different colors or shades to display each organ? How to do it?
<br><br>Thanks,<br>Ashish<br><br>
<div><span class="gmail_quote">On 9/15/06, <b class="gmail_sendername">Yixun
Liu</b> <<a href="mailto:yxliu@fudan.edu.cn" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">yxliu@fudan.edu.cn</a>>
wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div bgcolor="#ffffff">
<div><font face="Bookman Old Style">Hi,</font></div>
<div><font face="Bookman Old Style">You can use </font><font face="Bookman Old Style"> vtkPiecewiseFunction *tfun =
vtkPiecewiseFunction::New() to show what you want to show and
use vtkColorTransferFunction *ctfun =
vtkColorTransferFunction::New() to color it. For example,</font></div>
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style"> vtkPiecewiseFunction *tfun =
vtkPiecewiseFunction::New();<br> vtkColorTransferFunction *ctfun =
vtkColorTransferFunction::New();<br></font><font face="Bookman Old Style"> vtkVolumeProperty *volumeProperty =
vtkVolumeProperty::New();<br></font></div>
<div><font face="Bookman Old Style">//the non-zero zone intepolate by
the tfun will be shown</font></div>
<div><font face="Bookman Old Style">tfun->AddPoint(100.0,0.0);<br>tfun->AddPoint(200.0,1.0);<br>tfun->AddPoint(500.0,1.0);<br>tfun->AddPoint(510.0,0.0);<br>//
<br>//color the volume accroding to the
ctfun <br>ctfun->AddRGBPoint(100.0,1.0,0.16,0.18);<br>ctfun->AddRGBPoint(200.0,1.0,0.94,0.85);<br>ctfun->AddRGBPoint(500.0,1.0,0.8,0.98);<br>ctfun->AddRGBPoint(510.0,1.0,0.63,0.27);</font></div>
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style"> volumeProperty->SetColor(ctfun);<br> volumeProperty->SetScalarOpacity(tfun);<br> </font><font face="Bookman Old Style"> <br> volume->SetProperty(volumeProperty);<br></font>
</div>
<div><br></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"></blockquote></div>
<div><span>
<div>----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><b>From:</b>
<a title="mrasingh@gmail.com" href="mailto:mrasingh@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Ashish Singh</a>
</div></span></div>
<div><span>
<div><b>To:</b> <a title="yxliu@fudan.edu.cn" href="mailto:yxliu@fudan.edu.cn" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Yixun Liu</a> ; <a title="vtkusers@vtk.org" href="mailto:vtkusers@vtk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
VTK</a> ; <a title="sharwari@gmail.com" href="mailto:sharwari@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Sharwari Mavalankar</a> ;
<a title="amy.squillacote@kitware.com" href="mailto:amy.squillacote@kitware.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Amy
Squillacote</a> </div>
<div><b>Sent:</b> Saturday, September 16, 2006 12:07 AM</div>
<div><b>Subject:</b> Re: [vtkusers] Re: Re: Re: Creating a Volume from
2D BMP files.</div>
<div><br></div></span></div>
<div><span>Hi Yixun,<br><br>My code is exactly same as I posted in my
previous message. The only changes I made were for setdirectoryname and
vtkfixedpointvolumeraycastmapper. After that I was getting a rectangular
box with only images on 2 sides. But now I have added the opacity term
as in one of your previous messages and I can see the whole volume. It
is working fine now. <br>You can try the code, it is there in one of my
previous post. It will be difficult for me to send the dicom
images, the dataset is just too big, but it should work on any dicom
series.<br><br>Is there a way to color the volume and see different
things in different colors in the rendered volume? If anyone knows how
to do it, plz let me know. <br><br>Thanks,<br>Ashish<br><br>
<div><span class="gmail_quote">On 9/14/06, <b class="gmail_sendername">Yixun
Liu</b> <<a href="mailto:yxliu@fudan.edu.cn" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">yxliu@fudan.edu.cn</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div bgcolor="#ffffff">
<div><font face="Bookman Old Style">You can send you code and image to
me. I will give a test.</font></div></div>
<div><span>
<div><font face="Bookman Old Style"></font> </div>
<div><font face="Bookman Old Style">Yixun</font></div></span></div>
<div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"></blockquote></div></div></blockquote></div><br></span></div>
<div></div></div></blockquote></div><br></blockquote></span></div>
<div></div></div></blockquote></div><br></span></div><div></div>
</div></blockquote></div><br>