[vtkusers] How do I install VTK

ezim mansur ezimmansur at yahoo.com
Thu Sep 27 15:15:34 EDT 2007


I am quite new to VTK.
  I tried installing the VTK and tried CMake somehow. But I could not make it run.
  Could anyone explain how to install the VTK invironment and the CMAKE, And how I use the environment....
  Thanks.

vtkusers-request at vtk.org wrote:
  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-owner 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. Stream Lines (Renato Cesar Pompeu)
2. [vtkusers]color window+color level (m26404030 at john.petra.ac.id)
3. Segmentation fault with sample applications (ATI graphics
problem?) (Charlotte Curtis)
4. Re: Segmentation fault with sample applications (ATI graphics
problem?) (Mathieu Malaterre)
5. make a surface plot transparent (yadin Bocuma Rivas)
6. make a surface plot transparent (yadin Bocuma Rivas)
7. Threshold based segmentation (samo)
8. Can VTK be built with Mesa under Windows? (Maurice Samulski)
9. vtkRenderWindowInteractor not responding to keybord input
(Christophe Peyret)
10. Re: vtkRenderWindowInteractor not responding to keybord input
(Mathieu Malaterre)


----------------------------------------------------------------------

Message: 1
Date: Wed, 26 Sep 2007 16:55:51 +0000
From: Renato Cesar Pompeu 
Subject: [vtkusers] Stream Lines
To: 
Message-ID: 
Content-Type: text/plain; charset="iso-8859-1"


In each point I have three vectors vx [i] [j] [k], vy [i] [j] [k] and vz [i] [j] [k]. I would like to trace the corresponding lines of flow to these vectors. How is possible to make it? Somebody has some example in C++? 

Thanks a lot.
_________________________________________________________________
Receba GRÁTIS as últimas novidades do esporte direto no seu Messenger!
http://signup.alerts.live.com/alerts/login.do?PINID=37485679&returnURL=http://www.nivea.com.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/vtkusers/attachments/20070926/e6fb7313/attachment.html

------------------------------

Message: 2
Date: Thu, 27 Sep 2007 00:48:11 +0700
From: m26404030 at john.petra.ac.id
Subject: [vtkusers]color window+color level
To: vtkusers at vtk.org
Message-ID: <1190828891.46fa9b5becb4a at mail.petra.ac.id>
Content-Type: text/plain; charset=ISO-8859-1



hi all, i want to display 2D image(BMP image).
This is my code

void main()
{
vtkBMPReader *reader=vtkBMPReader::New();
reader->SetFileName("image.bmp");
reader->Update();

vtkImageViewer *viewer=vtkImageViewer::New();
viewer->SetInput(reader->GetOutput());
//viewer->SetColorWindow();
//viewer->SetColorLevel();
viewer->Render();
}

i can display the image but the result is not good.(the image looks darker)
i believe the problem is in the SetColorWindow and SetColorLevel function.
how can i specify the parameter of those two functions so i can display the
image exactly the same as the original image??(i have tried some values but the
display still not good enough)



thanx a lot..


------------------------------

Message: 3
Date: Wed, 26 Sep 2007 17:06:02 -0400
From: "Charlotte Curtis" 
Subject: [vtkusers] Segmentation fault with sample applications (ATI
graphics problem?)
To: vtkusers at vtk.org
Message-ID:
<117c5ac20709261406y32a664bdm1d866dce8445206c at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

I'm a new user of ITK/VTK, and I just finished compiling and building the
sample applications for ITK. However, when I run them (for example,
ThresholdSegmentationLevelSet), I always get a segmentation fault.
Sometimes it happens when I click on Image Display, and sometimes I can
display the image no problem - the only consistency is that it always
crashes when I click VTK Render. I tried running it in GDB and this is my
stack trace (minus a bunch of garbage lines):

#0 0xb7a01f2f in memcpy () from /lib/libc.so.6
#1 0xb64b080f in std::string::_S_copy_chars () from /usr/lib/libstdc++.so.5
#2 0xb64b466d in
std::string::_M_replace_safe<__gnu_cxx::__normal_iteratorstd::string> () from /usr/lib/libstdc++.so.5
#3 0xb64b4595 in std::string::_M_replace () from
/usr/lib/libstdc++.so.5
#4 0xb64b29fb in std::string::replace () from /usr/lib/libstdc++.so.5
#5 0xb6c0eb60 in Initialize () from /usr/lib/dri/fglrx_dri.so
#6 0xb6beccb8 in ShSetResourceLimits () from /usr/lib/dri/fglrx_dri.so
#7 0xb6756a09 in __glslATIInitFrontEndParser () from
/usr/lib/dri/fglrx_dri.so
#8 0xb6957da3 in __glEarlyInitContext () from /usr/lib/dri/fglrx_dri.so
#9 0xb67b3942 in __glATICreateContext () from /usr/lib/dri/fglrx_dri.so
#10 0xb6a3cfb9 in fglX11CreateHWContext () from /usr/lib/dri/fglrx_dri.so
#11 0xb6a540a8 in ?? () from /usr/lib/dri/fglrx_dri.so
#15 0xb6a53345 in ?? () from /usr/lib/dri/fglrx_dri.so
#23 0xb6a535b6 in ?? () from /usr/lib/dri/fglrx_dri.so

