[vtkusers] RE: Land topography with distinct colors

Andrew J. P. Maclean a.maclean at cas.edu.au
Tue Mar 11 17:16:28 EST 2003


Use a lookup table. Look at vtkLookUpTable
___________________________________________

Andrew J. P. Maclean

Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA

Ph: +61 2 9351 3283
Fax: +61 2 9351 7474

URL: http://www.cas.edu.au/
___________________________________________


-----Original Message-----
From: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com] On Behalf Of
vtkusers-request at public.kitware.com
Sent: Wednesday, 12 March 2003 04:34
To: vtkusers at public.kitware.com
Subject: vtkusers digest, Vol 1 #1650 - 9 msgs

Send vtkusers mailing list submissions to
	vtkusers at public.kitware.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://public.kitware.com/mailman/listinfo/vtkusers
or, via email, send a message with subject or body 'help' to
	vtkusers-request at public.kitware.com

You can reach the person managing the list at
	vtkusers-admin at public.kitware.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of vtkusers digest..."


Today's Topics:

   1. Land topography with distinct colors (mcsalas at chilesat.net)
   2. Re: multiple isosurface? (Amy Henderson)
   3. Re: vessel volume data set. (Praveen Bhaniramka)
   4. Land topography with distinct colors Two (mcsalas at chilesat.net)
   5. on-screen and off-screen lighting (Nigel Nunn)
   6. Re: OS X Python Carbon Valid Pixel Format?? (Karl Garsha)
   7. Vectorial field by the time (Marcio Antonio Mathias (EDB))
   8. Getting VTK to render in an existing OpenGL window (Arun Kumar
Srinivasan)
   9. Using VTK in an existing OpenGL window (Arun Kumar Srinivasan)

--__--__--

Message: 1
Date: Tue, 11 Mar 2003 11:42:42 -0400
From: mcsalas at chilesat.net
To: vtkusers at public.kitware.com
Subject: [vtkusers] Land topography with distinct colors

