[vtkusers] AW: vtkusers digest, Vol 1 #2156 - 7 msgs
Bernhard Pfeifer
bernhard.pfeifer at umit.at
Wed Oct 22 06:32:43 EDT 2003
Komm erst jetzt dazu . spiel ich heute noch ein
Lg bernhard
-----------------------------------------------------------------
Dipl.-Ing. Bernhard Pfeifer
Private Universität für Medizinische Informatik und Technik Tirol
Institut für Medizinische Signalverarbeitung und Bildgebung
Innrain 98
A-6020 Innsbruck
Österreich
Tel: +43-512-586734-817 (Sekretariat)
EMail: bernhard.pfeifer at umit.at
-----------------------------------------------------------------
-----Ursprüngliche Nachricht-----
Von: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] Im Auftrag
von vtkusers-request at vtk.org
Gesendet: Mittwoch, 22. Oktober 2003 09:55
An: vtkusers at vtk.org
Betreff: vtkusers digest, Vol 1 #2156 - 7 msgs
Send vtkusers mailing list submissions to
vtkusers at vtk.org
To subscribe or unsubscribe via the World Wide Web, visit
http://www.vtk.org/mailman/listinfo/vtkusers
or, via email, send a message with subject or body 'help' to
vtkusers-request at vtk.org
You can reach the person managing the list at
vtkusers-admin at vtk.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of vtkusers digest..."
Today's Topics:
1. lookup table with imageviewer and floatarray (alan .)
2. lookup table with imageviewer and floatarray (2) (alan .)
3. RE: lookup table with imageviewer and floatarray (2) (Xianjin
Yang)
4. Re: vtkusers digest, Vol 1 #2153 - 1 msg (Paul Tait)
5. RE: lookup table with imageviewer and floatarray (2) (alan .)
6. Solution: Bug in SetRenderWindow(NULL) (de Boer Ingo)
7. HELP vtkPointPicker question (xiaofeng qi)
--__--__--
Message: 1
From: "alan ." <lost_bits1110 at hotmail.com>
To: vtkusers at vtk.org
Date: Tue, 21 Oct 2003 21:54:44 +0000
Subject: [vtkusers] lookup table with imageviewer and floatarray
<html><div style='background-color:'><DIV>Hi, </DIV>
<DIV> </DIV>
<DIV>Trying once again - but does anyone know if its possible
to use a lookup table with vtkFloatArray, vtkImageData, and
vtkImageViewer..?</DIV>
<DIV> </DIV>
<DIV>basically the vtkFloatArray sets up the lookup table, and the float
array goes into the image data, and the image data is displayed by the
image viewer..</DIV>
<DIV> </DIV>
<DIV>for some reason i implemented it and i dont see any colors</DIV>
<DIV> </DIV>
<DIV>thanks</DIV>
<DIV> </DIV>
<DIV>alan</DIV></div><br clear=all><hr> <a
href="http://g.msn.com/8HMAENUS/2743??PS=">Enjoy MSN 8 patented spam
control and more with MSN 8 Dial-up Internet Service. Try it FREE for
one month! </a> </html>
--__--__--
Message: 2
From: "alan ." <lost_bits1110 at hotmail.com>
To: vtkusers at vtk.org
Date: Tue, 21 Oct 2003 21:59:12 +0000
Subject: [vtkusers] lookup table with imageviewer and floatarray (2)
<html><div style='background-color:'><DIV>Or if theres another way to
execute the pipeline..</DIV>
<DIV> </DIV>
<DIV>At the moment I use vtkFloatArray -> vtkImageData
-> vtkImageViewer..</DIV>
<DIV>(and FloatArray sets up the lookup table)</DIV>
<DIV> </DIV>
<DIV>but maybe the vtkImageViewer is the problem, so i can create a
vtkDataSetMapper, which takes in the vtkImageData</DIV>
<DIV>but then how do I render this..? I dont have any actors - just a
bunch of points (which came from a file of numbers)</DIV>
<DIV> </DIV>
<DIV>okay thank u again vtkusers</DIV>
<DIV> </DIV>
<DIV>one day i'll be the expert..!</DIV>
<DIV> </DIV>
<DIV>-alan.</DIV></div><br clear=all><hr> <a
href="http://g.msn.com/8HMAENUS/2728??PS=">Never get a busy signal
because you are always connected with high-speed Internet access. Click
here to comparison-shop providers.</a> </html>
--__--__--
Message: 3
From: Xianjin Yang <Yang at AGIUSA.COM>
To: vtkusers at vtk.org
Cc: "'alan .'" <lost_bits1110 at hotmail.com>
Subject: RE: [vtkusers] lookup table with imageviewer and floatarray (2)
Date: Tue, 21 Oct 2003 17:21:49 -0500
This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C39821.B8D62310
Content-Type: text/plain
Hi Alan,
To become an expert vtkuser, Check out this post
http://public.kitware.com/pipermail/vtkusers/2003-September/020191.html
<http://public.kitware.com/pipermail/vtkusers/2003-September/020191.html
>
As a beginning vtkuser, I rendered colored points with this kind of
pipeline.
.....
vtkPoints * pts = vtkPoints::New();
vtkCellArray * ca = vtkCellArray::New();
vtkPolyData * pd = vtkPolyData::New();
vtkFloatArray * scalars = vtkFloatArray ::New();
vtkPolyDataMapper * m = vtkPolyDataMapper::New();
vtkLookupTable *lut = vtkLookupTable::New();
vtkRenderer* ren = vtkRenderer::New();
vtkActor * a = vtkActor::New();
lut->SetNumberOfColors(N);
lut->Build();
for (i=0; i<N; ++i) lut->SetTableValue(i, R[i], G[i], B[i], A[i]);
for (i=0;i<n;i++)
{
pts->InsertNextPoint(x[i], y[i], z[i]);
ca->InsertNextCell(1);
ca->InsertCellPoint(i);
scalars->InsertNextTuple1(f[i]);
}
pd->SetPoints(pts);
pd->SetVerts(ca);
pd->GetPointData()->SetScalars(scalars);
m->SetLookupTable(lut);
m->SetInput(pd);
m->SetScalarRange(ScalarMin, ScalarMax);
a->SetMapper(m);
a->GetProperty()->SetPointSize(8);
ren->AddActor(a);
...
HTH
Yang
-----Original Message-----
From: alan . [mailto:lost_bits1110 at hotmail.com]
Sent: Tuesday, October 21, 2003 4:59 PM
To: vtkusers at vtk.org
Subject: [vtkusers] lookup table with imageviewer and floatarray (2)
Or if theres another way to execute the pipeline..
At the moment I use vtkFloatArray -> vtkImageData -> vtkImageViewer..
(and FloatArray sets up the lookup table)
but maybe the vtkImageViewer is the problem, so i can create a
vtkDataSetMapper,
which takes in the vtkImageData
but then how do I render this..? I dont have any actors - just a bunch
of points
(which came from a file of numbers)
okay thank u again vtkusers
one day i'll be the expert..!
-alan.
_____
Never get a busy signal because <http://g.msn.com/8HMAENUS/2728??PS=>
you are
always connected with high-speed Internet access. Click here to
comparison-shop
providers. _______________________________________________ This is the
private
VTK discussion list. Please keep messages on-topic. Check the FAQ at:
Follow
this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
------_=_NextPart_001_01C39821.B8D62310
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial =
color=3D#008000>Hi=20
Alan,</FONT></SPAN></DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000></FONT></SPAN> </DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial =
color=3D#008000>To become an=20
expert vtkuser, Check out this post</FONT></SPAN></DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial =
color=3D#008000><A=20
href=3D"http://public.kitware.com/pipermail/vtkusers/2003-September/0201
=
91.html">http://public.kitware.com/pipermail/vtkusers/2003-September/020
=
191.html</A></FONT></SPAN></DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000></FONT></SPAN> </DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial =
color=3D#008000>As a=20
beginning vtkuser, I rendered colored points with this kind of=20
pipeline.</FONT></SPAN></DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000></FONT></SPAN> </DIV>
<DIV><FONT face=3DArial color=3D#008000><SPAN=20
class=3D355490422-21102003>......</SPAN></FONT></DIV><FONT face=3DArial
=
color=3D#008000></FONT>
<DIV><FONT face=3DArial color=3D#008000></FONT><BR> vtkPoints * =
pts =3D=20
vtkPoints::New();<BR> vtkCellArray * ca =3D =
vtkCellArray::New();<BR> =20
vtkPolyData * pd =3D vtkPolyData::New();<BR> vtk<SPAN=20
class=3D355490422-21102003>Float</SPAN>Array * scalars =3D vtk<SPAN=20
class=3D355490422-21102003>Float</SPAN>Array =
::New();<BR>vtkPolyDataMapper * m =3D=20
vtkPolyDataMapper::New();<BR> vtkLookupTable *lut =3D=20
vtkLookupTable::New();</DIV>
<DIV>vtkRenderer* ren =3D vtkRenderer::New();<BR> vtkActor =
* a =3D=20
vtkActor::New();<BR><BR> =
lut->SetNumberOfColors(<SPAN=20
class=3D355490422-21102003>N</SPAN>);<BR> =20
lut->Build();<BR> for (i=3D0; i<<SPAN=20
class=3D355490422-21102003>N</SPAN>; ++i) =20
lut->SetTableValue(i, <SPAN=20
class=3D355490422-21102003>R</SPAN>[i], <SPAN=20
class=3D355490422-21102003>G</SPAN>[i], <SPAN=20
class=3D355490422-21102003>B</SPAN>[i], <SPAN=20
class=3D355490422-21102003>A[i]</SPAN>);<BR></DIV>
<DIV><FONT face=3DArial color=3D#008000></FONT><BR> for =
(i=3D0;i<<SPAN=20
class=3D355490422-21102003>n</SPAN>;i++)<BR> =20
{<BR> pts->InsertNextPoint(<SPAN=20
class=3D355490422-21102003>x</SPAN>[i],<SPAN =
class=3D355490422-21102003>=20
</SPAN><SPAN class=3D355490422-21102003>y</SPAN>[i],<SPAN=20
class=3D355490422-21102003> </SPAN><SPAN=20
class=3D355490422-21102003>z</SPAN>[i]);<BR> &nbs
=
p;=20
ca->InsertNextCell(1);<BR> =20
ca->InsertCellPoint(i);<BR> =20
scalars->InsertNextTuple1(<SPAN=20
class=3D355490422-21102003>f[i]</SPAN>);<BR> }<BR> =20
pd->SetPoints(pts);<BR> pd->SetVerts(ca);<BR> =20
pd->GetPointData()->SetScalars(scalars);<BR><BR> =20
m->SetLookupTable(lut);<BR> m->SetInput(pd);<BR> =20
m->SetScalarRange(<SPAN =
class=3D355490422-21102003>ScalarMin</SPAN>, <SPAN=20
class=3D355490422-21102003>ScalarMax</SPAN>);<BR><BR>
=
a->SetMapper(m);<BR> =
a->GetProperty()->SetPointSize(8);<BR> =20
ren->AddActor(a);</DIV>
<DIV><SPAN class=3D355490422-21102003></SPAN>.<SPAN=20
class=3D355490422-21102003>...</SPAN><BR></DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000>HTH</FONT></SPAN></DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000></FONT></SPAN> </DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000>Yang</FONT></SPAN></DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000></FONT></SPAN> </DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000></FONT></SPAN> </DIV>
<DIV><SPAN class=3D355490422-21102003><FONT face=3DArial=20
color=3D#008000></FONT></SPAN> </DIV>
<DIV></DIV>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft><FONT face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> alan .=20
[mailto:lost_bits1110 at hotmail.com] <BR><B>Sent:</B> Tuesday, October =
21, 2003=20
4:59 PM<BR><B>To:</B> vtkusers at vtk.org<BR><B>Subject:</B> [vtkusers] =
lookup=20
table with imageviewer and floatarray (2)<BR><BR></FONT></DIV>
<DIV>
<DIV>Or if theres another way to execute the pipeline..</DIV>
<DIV> </DIV>
<DIV>At the moment I use vtkFloatArray -> vtkImageData=20
-> vtkImageViewer..</DIV>
<DIV>(and FloatArray sets up the lookup table)</DIV>
<DIV> </DIV>
<DIV>but maybe the vtkImageViewer is the problem, so i can create a=20
vtkDataSetMapper, which takes in the vtkImageData</DIV>
<DIV>but then how do I render this..? I dont have any actors - just a =
bunch of=20
points (which came from a file of numbers)</DIV>
<DIV> </DIV>
<DIV>okay thank u again vtkusers</DIV>
<DIV> </DIV>
<DIV>one day i'll be the expert..!</DIV>
<DIV> </DIV>
<DIV>-alan.</DIV></DIV><BR clear=3Dall>
<HR>
<A href=3D"http://g.msn.com/8HMAENUS/2728??PS=3D">Never get a busy =
signal because=20
you are always connected with high-speed Internet access. Click here to
=
comparison-shop providers.</A> =
_______________________________________________=20
This is the private VTK discussion list. Please keep messages on-topic.
=
Check=20
the FAQ at: <HTTP: vtkfaq cgi-bin public.kitware.com>Follow this link =
to=20
subscribe/unsubscribe:=20
http://www.vtk.org/mailman/listinfo/vtkusers</BODY></HTML>
------_=_NextPart_001_01C39821.B8D62310--
--__--__--
Message: 4
From: "Paul Tait" <paul at opes.com.au>
To: <vtkusers at vtk.org>
Date: Wed, 22 Oct 2003 08:52:44 +0800
Subject: [vtkusers] Re: vtkusers digest, Vol 1 #2153 - 1 msg
> I try to use vtk to generate brain contours from MRI scan image and
try to
make the brain surface transparent. But once I set the surface to
transparent, there is some white matters apears in the scene. And I can
not
make it transparent as well. See the picture in the attachment.
>
> Does anyone know how to eliminate those white materials?
>
Sorry can't resist this one ;-)
Thats what the brain is made from -- white and grey matter. To eliminate
white matter try a lobotomy
--__--__--
Message: 5
From: "alan ." <lost_bits1110 at hotmail.com>
To: vtkusers at vtk.org
Subject: RE: [vtkusers] lookup table with imageviewer and floatarray (2)
Date: Wed, 22 Oct 2003 01:17:22 +0000
<html><div style='background-color:'><DIV>
<P>okay so I just realized that by using vtkFloatArray, vtkImageData and
vtkImageViewer to view my 2D data, it automatically seems to scale the
numbers to gray scale intensity (provided that i set my imageViewer's
SetColorWindow( ) to something non-zero). So for the below
example, what it would do is:</P>
<P>1 1 1 </P>
<P>0 0 0</P>
<P>0.2 0.5 0.7 </P>
<P>it will give darkness in the center, brightness at the top, and
gradually go dark to bright on the bottom...</P>
<P>But still, when I try to use the lookuptable to show actual color
(instead of black/white/gray), it doesnt work =( </P>
<P>sigh.......! here is part of the code.......</P>
<P>vtkImageViewer *viewer = vtkImageViewer::New();<BR>vtkImageData
*imageData = vtkImageData::New();<BR>vtkFloatArray *fltarray =
vtkFloatArray::New();<BR>vtkLookupTable *lut=vtkLookupTable::New();</P>
<P>fltarray->SetNumberOfComponents(80*3);
<BR>fltarray->SetNumberOfTuples(70); </P>
<P>lut->SetHueRange(0.0, 1.0);<BR>lut->SetSaturationRange(0.0,
1.0);<BR>lut->SetValueRange(1.0,
1.0);<BR>lut->SetRange(0.0,1.0);<BR>lut->SetAlphaRange(1.0,
1.0);<BR>lut->SetNumberOfColors(256);</P>
<P>lut->Build();</P>
<P>fltarray->SetLookupTable(lut);</P>
<P>imageData->GetPointData()->SetScalars(fltarray);
<BR>imageData->SetDimensions(80*3,70,1);
<BR>imageData->SetScalarType(VTK_FLOAT);</P>
<P>viewer->SetInput(imageData);<BR>viewer->SetColorWindow(50.0);<B
R>viewer->SetColorLevel(0.0);<BR>viewer->SetSize(240,100);</P>
<P> viewer->Render();<BR><BR>shouldnt i see at least some
color?? and i cant SetScalarRange anywhere because ImageViewer
doesnt contain this method... </P>
<P>Or is there another way to represent this 2D data which will wokr
better with the lookuptable..? there must be a way..!</P>
<P>thank u vtkusers for your responses....</P>
<P>=)</P></DIV>
<DIV></DIV>>From: Xianjin Yang <YANG at AGIUSA.COM>
<DIV></DIV>>To: "'alan .'" <LOST_BITS1110 at HOTMAIL.COM>
<DIV></DIV>>Subject: RE: [vtkusers] lookup table with imageviewer and
floatarray (2)
<DIV></DIV>>Date: Tue, 21 Oct 2003 18:07:59 -0500
<DIV></DIV>>MIME-Version: 1.0
<DIV></DIV>>Received: from exchngsvr.agiusa.com ([209.194.230.204])
by mc5-f20.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Tue, 21
Oct 2003 16:12:36 -0700
<DIV></DIV>>Received: by mail.exchngsvr.agiusa.com with Internet Mail
Service (5.5.2653.19)id <VL3B3272>; Tue, 21 Oct 2003 18:08:11 -0500
<DIV></DIV>>X-Message-Info: JGTYoYF78jF4KkBuPcVLyPfJe4vxU+dS
<DIV></DIV>>Message-ID:
<6AC51773FA304E469DEE9569AF903E5B16882C at mail.exchngsvr.agiusa.com>
<DIV></DIV>>X-Mailer: Internet Mail Service (5.5.2653.19)
<DIV></DIV>>Return-Path: Yang at AGIUSA.COM
<DIV></DIV>>X-OriginalArrivalTime: 21 Oct 2003 23:12:37.0587 (UTC)
FILETIME=[D167F230:01C39828]
<DIV></DIV>>
<DIV></DIV>>You did not set the scalar range which is critical for
color mapping using
<DIV></DIV>>lookup table. Your points may have the background color
of your imageviewer.
<DIV></DIV>>change the image viewer color from black to white or from
white to black to
<DIV></DIV>>prove it.
<DIV></DIV>>
<DIV></DIV>>Yang
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: alan . [mailto:lost_bits1110 at hotmail.com]
<DIV></DIV>>Sent: Tuesday, October 21, 2003 6:05 PM
<DIV></DIV>>To: Yang at AGIUSA.COM
<DIV></DIV>>Subject: RE: [vtkusers] lookup table with imageviewer and
floatarray (2)
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Hi..!!
<DIV></DIV>>
<DIV></DIV>>Thanks so much for your response,
<DIV></DIV>>
<DIV></DIV>>Your code makes sense, and thank u for the link.. However
in my code, i am using
<DIV></DIV>>imageViewer - the reason is because I have 2D image data,
(a double subscripted
<DIV></DIV>>array of floats) and I want to map the value of these
numbers to a gray scale
<DIV></DIV>>value (i.e. the higher the number the brighter - the
lower the number, the
<DIV></DIV>>darker)
<DIV></DIV>>
<DIV></DIV>>So my code is very very simple, here is part of it below:
<DIV></DIV>>
<DIV></DIV>>But the lookup table doesnt seem to have any affect... do
u see anything i'm
<DIV></DIV>>missing? Do u think maybe its not possible with this
pipeline i'm using? How
<DIV></DIV>>else can i display this array of numbers then so that i
can use a lookup table??
<DIV></DIV>>
<DIV></DIV>>thanks again!!!!!!!!
<DIV></DIV>>
<DIV></DIV>>---------------------------------------------------------
----------------------
<DIV></DIV>>
<DIV></DIV>>vtkImageViewer *viewer = vtkImageViewer::New();
<DIV></DIV>>vtkImageData *imageData = vtkImageData::New();
<DIV></DIV>>vtkFloatArray *fltarray = vtkFloatArray::New();
<DIV></DIV>>vtkLookupTable *lut=vtkLookupTable::New();
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>fltarray->SetNumberOfComponents(80*3);
<DIV></DIV>>fltarray->SetNumberOfTuples(70);
<DIV></DIV>>
<DIV></DIV>>lut->SetHueRange(0.0, 0.0);
<DIV></DIV>>lut->SetSaturationRange(0.0, 0.0);
<DIV></DIV>>lut->SetValueRange(0.0, 1.0);
<DIV></DIV>>
<DIV></DIV>>fltarray->SetLookupTable(lut);
<DIV></DIV>>
<DIV></DIV>>imageData->GetPointData()->SetScalars(fltarray);
<DIV></DIV>>imageData->SetDimensions(80*3,70,1);
<DIV></DIV>>imageData->SetScalarType(VTK_FLOAT);
<DIV></DIV>>
<DIV></DIV>>imageData->SetSpacing(1, 1, 1);
<DIV></DIV>>imageData->SetOrigin(0.0, 0.0, 0.0);
<DIV></DIV>>
<DIV></DIV>>viewer->SetInput(imageData);
<DIV></DIV>> viewer->Render();
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> >From: Xianjin Yang
<DIV></DIV>> >To: vtkusers at vtk.org
<DIV></DIV>> >CC: "'alan .'"
<DIV></DIV>> >Subject: RE: [vtkusers] lookup table with
imageviewer and floatarray (2)
<DIV></DIV>> >Date: Tue, 21 Oct 2003 17:21:49 -0500
<DIV></DIV>> >MIME-Version: 1.0
<DIV></DIV>> >Received: from mc3-f36.hotmail.com ([64.4.50.172])
by mc3-s14.hotmail.com with
<DIV></DIV>>Microsoft SMTPSVC(5.0.2195.6713); Tue, 21 Oct 2003
15:32:32 -0700
<DIV></DIV>> >Received: from public.kitware.com ([24.97.130.19])
by mc3-f36.hotmail.com with
<DIV></DIV>>Microsoft SMTPSVC(5.0.2195.6713); Tue, 21 Oct 2003
15:32:09 -0700
<DIV></DIV>> >Received: from public.kitware.com (localhost
[127.0.0.1])by public.kitware.com
<DIV></DIV>>(Postfix) with ESMTPid B1F9E1ACA8; Tue, 21 Oct 2003
18:28:05 -0400 (EDT)
<DIV></DIV>> >Received: from exchngsvr.agiusa.com (unknown
[209.194.230.204])by
<DIV></DIV>>public.kitware.com (Postfix) with ESMTP id 23AD01AAE9for
; Tue, 21 Oct 2003
<DIV></DIV>>18:27:02 -0400 (EDT)
<DIV></DIV>> >Received: by mail.exchngsvr.agiusa.com with Internet
Mail Service
<DIV></DIV>>(5.5.2653.19)id ; Tue, 21 Oct 2003 17:22:41 -0500
<DIV></DIV>> >X-Message-Info:
o8IIVuzO8A1vIokZwM2wZaK5XIw4RzjZ2ZKB4CpIVko=
<DIV></DIV>> >Delivered-To: vtkusers at vtk.org
<DIV></DIV>> >Message-ID:
<6AC51773FA304E469DEE9569AF903E5B16882B at mail.exchngsvr.agiusa.com>
<DIV></DIV>> >X-Mailer: Internet Mail Service (5.5.2653.19)
<DIV></DIV>> >Sender: vtkusers-admin at vtk.org
<DIV></DIV>> >Errors-To: vtkusers-admin at vtk.org
<DIV></DIV>> >X-BeenThere: vtkusers at vtk.org
<DIV></DIV>> >X-Mailman-Version: 2.0.11
<DIV></DIV>> >Precedence: bulk
<DIV></DIV>> >List-Help:
<DIV></DIV>> >List-Post:
<DIV></DIV>> >List-Subscribe: ,
<DIV></DIV>> >List-Id:
<DIV></DIV>> >List-Unsubscribe: ,
<DIV></DIV>> >List-Archive:
<DIV></DIV>> >Return-Path: vtkusers-admin at vtk.org
<DIV></DIV>> >X-OriginalArrivalTime: 21 Oct 2003 22:32:10.0193
(UTC)
<DIV></DIV>>FILETIME=[2A910410:01C39823]
<DIV></DIV>> >
<DIV></DIV>> >Hi Alan,
<DIV></DIV>> >
<DIV></DIV>> >To become an expert vtkuser, Check out this post
<DIV></DIV>>
>http://public.kitware.com/pipermail/vtkusers/2003-September/020191.h
tml
<DIV></DIV>> >
<DIV></DIV>> >
<DIV></DIV>> >As a beginning vtkuser, I rendered colored points
with this kind of pipeline.
<DIV></DIV>> >
<DIV></DIV>> >......
<DIV></DIV>> >
<DIV></DIV>> > vtkPoints * pts = vtkPoints::New();
<DIV></DIV>> > vtkCellArray * ca = vtkCellArray::New();
<DIV></DIV>> > vtkPolyData * pd = vtkPolyData::New();
<DIV></DIV>> > vtkFloatArray * scalars = vtkFloatArray ::New();
<DIV></DIV>> >vtkPolyDataMapper * m = vtkPolyDataMapper::New();
<DIV></DIV>> > vtkLookupTable *lut = vtkLookupTable::New();
<DIV></DIV>> >vtkRenderer* ren = vtkRenderer::New();
<DIV></DIV>> > vtkActor * a = vtkActor::New();
<DIV></DIV>> >
<DIV></DIV>> > lut->SetNumberOfColors(N);
<DIV></DIV>> > lut->Build();
<DIV></DIV>> > for (i=0; iSetTableValue(i, R[i], G[i], B[i],
A[i]);
<DIV></DIV>> >
<DIV></DIV>> >
<DIV></DIV>> > for (i=0;i> {
<DIV></DIV>> > pts->InsertNextPoint(x[i], y[i], z[i]);
<DIV></DIV>> > ca->InsertNextCell(1);
<DIV></DIV>> > ca->InsertCellPoint(i);
<DIV></DIV>> > scalars->InsertNextTuple1(f[i]);
<DIV></DIV>> > }
<DIV></DIV>> > pd->SetPoints(pts);
<DIV></DIV>> > pd->SetVerts(ca);
<DIV></DIV>> > pd->GetPointData()->SetScalars(scalars);
<DIV></DIV>> >
<DIV></DIV>> > m->SetLookupTable(lut);
<DIV></DIV>> > m->SetInput(pd);
<DIV></DIV>> > m->SetScalarRange(ScalarMin, ScalarMax);
<DIV></DIV>> >
<DIV></DIV>> > a->SetMapper(m);
<DIV></DIV>> > a->GetProperty()->SetPointSize(8);
<DIV></DIV>> > ren->AddActor(a);
<DIV></DIV>> >....
<DIV></DIV>> >
<DIV></DIV>> >HTH
<DIV></DIV>> >
<DIV></DIV>> >Yang
<DIV></DIV>> >
<DIV></DIV>> >
<DIV></DIV>> >
<DIV></DIV>> >-----Original Message-----
<DIV></DIV>> >From: alan . [mailto:lost_bits1110 at hotmail.com]
<DIV></DIV>> >Sent: Tuesday, October 21, 2003 4:59 PM
<DIV></DIV>> >To: vtkusers at vtk.org
<DIV></DIV>> >Subject: [vtkusers] lookup table with imageviewer
and floatarray (2)
<DIV></DIV>> >
<DIV></DIV>> >
<DIV></DIV>> >Or if theres another way to execute the pipeline..
<DIV></DIV>> >
<DIV></DIV>> >At the moment I use vtkFloatArray -> vtkImageData
-> vtkImageViewer..
<DIV></DIV>> >(and FloatArray sets up the lookup table)
<DIV></DIV>> >
<DIV></DIV>> >but maybe the vtkImageViewer is the problem, so i
can create a
<DIV></DIV>>vtkDataSetMapper,
<DIV></DIV>> >which takes in the vtkImageData
<DIV></DIV>> >but then how do I render this..? I dont have any
actors - just a bunch of
<DIV></DIV>>points
<DIV></DIV>> >(which came from a file of numbers)
<DIV></DIV>> >
<DIV></DIV>> >okay thank u again vtkusers
<DIV></DIV>> >
<DIV></DIV>> >one day i'll be the expert..!
<DIV></DIV>> >
<DIV></DIV>> >-alan.
<DIV></DIV>> >
<DIV></DIV>> > _____
<DIV></DIV>> >
<DIV></DIV>> >Never get a busy signal because you are
<DIV></DIV>> >always connected with high-speed Internet access.
Click here to comparison-shop
<DIV></DIV>>
<DIV></DIV>> >providers.
_______________________________________________ This is the private
<DIV></DIV>> >VTK discussion list. Please keep messages on-topic.
Check the FAQ at: Follow
<DIV></DIV>> >this link to subscribe/unsubscribe:
<DIV></DIV>>http://www.vtk.org/mailman/listinfo/vtkusers
<DIV></DIV>>
<DIV></DIV>> _____
<DIV></DIV>>
<DIV></DIV>>Surf and talk on the phone at the <HTTP: 8HMAENUS
g.msn.com 2731??PS="">same
<DIV></DIV>>time with broadband Internet access. Get high-speed for
as low as $29.95/month.*
<DIV></DIV>>
<DIV></DIV>>*Depending on the local service providers in your area.
<DIV></DIV></div><br clear=all><hr> <a
href="http://g.msn.com/8HMBENUS/2728??PS=">Never get a busy signal
because you are always connected with high-speed Internet access. Click
here to comparison-shop providers.</a> </html>
--__--__--
Message: 6
Date: Wed, 22 Oct 2003 09:48:12 +0200
From: "de Boer Ingo" <I.deBoer at polytec.de>
To: <vtkusers at vtk.org>
Subject: [vtkusers] Solution: Bug in SetRenderWindow(NULL)
Hi,
I guess I found the solution for the
bug/problem in SetRenderWindow(NULL).
The lines in vtkWin32OpenGLRenderWindow should be:
vtkWin32OpenGLRenderWindow::~vtkWin32OpenGLRenderWindow()
{
..
if (this->WindowId)
{
this->Clean();
ReleaseDC(this->WindowId, this->DeviceContext);
// can't set WindowId=3DNULL, needed for DestroyWindow
this->DeviceContext =3D NULL;
=20
// clear the extra data before calling destroy
vtkSetWindowLong(this->WindowId,4,(LONG)0);
if (this->OwnWindow)
DestroyWindow(this->WindowId);
}
..
}
Could anybody of the developers check on that ?
> the memory is free, but you get the error=20
> "wglMakeCurrent failed in MakeCurrent()"
> in vtkWin32OpenGLRenderWindow::MakeCurrent()
That was my own bug.. ;)
greets
Ingo
---
Dr.-Ing. Ingo H. de Boer
Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax : ++49 7243 604 255
--__--__--
Message: 7
Date: Wed, 22 Oct 2003 15:54:3 +0800
From: "xiaofeng qi" <xiaofeng_qi at sina.com>
To: vtkusers at vtk.org <vtkusers at vtk.org>
Subject: [vtkusers] HELP vtkPointPicker question
Hi,vtkusers
I am using vtk+java to develop a application to visualize
some CFD data.I use vtkPointPicker to pick the point
from a section plane,then i use the point's coordinate
as start point of a streamline , but something cause me annoyed,
The point's coordinate i got from vtkPointPicker is not
the same to the start point of the streamline,when I
press the mouse ,and the streamline do not start from the
cursor'position, it starts from some place else.
here is some of my codes,
vtkPointPicker picker=3Dnew vtkPointPicker();
picker.InitializePickList();
picker.AddPickList(sectionActor);
picker.PickFromListOn();
picker.SetTolerance(0.01);
picker.Pick(lastX, lastY, 0, renWin.GetRenderer());
if(picker.GetPointId()<0){
System.out.println("Mouse point:=
("+lastX+","+lastY+")");
System.out.println("notok");
}else{
double []selPt =3D picker.GetSelectionPoint();
double []pickPos =3D picker.GetPickPosition();
=09
drawStreamline(pickPos);
}
..............................
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1
Do i miss something?Any help will be appreciate.
Thanks !!!
=09=09=09=09
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1xiaofeng qi
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1xiaofeng_qi at sina.com
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A12003-10-22
--__--__--
_______________________________________________
vtkusers mailing list
vtkusers at vtk.org
http://www.vtk.org/mailman/listinfo/vtkusers
End of vtkusers Digest
More information about the vtkusers
mailing list