>From the looks of things, it's something to do with the direct rending of my
graphics card driver (ATI X1600).

This happens with my dataset as well as with VTKData samples (such as
VTKData/data/HeadMRVolume.mhd). Any clue what I can do? It's a little
discouraging that not even the sample applications work. Thanks,

Charlotte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/vtkusers/attachments/20070926/e796f29b/attachment-0001.htm

------------------------------

Message: 4
Date: Thu, 27 Sep 2007 09:56:10 +0200
From: "Mathieu Malaterre" 
Subject: Re: [vtkusers] Segmentation fault with sample applications
(ATI graphics problem?)
To: "Charlotte Curtis" 
Cc: vtkusers at vtk.org
Message-ID:

Content-Type: text/plain; charset=ISO-8859-1

Hi Charlotte,

You can easily switch to software mode rendering:

http://www.vtk.org/Wiki/VTK_OpenGL#Debugging_the_ATI_libGL

For example:

$ export LIBGL_ALWAYS_INDIRECT=1
$ ./my_vtk_example

If your program is running fine this way. I would suggest you try to
use a more recent fglrx driver. If this still does not work, get
someone to reimplement this buggy driver from the specs:
http://www.amd.com/us-en/Corporate/VirtualPressRoom/0,,51_104_543~119372,00.html

;)

-Mathieu

On 9/26/07, Charlotte Curtis wrote:
> I'm a new user of ITK/VTK, and I just finished compiling and building the
> sample applications for ITK. However, when I run them (for example,
> ThresholdSegmentationLevelSet), I always get a segmentation fault.
> Sometimes it happens when I click on Image Display, and sometimes I can
> display the image no problem - the only consistency is that it always
> crashes when I click VTK Render. I tried running it in GDB and this is my
> stack trace (minus a bunch of garbage lines):
>
> #0 0xb7a01f2f in memcpy () from /lib/libc.so.6
> #1 0xb64b080f in std::string::_S_copy_chars () from /usr/lib/libstdc++.so.5
> #2 0xb64b466d in
> std::string::_M_replace_safe<__gnu_cxx::__normal_iterator> std::string> () from /usr/lib/libstdc++.so.5
> #3 0xb64b4595 in std::string::_M_replace () from
> /usr/lib/libstdc++.so.5
> #4 0xb64b29fb in std::string::replace () from /usr/lib/libstdc++.so.5
> #5 0xb6c0eb60 in Initialize () from /usr/lib/dri/fglrx_dri.so
> #6 0xb6beccb8 in ShSetResourceLimits () from /usr/lib/dri/fglrx_dri.so
> #7 0xb6756a09 in __glslATIInitFrontEndParser () from
> /usr/lib/dri/fglrx_dri.so
> #8 0xb6957da3 in __glEarlyInitContext () from /usr/lib/dri/fglrx_dri.so
> #9 0xb67b3942 in __glATICreateContext () from /usr/lib/dri/fglrx_dri.so
> #10 0xb6a3cfb9 in fglX11CreateHWContext () from /usr/lib/dri/fglrx_dri.so
> #11 0xb6a540a8 in ?? () from /usr/lib/dri/fglrx_dri.so
> #15 0xb6a53345 in ?? () from /usr/lib/dri/fglrx_dri.so
> #23 0xb6a535b6 in ?? () from /usr/lib/dri/fglrx_dri.so
>
> From the looks of things, it's something to do with the direct rending of my
> graphics card driver (ATI X1600).
>
> This happens with my dataset as well as with VTKData samples (such as
> VTKData/data/HeadMRVolume.mhd). Any clue what I can do?
> It's a little discouraging that not even the sample applications work.
> Thanks,
>
> Charlotte
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Mathieu


------------------------------

Message: 5
Date: Thu, 27 Sep 2007 03:40:18 -0700 (PDT)
From: yadin Bocuma Rivas 
Subject: [vtkusers] make a surface plot transparent
To: vtkusers at vtk.org
Message-ID: <332961.63485.qm at web51310.mail.re2.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi!
I have these program almost working
it plot a surface from given poins using 
now all that i would like to do is to make the surface looking like transparent (opaque)
how can i do this? any ideas? it all looks red (i do not want any color just transparent )
i atached the python file
please help me