Hi, i make a land topography of a txt file (x, y, z) . I reading the
coords,
and then triangulate with Dealunay2D (thank's a Sebastien MARAUX) and
render
the surface. this Ok.

The problem now is:

Depending the z Coord, the surface need show with distinct colors, p.e.

z < 1.4 = green
1.5 < z < 2 = blue
2 < z = red

How make this and conserving the form of the original surface??

any code example or suggestions please..

Best Regards,

Max from chile
mcsalas at chilesat.net


--__--__--

Message: 2
Date: Tue, 11 Mar 2003 10:42:04 -0500
To: Radim =?iso-8859-1?Q?Kol=E1r?= <kolarr at feec.vutbr.cz>,
	"VTK" <vtkusers at public.kitware.com>
From: Amy Henderson <amy.henderson at kitware.com>
Subject: Re: [vtkusers] multiple isosurface?

--=====================_940605843==_.ALT
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi Radim,

To create multiple isosurfaces with a single instance of
vtkMarchingCubes,=
=20
call the SetValue method of vtkMarchingCubes once per isosurface with
the=20
value of that isosurface.

Please take a look at the documentation (in the header files or on-line
VTK=
=20
documentation) for vtkMarchingCubes (or other classes you are trying
to=20
use) before posting questions like this to the vtkusers list.  You may
be=20
able to answer such questions on your own, and people on the list are=20
generally more willing to help if they can see that you've tried to
resolve=
=20
the issue yourself first.

- Amy

At 04:01 PM 3/11/2003 +0100, Radim Kol=E1r wrote:
>thanks.
>I have another problem:) How to generate a multiple isosurface with=20
>Marching cubes in one render window?
>thanks radim
>----- Original Message -----
>From: <mailto:amy.henderson at kitware.com>Amy Henderson
>To: <mailto:kolarr at feec.vutbr.cz>Radim Kol=E1=F8 ;=20
><mailto:vtkusers at public.kitware.com>VTK
>Sent: Tuesday, March 11, 2003 3:15 PM
>Subject: Re: [vtkusers] rendering a sphere problem
>
>The main reason this won't work is that vtkSphereSource produces=20
>vtkPolyData output, not vtkImageData, so you can't volume render it
in=20
>VTK.  You should use a vtkPolyDataMapper and a vtkActor to render
the=20
>output of vtkSphereSource instead.
>
>- Amy
>
>At 09:16 AM 3/11/2003 +0100, Radim Kol=E1=F8 wrote:
>>Hi all,
>>please could you help me with this simple problem?
>>I want to render the sphere with the vtkVolumeRayCastMapper. So I
create=
=20
>>sphere, mapper, volume properties and finally vtkVolume and I render
it=20
>>with vtkRenderWindowInteractor. But the program crash when I call=20
>>iren->Render(). Bellow is the short C++ code. Are there some mistakes?
>>I'm using VTK 4.0 and Borland C++ 6
>>Thanks a lot.
>>Radim
>>
>>//--------------------------------------------------------------------
----=
---=20
>>
>>#include "vtkSphereSource.h"
>>#include "vtkVolumeRayCastMapper.h"
>>#include "vtkActor.h"
>>#include "vtkRenderer.h"
>>#include "vtkRenderWindowInteractor.h"
>>#include "vtkRenderWindow.h"
>>#include "vtkVolumeRayCastMIPFunction.h"
>>#include "vtkImageData.h"
>>#include "vtkVolumeProperty.h"
>>#include "vtkPiecewiseFunction.h"
>>
>>#include <vcl.h>
>>#pragma hdrstop
>>//--------------------------------------------------------------------
----=
---=20
>>
>>
>>#pragma argsused
>>int main(int argc, char* argv[])
>>{
>>         vtkSphereSource *sphere;        sphere =3D=
 vtkSphereSource::New();
>>
>>         vtkVolumeRayCastMIPFunction *RayCastMethod =3D=20
>> vtkVolumeRayCastMIPFunction::New();
>>         vtkVolumeRayCastMapper *mapper =3D
vtkVolumeRayCastMapper::New();
>>
>>         mapper->SetVolumeRayCastFunction( RayCastMethod );
>>
>>         vtkImageData *vol;      vol =3D vtkImageData::New();
>>         vol->SetSource( sphere );
>>         mapper->SetInput( vol );
>>
>>  vtkColorTransferFunction *colorF =3D
vtkColorTransferFunction::New();
>>     colorF->AddRGBSegment( 0, 0.0, 0.0, 0.0, 255, 0.5, 0.1, 1.0 );
>>
>>        //-------- Mapping from scalar -> opacity ------------
>>  vtkPiecewiseFunction *opacityF =3D vtkPiecewiseFunction::New();
>>      opacityF->AddPoint( 10, 0.1 );
>>      opacityF->AddPoint( 200, 0.9 );
>>      opacityF->ClampingOff();
>>
>>vtkVolumeProperty *volumeP =3D vtkVolumeProperty::New();
>>     volumeP->SetColor( colorF );
>>      volumeP->SetScalarOpacity( opacityF );
>>
>>  vtkVolume *volume =3D vtkVolume::New();
>>      volume->SetMapper( mapper );
>>      volume->SetProperty( volumeP );
>>
>>vtkRenderer *ren1;      ren1 =3D vtkRenderer::New();
>>     ren1->AddProp( volume );
>>
>>vtkRenderWindow *renWin; renWin =3D vtkRenderWindow::New();
>>     renWin->AddRenderer( ren1 );
>>
>>vtkRenderWindowInteractor *iren; iren =3D=
 vtkRenderWindowInteractor::New();
>>     iren->SetRenderWindow( renWin );
>>
>>         iren->Render();     //here it crash
>>         iren->Start();
>>
>>         iren->Delete();
>>         renWin->Delete();
>>         ren1->Delete();
>>         RayCastMethod->Delete();
>>         volume->Delete();
>>         vol->Delete();
>>         mapper->Delete();
>>         sphere->Delete();
>>
>>         return 0;
>>}
>>//--------------------------------------------------------------------
----=
---


--=====================_940605843==_.ALT
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
Hi Radim,<br><br>
To create multiple isosurfaces with a single instance of
vtkMarchingCubes, call the SetValue method of vtkMarchingCubes once per
isosurface with the value of that isosurface.<br><br>
Please take a look at the documentation (in the header files or on-line
VTK documentation) for vtkMarchingCubes (or other classes you are trying
to use) before posting questions like this to the vtkusers list.&nbsp;
You may be able to answer such questions on your own, and people on the
list are generally more willing to help if they can see that you've
tried
to resolve the issue yourself first.<br><br>
- Amy<br><br>
At 04:01 PM 3/11/2003 +0100, Radim Kol=E1r wrote:<br>
<blockquote type=3Dcite class=3Dcite cite><font face=3D"arial"=
 size=3D2>thanks.</font><br>
