[vtkusers] Re: Re: Re: Creating a Volume from 2D BMP files.
Ashish Singh
mrasingh at gmail.com
Tue Sep 19 08:59:23 EDT 2006
Thanks Yixun. This is similar to what I want to do. Can you guide me with
the coding for this? What class do I need to use to show x,y,z slices and
display them as you showed in the picture?
Thanks,
Ashish
On 9/18/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
>
> Hi,
>
> You can do this like the attached picture. The x ,y and z slices are shown
> in the right corner.
>
> Yixun
>
> ----- Original Message -----
> *From:* Ashish Singh <mrasingh at gmail.com>
> *To:* Yixun Liu <yxliu at fudan.edu.cn> ; VTK <vtkusers at vtk.org>
> *Sent:* Monday, September 18, 2006 11:47 PM
> *Subject:* Re: [vtkusers] Re: Re: Re: Creating a Volume from 2D BMP files.
>
> Thanks Yixun! Can you guide me how to show the volume in x, y and z planes
> and get the intensity?
>
> Thanks for all your help.
>
> Ashish
>
> On 9/18/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
> >
> > 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.
> >
> > AddPoint will build a interpolation function. For example,
> > tfun->AddPoint(100,0.0);
> > tfun->AddPoint(200,0.0);
> > tfun->AddPoint(300,1.0);
> >
> > 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.
> >
> > Yixun
> >
> > ----- Original Message -----
> > *From:* Ashish Singh <mrasingh at gmail.com>
> > *To:* Yixun Liu <yxliu at fudan.edu.cn> ; VTK <vtkusers at vtk.org>
> > *Sent:* Monday, September 18, 2006 10:58 PM
> > *Subject:* Re: [vtkusers] Re: Re: Re: Creating a Volume from 2D BMP
> > files.
> >
> > Thanks Yixun,
> >
> > (1) Is there a way to find out the intensity range of the tissue?
> > (2) Also what does the AddPoint Function does and what do the numerical
> > values represent?
> >
> > Thanks,
> > Ashish
> >
> > On 9/18/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
> > >
> > > 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
> > > ctfun->AddRGBPoint(100.0,1.0,0.0,0.0);
> > > ctfun->AddRGBPoint(500.0,1.0,0.0,0.0);
> > >
> > > Yixun
> > >
> > > ----- Original Message -----
> > >
> > > *From:* Ashish Singh <mrasingh at gmail.com>
> > > *To:* Yixun Liu <yxliu at fudan.edu.cn> ; Amy Squillacote<amy.squillacote at kitware.com>; Sharwari
> > > Mavalankar <sharwari at gmail.com> ; VTK <vtkusers at vtk.org>
> > > *Sent:* Monday, September 18, 2006 10:35 PM
> > > *Subject:* Re: [vtkusers] Re: Re: Re: Creating a Volume from 2D BMP
> > > files.
> > >
> > > 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?
> > >
> > > Thanks,
> > > Ashish
> > >
> > > On 9/15/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
> > > >
> > > > Hi,
> > > > You can use vtkPiecewiseFunction *tfun =
> > > > vtkPiecewiseFunction::New() to show what you want to show and
> > > > use vtkColorTransferFunction *ctfun = vtkColorTransferFunction::New() to
> > > > color it. For example,
> > > >
> > > >
> > > >
> > > > vtkPiecewiseFunction *tfun = vtkPiecewiseFunction::New();
> > > > vtkColorTransferFunction *ctfun = vtkColorTransferFunction::New();
> > > > vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New();
> > > > //the non-zero zone intepolate by the tfun will be shown
> > > > tfun->AddPoint(100.0,0.0);
> > > > tfun->AddPoint(200.0,1.0);
> > > > tfun->AddPoint(500.0,1.0);
> > > > tfun->AddPoint(510.0,0.0);
> > > > //
> > > > //color the volume accroding to the ctfun
> > > > ctfun->AddRGBPoint(100.0,1.0,0.16,0.18);
> > > > ctfun->AddRGBPoint(200.0,1.0,0.94,0.85);
> > > > ctfun->AddRGBPoint(500.0,1.0,0.8,0.98);
> > > > ctfun->AddRGBPoint(510.0,1.0,0.63,0.27);
> > > >
> > > > volumeProperty->SetColor(ctfun);
> > > > volumeProperty->SetScalarOpacity(tfun);
> > > >
> > > > volume->SetProperty(volumeProperty);
> > > >
> > > > ----- Original Message -----
> > > > *From:* Ashish Singh <mrasingh at gmail.com>
> > > > *To:* Yixun Liu <yxliu at fudan.edu.cn> ; VTK <vtkusers at vtk.org> ; Sharwari
> > > > Mavalankar <sharwari at gmail.com> ; Amy Squillacote<amy.squillacote at kitware.com>
> > > > *Sent:* Saturday, September 16, 2006 12:07 AM
> > > > *Subject:* Re: [vtkusers] Re: Re: Re: Creating a Volume from 2D BMP
> > > > files.
> > > >
> > > > Hi Yixun,
> > > >
> > > > 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.
> > > > 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.
> > > >
> > > > 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.
> > > >
> > > > Thanks,
> > > > Ashish
> > > >
> > > > On 9/14/06, Yixun Liu <yxliu at fudan.edu.cn> wrote:
> > > > >
> > > > > You can send you code and image to me. I will give a test.
> > > > >
> > > > > Yixun
> > > > >
> > > > >
> > > >
> > >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060919/7540844d/attachment.htm>
More information about the vtkusers
mailing list