____________________________________________________________________________________
¡Sé un mejor ambientalista!
Encuentra consejos para cuidar el lugar donde vivimos. 
http://telemundo.yahoo.com/promos/mejorambientalista.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/vtkusers/attachments/20070927/440574d0/attachment-0001.html

------------------------------

Message: 6
Date: Thu, 27 Sep 2007 03:54:02 -0700 (PDT)
From: yadin Bocuma Rivas 
Subject: [vtkusers] make a surface plot transparent
To: vtkusers at vtk.org
Message-ID: <636560.31770.qm at web51308.mail.re2.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: =?utf-8?q?surfaceplot.py?=
Type: text/x-python
Size: 6880 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/vtkusers/attachments/20070927/9f92655d/utf-8qsurfaceplot-0001.py

------------------------------

Message: 7
Date: Thu, 27 Sep 2007 04:07:23 -0700 (PDT)
From: samo 
Subject: [vtkusers] Threshold based segmentation
To: vtkusers at vtk.org
Message-ID: <12918966.post at talk.nabble.com>
Content-Type: text/plain; charset=us-ascii



Hello together

What I would like to do is reconstruct a 3D surface out of CT data. The user
of the program could, for example, chose a pixel out of the ct data and that
grey value of the pixel would be the contour value for the marching cubes
algorithm. Additionaly, a region growing would be very nice. Does anybody
know whether something like this is implemented in vtk? Or do I have to
implement it on my own?

Thank you very much

-- 
View this message in context: http://www.nabble.com/Threshold-based-segmentation-tf4527683.html#a12918966
Sent from the VTK - Users mailing list archive at Nabble.com.



------------------------------

Message: 8
Date: Thu, 27 Sep 2007 13:52:47 +0200
From: "Maurice Samulski" 
Subject: [vtkusers] Can VTK be built with Mesa under Windows?
To: vtkusers at vtk.org
Message-ID:

Content-Type: text/plain; charset="iso-8859-1"

I've sucessfully compiled VTK and Qt under Windows, and all the tests pass.
However, I want
to use Mesa GL libraries (which are also available for Windows) with VTK. Is
that in anyway possible?

When recompiling VTK with Mesa support, I get the following errors:

In file included from C:/Dev/vtk-5.0.3/Rendering/vtkGraphicsFactory.cxx:71:
C:/Dev/vtk-5.0.3/Rendering/vtkXMesaRenderWindow.h:26:73: X11/Xlib.h: No such
file or directory
C:/Dev/vtk-5.0.3/Rendering/vtkXMesaRenderWindow.h:27:74: X11/Xutil.h: No
such file or directory
In file included from C:/Dev/vtk-5.0.3/Rendering/vtkGraphicsFactory.cxx:71:
C:/Dev/vtk-5.0.3/Rendering/vtkXMesaRenderWindow.h:78: error: `Colormap' does
not name a type
C:/Dev/vtk-5.0.3/Rendering/vtkXMesaRenderWindow.h:79: error: ISO C++ forbids
declaration of `Visual' with no type

Obviously, I do not have X on Windows, is there a some sort of
vtkWin32MesaRenderWindow available?

Thanks for your time.

Best Regards,

Maurice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/vtkusers/attachments/20070927/8e343de2/attachment.htm

------------------------------

Message: 9
Date: Thu, 27 Sep 2007 16:12:45 +0200
From: Christophe Peyret 
Subject: [vtkusers] vtkRenderWindowInteractor not responding to
keybord input
To: vtkusers at vtk.org
Message-ID: 
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hello,

I am using vtk-5.0.3 under OSX 10.4.10. I have compiled the example 
cone5.cxx that you can find here:

http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/ 
Tutorial/Step5/Cxx/Cone5.cxx?root=VTK&content-type=text/plain