<font face=3D"arial" size=3D2>I have another problem:) How to generate a
multiple isosurface with Marching cubes in one render=20
window?</font><br>
<font face=3D"arial" size=3D2>thanks radim</font>
<dl>
<dd>----- Original Message -----=20
<dd>From:</b> <a href=3D"mailto:amy.henderson at kitware.com">Amy
Henderson</a>=20
<dd>To:</b> <a href=3D"mailto:kolarr at feec.vutbr.cz">Radim Kol=E1=F8</a>
;
<a href=3D"mailto:vtkusers at public.kitware.com">VTK</a>=20
<dd>Sent:</b> Tuesday, March 11, 2003 3:15 PM
<dd>Subject:</b> Re: [vtkusers] rendering a sphere problem<br><br>

<dd>The main reason this won't work is that vtkSphereSource produces
vtkPolyData output, not vtkImageData, so you can't volume render it in
VTK.&nbsp; You should use a vtkPolyDataMapper and a vtkActor to render
the output of vtkSphereSource instead.<br><br>

<dd>- Amy<br><br>

<dd>At 09:16 AM 3/11/2003 +0100, Radim Kol=E1=F8
wrote:<blockquote type=3Dcite class=3Dcite cite><font face=3D"arial"
size=3D=
2>
<dd>Hi all,</font><font face=3D"arial" size=3D2>
<dd>please could you help me with this simple
problem?</font><font face=3D"arial" size=3D2>
<dd>I want to render the sphere with the vtkVolumeRayCastMapper. So I
create sphere, mapper, volume properties and finally vtkVolume and I
render it with vtkRenderWindowInteractor. But the program crash when I
call iren-&gt;Render(). Bellow is the short C++ code. Are there some
mistakes?</font><font face=3D"arial" size=3D2>
<dd>I'm using VTK 4.0 and Borland C++=20
6</font><font face=3D"arial" size=3D2>
<dd>Thanks a lot.</font><font face=3D"arial" size=3D2>
<dd>Radim</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>//------------------------------------------------------------------
----=
-----
<dd>#include &quot;vtkSphereSource.h&quot;
<dd>#include &quot;vtkVolumeRayCastMapper.h&quot;
<dd>#include &quot;vtkActor.h&quot;
<dd>#include &quot;vtkRenderer.h&quot;
<dd>#include &quot;vtkRenderWindowInteractor.h&quot;
<dd>#include &quot;vtkRenderWindow.h&quot;
<dd>#include &quot;vtkVolumeRayCastMIPFunction.h&quot;
<dd>#include &quot;vtkImageData.h&quot;
<dd>#include &quot;vtkVolumeProperty.h&quot;
<dd>#include &quot;vtkPiecewiseFunction.h&quot;</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>#include &lt;vcl.h&gt;
<dd>#pragma hdrstop</font><font face=3D"arial" size=3D2>
<dd>//------------------------------------------------------------------
----=
-----</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>#pragma argsused
<dd>int main(int argc, char* argv[])
<dd>{
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkSphereSource
*sphere;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sphere =3D
vtkSphereSource::New();</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
vtkVolumeRayCastMIPFunction *RayCastMethod =3D
vtkVolumeRayCastMIPFunction::New();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkVolumeRayCastMapper
*mapper =3D vtkVolumeRayCastMapper::New();</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mapper-&gt;SetVolumeRayCastFunction( RayCastMethod );</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkImageData
*vol;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vol =3D vtkImageData::New();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vol-&gt;SetSource( sphere
);
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mapper-&gt;SetInput( vol
);</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>&nbsp;vtkColorTransferFunction *colorF =3D
vtkColorTransferFunction::New();
<dd>&nbsp;&nbsp;&nbsp; colorF-&gt;AddRGBSegment( 0, 0.0, 0.0, 0.0, 255,
0.5, 0.1, 1.0 );</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //-------- Mapping from scalar
-&gt; opacity ------------
<dd>&nbsp;vtkPiecewiseFunction *opacityF =3D
vtkPiecewiseFunction::New();
<dd>&nbsp;&nbsp;&nbsp;&nbsp; opacityF-&gt;AddPoint( 10, 0.1 );
<dd>&nbsp;&nbsp;&nbsp;&nbsp; opacityF-&gt;AddPoint( 200, 0.9 );
<dd>&nbsp;&nbsp;&nbsp;&nbsp; opacityF-&gt;ClampingOff();</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>vtkVolumeProperty *volumeP =3D vtkVolumeProperty::New();
<dd>&nbsp;&nbsp;&nbsp; volumeP-&gt;SetColor( colorF );
<dd>&nbsp;&nbsp;&nbsp;&nbsp; volumeP-&gt;SetScalarOpacity( opacityF
);</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>&nbsp;vtkVolume *volume =3D vtkVolume::New();
<dd>&nbsp;&nbsp;&nbsp;&nbsp; volume-&gt;SetMapper( mapper );
<dd>&nbsp;&nbsp;&nbsp;&nbsp; volume-&gt;SetProperty( volumeP );</font>
<dd>&nbsp;<font face=3D"arial" size=3D2>
<dd>vtkRenderer *ren1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ren1 =3D
vtkRenderer::New();
<dd>&nbsp;&nbsp;&nbsp; ren1-&gt;AddProp( volume );
<dd>&nbsp;
<dd>vtkRenderWindow *renWin; renWin =3D vtkRenderWindow::New();
<dd>&nbsp;&nbsp;&nbsp; renWin-&gt;AddRenderer( ren1 );
<dd>&nbsp;
<dd>vtkRenderWindowInteractor *iren; iren =3D
vtkRenderWindowInteractor::New();
<dd>&nbsp;&nbsp;&nbsp; iren-&gt;SetRenderWindow( renWin );
<dd>&nbsp;
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
iren-&gt;Render();&nbsp;&nbsp;&nbsp;&nbsp; //here it crash
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iren-&gt;Start();
<dd>&nbsp;
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iren-&gt;Delete();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; renWin-&gt;Delete();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ren1-&gt;Delete();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
RayCastMethod-&gt;Delete();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volume-&gt;Delete();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vol-&gt;Delete();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mapper-&gt;Delete();
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sphere-&gt;Delete();
<dd>&nbsp;
<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;
<dd>}
<dd>//------------------------------------------------------------------
----=
-----</font></blockquote>
</dl></blockquote><br>
</html>

--=====================_940605843==_.ALT--




--__--__--

Message: 3
Date: Tue, 11 Mar 2003 07:45:41 -0800
From: Praveen Bhaniramka <praveenb at mrcoffee.engr.sgi.com>
To: Jianlong Zhou <zhou at isg.cs.uni-magdeburg.de>
Cc: vtkusers at public.kitware.com
Subject: Re: [vtkusers] vessel volume data set.

Hi Jianlong,

Not sure if this is exactly what you are looking for, but you might be
able to download the Aneurism data set from www.volvis.org web site. It
contains arteries from the human head.

Cheers,
Praveen

On Tue, 11 Mar 2003, Jianlong Zhou wrote:

> Hi, vtkusers,
>
> Does anyone have the human vessel volume dataset with tumours inside?
> I need this kind of volume dataset to test a program.
>
> Any information about this dataset would be highly appreciated.
>
> regards,
>
> Jianlong
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>

-- 
-----------------------------------------------------------------
Praveen Bhaniramka               Member of Technical Staff (MTS)
praveenb at sgi.com                 Advanced Graphics Division
(650)933-1785                    Silicon Graphics, Inc.
-----------------------------------------------------------------

--__--__--

Message: 4
Date: Tue, 11 Mar 2003 12:01:25 -0400
From: mcsalas at chilesat.net
To: vtkusers at public.kitware.com
Subject: [vtkusers] Land topography with distinct colors Two

Hi again, i mistake the txt file is (x,y,z,L) with L is the marker of a
color.
p.e. 

>L < 1.4 = green
>1.5 < L < 2 = blue
>2 < L = red

The surface is renderer with x,y,z and the color patron is deigned by L
factor.
 Please helpme....

Regards again,

Max