when I run the program it works and I can play with the mouse in 
order to rotate or zoom the render. However, the 
vtkRenderWindowInteractor is not responding to keyboard. The 
character I press just print in the terminal window but has no effect 
on the render itself. In order to quit I need to enter Crtl + C :(

Christophe

Here is my compilation makefile


TARGET = cone5

LD = icpc
CC = icc
CXX = icpc

SRCDIR = ./src
OBJDIR = ./obj
DIREXE = ./
INCL = -I$(VTK_HOME)/include/vtk-5.0

CCFLAGS = -c -O3 -ip -unroll0 $(INCL)

LDFLAGS = -framework Cocoa -framework OpenGL \
-L$(VTK_HOME)/lib\
-lvtkCommon\
-lvtkDICOMParser\
-lvtkFiltering\
-lvtkGenericFiltering\
-lvtkGraphics\
-lvtkHybrid \
-lvtkIO\
-lvtkImaging\
-lvtkNetCDF\
-lvtkRendering\
-lvtkVolumeRendering\
-lvtkWidgets\
-lvtkexoIIc\
-lvtkexpat\
-lvtkfreetype\
-lvtkftgl\
-lvtkjpeg\
-lvtkpng\
-lvtksys\
-lvtktiff\
-lvtkzlib

# Building application

OBJS = $(OBJDIR)/cone5.o

$(TARGET) : $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $(DIREXE)$(TARGET)
@echo ----------- ${TARGET} created -----------

# Compilation

$(OBJDIR)/%.o : $(SRCDIR)/%.cxx
$(CXX) $(CCFLAGS) -o $@ $<

$(OBJDIR)/%.o : $(SRCDIR)/%.c
$(CC) $(CCFLAGS) -o $@ $<


clean :
\rm $(OBJS) $(DIREXE)$(TARGET)



------------------------------

Message: 10
Date: Thu, 27 Sep 2007 16:42:02 +0200
From: "Mathieu Malaterre" 
Subject: Re: [vtkusers] vtkRenderWindowInteractor not responding to
keybord input
To: "Christophe Peyret" 
Cc: vtkusers at vtk.org
Message-ID:

Content-Type: text/plain; charset=ISO-8859-1

Salut Christophe,

This is a known issue in VTK on MacOSX. You need to :

replace

ADD_EXECUTABLE(Cone5 Cone5.cxx)

with

ADD_EXECUTABLE(Cone5 MACOSX_BUNDLE Cone5.cxx)

in VTK/Examples/Tutorial/Step5/Cxx/CMakeLists.txt

HTH
-Mathieu

On 9/27/07, Christophe Peyret wrote:
> Hello,
>
> I am using vtk-5.0.3 under OSX 10.4.10. I have compiled the example
> cone5.cxx that you can find here:
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Examples/
> Tutorial/Step5/Cxx/Cone5.cxx?root=VTK&content-type=text/plain
>
> when I run the program it works and I can play with the mouse in
> order to rotate or zoom the render. However, the
> vtkRenderWindowInteractor is not responding to keyboard. The
> character I press just print in the terminal window but has no effect
> on the render itself. In order to quit I need to enter Crtl + C :(
>
> Christophe
>
> Here is my compilation makefile
>
>
> TARGET = cone5
>
> LD = icpc
> CC = icc
> CXX = icpc
>
> SRCDIR = ./src
> OBJDIR = ./obj
> DIREXE = ./
> INCL = -I$(VTK_HOME)/include/vtk-5.0
>
> CCFLAGS = -c -O3 -ip -unroll0 $(INCL)
>
> LDFLAGS = -framework Cocoa -framework OpenGL \
> -L$(VTK_HOME)/lib\
> -lvtkCommon\
> -lvtkDICOMParser\
> -lvtkFiltering\
> -lvtkGenericFiltering\
> -lvtkGraphics\
> -lvtkHybrid \
> -lvtkIO\
> -lvtkImaging\
> -lvtkNetCDF\
> -lvtkRendering\
> -lvtkVolumeRendering\
> -lvtkWidgets\
> -lvtkexoIIc\
> -lvtkexpat\
> -lvtkfreetype\
> -lvtkftgl\
> -lvtkjpeg\
> -lvtkpng\
> -lvtksys\
> -lvtktiff\
> -lvtkzlib
>
> # Building application
>
> OBJS = $(OBJDIR)/cone5.o
>
> $(TARGET) : $(OBJS)
> $(LD) $(LDFLAGS) $(OBJS) -o $(DIREXE)$(TARGET)
> @echo ----------- ${TARGET} created -----------
>
> # Compilation
>
> $(OBJDIR)/%.o : $(SRCDIR)/%.cxx
> $(CXX) $(CCFLAGS) -o $@ $<
>
> $(OBJDIR)/%.o : $(SRCDIR)/%.c
> $(CC) $(CCFLAGS) -o $@ $<
>
>
> clean :
> \rm $(OBJS) $(DIREXE)$(TARGET)
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>


-- 
Mathieu


------------------------------

_______________________________________________
vtkusers mailing list
vtkusers at vtk.org
http://www.vtk.org/mailman/listinfo/vtkusers


End of vtkusers Digest, Vol 41, Issue 28
****************************************


       
---------------------------------
Got a little couch potato? 
Check out fun summer activities for kids.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070927/e3a857e5/attachment.htm>


More information about the vtkusers mailing list