________________________________________________________________________
________
Hi, i make a land topography of a txt file (x, y, z) . I reading the
coords,
and then triangulate with Dealunay2D (thank's a Sebastien MARAUX) and
render
the surface. this Ok.

The problem now is:

Depending the z Coord, the surface need show with distinct colors, p.e.



How make this and conserving the form of the original surface??

any code example or suggestions please..

Best Regards,

Max from chile
mcsalas at chilesat.net


--__--__--

Message: 5
From: Nigel Nunn <nNunn at ausport.gov.au>
To: "'vtkusers at public.kitware.com'" <vtkusers at public.kitware.com>
Cc: Nigel Nunn <nNunn at ausport.gov.au>
Date: Wed, 12 Mar 2003 03:03:15 +1100
Subject: [vtkusers] on-screen and off-screen lighting


Hi, 
The vtkLightKit is doing a great job lighting the scene, 
(thanks Michael Halle!), but how do I get this lighting 
into offscreen-rendered images?  These images get poured 
into .avi movies as frames, generated from an MFC-based 
vtkWin32OpenGLRenderWindow.  Each frame of the movie is 
generated by: 
 
  SetupMemoryRendering(size[0],size[1], hdc); 
  vtkWin->Render(); 
  memcpy( ... ); 
  ResumeScreenRendering(); 
 
The problem is: if I don't add lights to the scene, the 
offscreen-rendered frames get the same adequate default 
lighting as the scene.  But once I add lights, or use 
the vtkLightKit, the movie frames lose their lighting. 
Can someone help me get the lights used in the scene 
into the offscreen "MemoryRendering"? 
 
thanks, 
Nigel 
 
 

**********************************************************************
This message is intended for the addressee named and may contain 
confidential and privileged information. If you are not the intended 
recipient please note that any form of distribution, copying or use of 
this communication or the information in it is strictly prohibited and 
may be unlawful. If you receive this message in error, please delete it 
and notify the sender.

Keep up to date with what's happening in Australian sport.
Visit http://www.ausport.gov.au
**********************************************************************

--__--__--

Message: 6
Date: Tue, 11 Mar 2003 10:07:51 -0600
From: Karl Garsha <garsha at itg.uiuc.edu>
To: Chris Scharver <scharver at evl.uic.edu>,
	vtkusers at public.kitware.com
Subject: Re: [vtkusers] OS X Python Carbon Valid Pixel Format??

         Thanks Chris,
I'm using a Powerbook G3 Wallstreet (1998) with a Sonnet Cresendo 500Mhz

G4 proc upgrade.  The Powerbook has an ATI RageLTPro chipset for 
graphics (4mb VRAM).  OS X historically did not support OpenGL (or 
Rave)  hardware acceleration for this graphics chip, although OS 10.2.4 
(which I'm running) supposedly includes drivers for this graphics chip.

    The specific error I'm getting follows:  
 >>> iren.Initialize()
ERROR: In 
/Volumes/MANGO_STORAGE/vtk/VTK-4.2.1/Rendering/vtkCarbonRenderWindow.cxx
, 
line 731
vtkCarbonRenderWindow (0x13c1680): Could not find valid pixel format

Thanks for your insight.
-Karl

Chris Scharver wrote:

>Currently, there's only a default pixel format specified. If a
hardware-accelerated format for that pixel format is not available, the
request fails. You mentioned that you're running on an older PowerBook,
so that's likely what is happening. Currently, VTK makes one request and
reports on either failure or success.
>
>Requesting the pixel format should be able to choose the "best
available" pixel format. I'll have to check the Carbon code to see if it
does that. There isn't an API available for changing the pixel format
requested by VTK
>
>Which PowerBook are you using? If there a graphics card installed at
all?
>
>Chris
>--
>Chris Scharver
>Electronic Visualization Laboratory
>The University of Illinois at Chicago
>Ph: 312-996-3002   FAX: 312-413-7585
><http://www.evl.uic.edu/scharver/>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>  
>

-- 
Karl Garsha
Light Microscopy Specialist
Imaging Technology Group
Beckman Institute for Advanced Science and Technology
University of Illinois at Urbana-Champaign
405 North Mathews Avenue
Urbana, IL 61801
Office: B650J
Phone: 217.244.6292
Fax: 217.244.6219
Mobile: 217.390.1874
www.itg.uiuc.edu



--__--__--

Message: 7
From: "Marcio Antonio Mathias (EDB)" <marcio.mathias at edb.ericsson.se>
To: vtkusers at public.kitware.com
Date: Tue, 11 Mar 2003 13:35:09 -0300
Subject: [vtkusers] Vectorial field by the time

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_01C2E7EC.2E2E5362
Content-Type: text/plain;
	charset="iso-8859-1"

Hi all,

I want to right a Tcl script to visualize a vetorial field.
My geometry description is a structured grid ( I am presenting as
follows a ficticius example of a small data file).
Associated to this geometry I have a vector filed description for every
step of time (identified by its name "vectorsn" where name is the
timestep index).
I would like to know if it is possible to use a file structure like
this, where an update process can retrive a vectorial field distribution
for every timestep.
Sugestions for alternative way to represent this problem are welcome
too!

Thanks, Marcio.

# vtk DataFile Version 2.0
T Ey 250 1.667778e-011 4.169446e-009
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 2  1  2 
SPACING 1.0 1.0 1.0
ORIGIN 0 0 0
POINT_DATA 4
SCALARS scalars float
LOOKUP_TABLE default
1.0 1.0
1.0 1.0
VECTORS vectors0 float
0 1 0
1 0 0
0 0 1
1 0 0
VECTORS vectors1 float
0 1 0
0 1 0
1 0 0
0 0 1
VECTORS vectors2 float
0 1 0
1 0 0
0 0 1
1 0 0

.
.
.






------_=_NextPart_001_01C2E7EC.2E2E5362
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2656.60">
<TITLE>Vectorial field by the time</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi all,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I want to right a Tcl script to =
visualize a vetorial field.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">My geometry description is a =
structured grid ( I am presenting as follows a ficticius example of a =
small data file).</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Associated to this geometry I have a =
vector filed description for every step of time (identified by its name
=
&quot;vectorsn&quot; where name is the timestep index).</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I would like to know if it is possible
=
to use a file structure like this, where an update process can retrive =
a vectorial field distribution for every timestep.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Sugestions for alternative way to =
represent this problem are welcome too!</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks, Marcio.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New"># vtk DataFile Version =
2.0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">T Ey 250 1.667778e-011 =
4.169446e-009</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">ASCII</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">DATASET =
STRUCTURED_POINTS</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">DIMENSIONS 2&nbsp; 1&nbsp; 2 =
</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">SPACING 1.0 1.0 1.0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">ORIGIN 0 0 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">POINT_DATA 4</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">SCALARS scalars float</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">LOOKUP_TABLE default</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">1.0 1.0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">1.0 1.0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">VECTORS vectors0 float</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">0 1 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">1 0 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">0 0 1</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">1 0 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">VECTORS vectors1 float</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">0 1 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">0 1 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">1 0 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">0 0 1</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">VECTORS vectors2 float</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">0 1 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">1 0 0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">0 0 1</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">1 0 0</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Courier New">.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">.</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C2E7EC.2E2E5362--

--__--__--

Message: 8
Date: 11 Mar 2003 16:51:24 -0000
From: "Arun Kumar Srinivasan" <sakumar79 at rediffmail.com>
Reply-To: "Arun Kumar Srinivasan" <sakumar79 at rediffmail.com>
To: vtkusers at public.kitware.com
Subject: [vtkusers] Getting VTK to render in an existing OpenGL window

Hi,
    I am a new user of VTK. I am trying to get VTK to render to an 
existing OpenGL window, but I am not sure how to do it. I get the 
ID of the OpenGL window using the glutGetWindow() command (returns 
an int). Now, what do I do? I looked at vtkXRenderWindow and 
vtkWin32OpenGLRenderWindow, but I dont know how to use either of 
them... Any help in this regard would be appreciated...
Thanks in advance,
Arun



--__--__--

Message: 9
Date: 11 Mar 2003 17:32:26 -0000
From: "Arun Kumar Srinivasan" <sakumar79 at rediffmail.com>
Reply-To: "Arun Kumar Srinivasan" <sakumar79 at rediffmail.com>
To: cpbotha at ieee.org
Cc: vtkusers at public.kitware.com
Subject: [vtkusers] Using VTK in an existing OpenGL window

Hi,
    I noticed your reply in vtk mailing list for using VTK in an 
existing OpenGL window...
>You could pass the window ID of the configured Window to the
>vtkRenderWindow::SetWindowId() call, followed by a Render().  
>Have a
>look at
>some of the widgets that combine VTK with the various widget sets 
>to
>see how
>this works.
     When I tried to do this, I got the following message:
objects.cpp(107) : error C2039: 'SetWindowID' : is not a member of 
'vtkRenderWindow'

      My code has the following lines:
 	wid=glutGetWindow();  // wid is an int
        ....

 	ren=vtkRenderer::New();
 	renwin=vtkRenderWindow::New();
 	renwin->SetWindowID(wid);
 	iren = vtkRenderWindowInteractor::New();
 	renwin->AddRenderer(ren);
 	iren->SetRenderWindow(renwin);
 	for (i=0;i<3;i++)
 		ren->AddActor(objs[i]);
 	renwin->Render();
 	iren->Start();

Thanks in advance,
Arun



--__--__--

_______________________________________________
vtkusers mailing list
vtkusers at public.kitware.com
http://public.kitware.com/mailman/listinfo/vtkusers


End of vtkusers Digest




More information about the vtkusers mailing list