From daviddarkzero at hotmail.com Sun Dec 2 00:10:52 2007 From: daviddarkzero at hotmail.com (Jose David Pfuturi Huisa) Date: Sun, 2 Dec 2007 06:10:52 +0100 Subject: [vtkusers] QT,Eclipse,VTK and c++ Message-ID: Hello all. I use Eclipse ,c++ and QT under WindowXP. I have installed Eclipse, mingw32 with QT4 successfully but i can only run c++ code, i want to add vtk code therefore i changed the file *.pro as follows: TEMPLATE = app TARGET = QTvtkConsole QT += core \ gui \ opengl HEADERS += SOURCES += Cone.cc FORMS += RESOURCES += INCLUDEPATH += C:/vtk5.0-32b/include/vtk-5.0 LIBS += C:\vtk5.0-32b\lib\vtk-5.0 but i got this result: mingw32-make debug mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `F:/MisProyectosEclipse3.2/QTvtkConsole' g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o "debug\QTvtkConsole.exe" debug\Cone.o -L"c:\Qt\4.1.4\lib" -lopengl32 -lglu32 -lgdi32 -luser32 -lmingw32 -lqtmaind C:\vtk5.0-32b\lib\vtk-5.0 -lQtOpenGLd4 -lQtGuid4 -lQtCored4 C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: C:\vtk5.0-32b\lib\vtk-5.0: No such file: Permission denied collect2: ld returned 1 exit status mingw32-make[1]: *** [debug\QTvtkConsole.exe] Error 1 mingw32-make[1]: Leaving directory `F:/MisProyectosEclipse3.2/QTvtkConsole' mingw32-make: *** [debug] Error 2 But when i removed LIBS i had: mingw32-make debug mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `F:/MisProyectosEclipse3.2/QTvtkConsole' g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o "debug\QTvtkConsole.exe" debug\Cone.o -L"c:\Qt\4.1.4\lib" -lopengl32 -lglu32 -lgdi32 -luser32 -lmingw32 -lqtmaind -lQtOpenGLd4 -lQtGuid4 -lQtCored4 debug\Cone.o(.text+0x107): In function `Z5qMainiPPc': F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:12: undefined reference to `_imp___ZN11vtkRenderer3NewEv' debug\Cone.o(.text+0x111):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:14: undefined reference to `_imp___ZN15vtkRenderWindow3NewEv' debug\Cone.o(.text+0x15c):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:19: undefined reference to `_imp___ZN13vtkConeSource3NewEv' debug\Cone.o(.text+0x183):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:21: undefined reference to `_imp___ZN17vtkPolyDataMapper3NewEv' debug\Cone.o(.text+0x193):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:22: undefined reference to `_imp___ZN20vtkPolyDataAlgorithm9GetOutputEv' debug\Cone.o(.text+0x1a4):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:22: undefined reference to `_imp___ZN17vtkPolyDataMapper8SetInputEP11vtkPolyData' debug\Cone.o(.text+0x1ab):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:23: undefined reference to `_imp___ZN8vtkActor3NewEv' debug\Cone.o(.text+0x1de):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:27: undefined reference to `_imp___ZN11vtkRenderer8AddActorEP7vtkProp' collect2: ld returned 1 exit status mingw32-make[1]: *** [debug\QTvtkConsole.exe] Error 1 mingw32-make[1]: Leaving directory `F:/MisProyectosEclipse3.2/QTvtkConsole' mingw32-make: *** [debug] Error 2 Could someone tell me why i get the message No such file: Permission denied and how i can run VTK ?? thanks in advance, a lot Jos? _________________________________________________________________ Tecnolog?a, moda, motor, viajes,?suscr?bete a nuestros boletines para estar a la ?ltima http://newsletters.msn.com/hm/maintenanceeses.asp?L=ES&C=ES&P=WCMaintenance&Brand=WL&RU=http%3a%2f%2fmail.live.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shekhar.Chandra at sci.monash.edu.au Sun Dec 2 21:06:58 2007 From: Shekhar.Chandra at sci.monash.edu.au (Shakes) Date: Mon, 03 Dec 2007 13:06:58 +1100 Subject: [vtkusers] QT,Eclipse,VTK and c++ In-Reply-To: References: Message-ID: <475364C2.6010607@sci.monash.edu.au> Hi Jose, U should use the line: LIBS += -LC:\vtk5.0-32b\lib\vtk-5.0 instead of LIBS += C:\vtk5.0-32b\lib\vtk-5.0 and then link the libraries as -lvtkRendering (with the -l in front). So u get LIBS += -LC:\vtk5.0-32b\lib\vtk-5.0 -lvtkRendering These are the standard gcc link instructions that u directly put into Qt projects. U could alternatively put the libraries into the mingw lib directory. Google for more info on how to link using gcc. Note u may need to link more vtk libraries than just Rendering. Hope that helps. Cheers Shakes PS: This is my project linkage (edited) unix:INCLUDEPATH += /usr/include/vtk-5.0 /usr/local/include/vtk-5.0 unix:LIBS += -L/usr/local/lib unix:LIBS += -lvtkRendering -lvtkFiltering -lvtkGraphics -lvtkVolumeRendering -lvtkHybrid -lvtkImaging -lvtkIO -lvtkCommon win32-msvc2005:LIBS += vtkRendering.lib vtkFiltering.lib vtkGraphics.lib vtkVolumeRendering.lib vtkHybrid.lib vtkImaging.lib vtkIO.lib vtkCommon.lib win32-g++:LIBS += -lvtkRendering -lvtkFiltering -lvtkHybrid -lvtkGraphics -lvtkVolumeRendering -lvtkImaging -lvtkIO -lvtkCommon Jose David Pfuturi Huisa wrote: > Hello all. I use Eclipse ,c++ and QT under WindowXP. I have installed > Eclipse, mingw32 with QT4 successfully but i can only run c++ code, i > want to add vtk code therefore i changed the file *.pro as follows: > > TEMPLATE = app > > TARGET = QTvtkConsole > > QT += core \ > > gui \ > > opengl > > HEADERS += > > SOURCES += Cone.cc > > FORMS += > > RESOURCES += > > INCLUDEPATH += C:/vtk5.0-32b/include/vtk-5.0 > > LIBS += C:\vtk5.0-32b\lib\vtk-5.0 > but i got this result: > > > mingw32-make debug > > mingw32-make -f Makefile.Debug > > mingw32-make[1]: Entering directory > `F:/MisProyectosEclipse3.2/QTvtkConsole' > > g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import > -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o > "debug\QTvtkConsole.exe" debug\Cone.o -L"c:\Qt\4.1.4\lib" -lopengl32 > -lglu32 -lgdi32 -luser32 -lmingw32 -lqtmaind C:\vtk5.0-32b\lib\vtk-5.0 > -lQtOpenGLd4 -lQtGuid4 -lQtCored4 > > C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: > C:\vtk5.0-32b\lib\vtk-5.0: No such file: Permission denied > > collect2: ld returned 1 exit status > > mingw32-make[1]: *** [debug\QTvtkConsole.exe] Error 1 > > mingw32-make[1]: Leaving directory > `F:/MisProyectosEclipse3.2/QTvtkConsole' > > mingw32-make: *** [debug] Error 2 > > > > But when i removed LIBS i had: > > > > mingw32-make debug > > mingw32-make -f Makefile.Debug > > mingw32-make[1]: Entering directory > `F:/MisProyectosEclipse3.2/QTvtkConsole' > > g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import > -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o > "debug\QTvtkConsole.exe" debug\Cone.o -L"c:\Qt\4.1.4\lib" -lopengl32 > -lglu32 -lgdi32 -luser32 -lmingw32 -lqtmaind -lQtOpenGLd4 -lQtGuid4 > -lQtCored4 > > debug\Cone.o(.text+0x107): In function `Z5qMainiPPc': > > F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:12: undefined reference > to `_imp___ZN11vtkRenderer3NewEv' > > debug\Cone.o(.text+0x111):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:14: > undefined reference to `_imp___ZN15vtkRenderWindow3NewEv' > > debug\Cone.o(.text+0x15c):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:19: > undefined reference to `_imp___ZN13vtkConeSource3NewEv' > > debug\Cone.o(.text+0x183):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:21: > undefined reference to `_imp___ZN17vtkPolyDataMapper3NewEv' > > debug\Cone.o(.text+0x193):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:22: > undefined reference to `_imp___ZN20vtkPolyDataAlgorithm9GetOutputEv' > > debug\Cone.o(.text+0x1a4):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:22: > undefined reference to > `_imp___ZN17vtkPolyDataMapper8SetInputEP11vtkPolyData' > > debug\Cone.o(.text+0x1ab):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:23: > undefined reference to `_imp___ZN8vtkActor3NewEv' > > debug\Cone.o(.text+0x1de):F:/MisProyectosEclipse3.2/QTvtkConsole/Cone.cc:27: > undefined reference to `_imp___ZN11vtkRenderer8AddActorEP7vtkProp' > > collect2: ld returned 1 exit status > > mingw32-make[1]: *** [debug\QTvtkConsole.exe] Error 1 > > mingw32-make[1]: Leaving directory > `F:/MisProyectosEclipse3.2/QTvtkConsole' > > mingw32-make: *** [debug] Error 2 > > > > > > Could someone tell me why i get the message No such file: Permission > denied and how i can run VTK ?? > > > > thanks in advance, a lot > > Jos? > > > > > > > > > > > ------------------------------------------------------------------------ > Tecnolog?a, moda, motor, viajes,?suscr?bete a nuestros boletines para > estar a la ?ltima MSN Newsletters > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergidt at gmail.com Mon Dec 3 04:57:48 2007 From: sergidt at gmail.com (Sergi Dote) Date: Mon, 3 Dec 2007 10:57:48 +0100 Subject: [vtkusers] problem with a window response Message-ID: <24c6a4c30712030157t5bf0e1fcv8aabac484bb98f15@mail.gmail.com> in first point, excuse my english, I don't have a good english. I want to expose our problem: We are developing a medical application on linux. This application works with very big data (medical volumes). We store this data in VtkImageTypePointer format. I must to say that we works with a medical screens, whose has a high resolution and a big size. Our application has a 2D viewer. When open some volume, always runs correctly, but if we continue open a 2D viewers, there is a moment that the vtkImageViewer2 class that we use to do the visualization in a 2D viewer, has a very slow response. Then, if minimize the application window, this response like we deside, this is very fast like ever. We think is possible that don't have enough memory, but we works with 4GB of memory RAM and we test the use of memory and not works at maximum, I wat to say that we think that is not a problem of memory. Another explanation, when we have a 2D viewer that runs slow, if alternate to a previous viewer, this runs correctly!! * Do you can help us please? Thank you very much. * -- .: Sergi Dote Teixidor :. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hedicu at gmail.com Mon Dec 3 11:10:46 2007 From: hedicu at gmail.com (hedicu) Date: Mon, 3 Dec 2007 08:10:46 -0800 (PST) Subject: [vtkusers] Object not rendered using qvtk on powerpc In-Reply-To: <14050301.post@talk.nabble.com> References: <14050301.post@talk.nabble.com> Message-ID: <14132763.post@talk.nabble.com> Everything is ok now. For the ones interested I'll explain shortly what I did: 1) Compiled again Qt 4.x.x and vtk (with GUISupport activated and so on..., for the ones who are working on a x86_64 machine i'll suggest to set the C_FLAGS and the CXX_FLAGS = -fPIC) 2) Tried to compile the examples included in vtk/GUI/Qt with ccmake. After a while I realized that the whole qt path for qglobal.h and the libraries including file names had to be set in the corresponding variables. Then set the vtk diretory variable, and the example run without problems. 3) Since I don't feel so comfortable with CMakeLists.txt files I decided to try qmake as Makefile generator. This was not so hard, just create the .pro file including vtk libraries, header files and sources (the order in which the libraries are written matters!), and type qmake .pro. And that's all. Thanks again or your help. H'ector. hedicu wrote: > > Hi everyone, > > here i'm trying to build an example on a powerpc using the QVTKWidget > class. It compiles but when executed nothing can be seen in the > window. The code is the following: > > #include > #include "QVTKWidget.h" > //#include > > #include > #include > #include > #include > #include > > int main(int argc, char* argv[]) { > > vtkConeSource *cone = vtkConeSource::New(); > cone->SetResolution(100); > cone->SetRadius(10); > cone->SetHeight(7); > cone->SetCenter(0,0,0); > > vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New(); > coneMapper->SetInputConnection(cone->GetOutputPort()); > > vtkActor *coneActor = vtkActor::New(); > coneActor->SetMapper(coneMapper); > > vtkRenderer *coneRen = vtkRenderer::New(); > coneRen->AddActor(coneActor); > > vtkRenderWindow *coneRenWin = vtkRenderWindow::New(); > coneRenWin->AddRenderer(coneRen); > > QApplication app(argc, argv); > QVTKWidget wdgt; > > wdgt.SetRenderWindow(coneRenWin); > > #if QT_VERSION < 0x040000 > app.setMainWidget(&wdgt); > #endif > wdgt.show(); > > > return app.exec(); > } > > and the makefile > > ############################################################################# > # Makefile for building: qvtk_gcc.app/Contents/MacOS/qvtk_gcc > # Generated by qmake (2.01a) (Qt 4.2.3) on: Wed Nov 21 16:04:39 2007 > # Project: qvtk_gcc.pro > # Template: app > # Command: /usr/local/lib/powerpc/qt/bin/qmake -macx -o Makefile > qvtk_gcc.pro > ############################################################################# > > ####### Compiler, tools and options > > CC = cc > CXX = c++ > LEX = flex > YACC = yacc > DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED > CFLAGS = -pipe -g -Wall -W -F/usr/local/lib/powerpc/qt/lib > $(DEFINES) > CXXFLAGS = -pipe -g -Wall -W -F/usr/local/lib/powerpc/qt/lib > $(DEFINES) > LEXFLAGS = > YACCFLAGS = -d > INCPATH = > -I/private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++ -I. > -I/private/var/automount/usr/local/lib/powerpc/qt/lib/QtCore.framework/Versions/4/Headers > -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtCore > -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtCore > -I/private/var/automount/usr/local/lib/powerpc/qt/lib/QtGui.framework/Versions/4/Headers > -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtGui > -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtGui > -I/private/var/automount/usr/local/lib/powerpc/qt/include -I. -I. -I. > -I/usr/local/lib/powerpc/vtk-gcc/include/vtk-5.1 > -I/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers > -I/Library/Frameworks/3DconnexionClient.framework/Headers > LINK = c++ > LFLAGS = -headerpad_max_install_names > LIBS = $(SUBLIBS) -framework 3DconnexionClient -framework > Carbon -framework GLUT -framework openGL -fleading-underscore > -I/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers > -I/Library/Frameworks/3DconnexionClient.framework/ > -F/usr/local/lib/powerpc/qt/lib -L/usr/local/lib/powerpc/qt/lib > -framework QtGui -L/usr/local/lib/powerpc/vtk-gcc/lib -lvtkRendering > -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtkCommon -lvtksys > -lvtkpng -lvtktiff -lvtkzlib -lvtkjpeg -lvtkexpat -lvtkftgl > -lvtkfreetype -framework OpenGL -framework AGL -framework Carbon > -framework QuickTime -framework AppKit -framework QtCore -lz -lm > -L/usr/X11R6/lib -lX11 -lGL -lXt -liconv -framework > ApplicationServices -L/System/Library/Frameworks -framework OpenGL > -framework AppKit -framework AGL -framework Carbon -framework > 3DconnexionClient > AR = ar cq > RANLIB = ranlib -s > QMAKE = /usr/local/lib/powerpc/qt/bin/qmake > TAR = tar -cf > COMPRESS = gzip -9f > COPY = cp -f > COPY_FILE = cp -f > COPY_DIR = cp -f -R > INSTALL_FILE = $(COPY_FILE) > INSTALL_DIR = $(COPY_DIR) > INSTALL_PROGRAM = $(COPY_FILE) > DEL_FILE = rm -f > SYMLINK = ln -sf > DEL_DIR = rmdir > MOVE = mv -f > CHK_DIR_EXISTS= test -d > MKDIR = mkdir -p > > ####### Output directory > > OBJECTS_DIR = ./ > > ####### Files > > SOURCES = QVTKWidget.cpp \ > moc_QVTKWidget.cpp \ > test.cpp > # vtkSpcNavInteractor.cpp > OBJECTS = QVTKWidget.o \ > moc_QVTKWidget.o \ > test.o > # vtkSpcNavInteractor.o > DIST = > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf \ > qvtk_gcc.pro > QMAKE_TARGET = qvtk_gcc > DESTDIR = > TARGET = qvtk_gcc.app/Contents/MacOS/qvtk_gcc > > ####### Custom Compiler Variables > QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \ > -g \ > -Wall \ > -W > > > first: all > ####### Implicit rules > > .SUFFIXES: .o .c .cpp .cc .cxx .C > > .cpp.o: > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" > > .cc.o: > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" > > .cxx.o: > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" > > .C.o: > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" > > .c.o: > $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" > > ####### Build rules > > all: Makefile qvtk_gcc.app/Contents/PkgInfo > qvtk_gcc.app/Contents/Info.plist $(TARGET) > > $(TARGET): $(OBJECTS) > @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents/MacOS/ || $(MKDIR) > qvtk_gcc.app/Contents/MacOS/ > $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) > > Makefile: qvtk_gcc.pro > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++/qmake.conf > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf \ > /usr/local/lib/powerpc/qt/lib/QtGui.framework/QtGui.prl \ > /usr/local/lib/powerpc/qt/lib/QtCore.framework/QtCore.prl > $(QMAKE) -macx -o Makefile qvtk_gcc.pro > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf: > /usr/local/lib/powerpc/qt/lib/QtGui.framework/QtGui.prl: > /usr/local/lib/powerpc/qt/lib/QtCore.framework/QtCore.prl: > qmake: FORCE > @$(QMAKE) -macx -o Makefile qvtk_gcc.pro > > qvtk_gcc.app/Contents/PkgInfo: > @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents || $(MKDIR) > qvtk_gcc.app/Contents > @$(DEL_FILE) qvtk_gcc.app/Contents/PkgInfo > @echo "APPL????" >qvtk_gcc.app/Contents/PkgInfo > qvtk_gcc.app/Contents/Info.plist: > @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents || $(MKDIR) > qvtk_gcc.app/Contents > @$(DEL_FILE) qvtk_gcc.app/Contents/Info.plist > @sed -e "s, at ICON@,,g" -e "s, at EXECUTABLE@,qvtk_gcc,g" -e > "s, at TYPEINFO@,????,g" > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++/Info.plist.app >>qvtk_gcc.app/Contents/Info.plist > dist: > @$(CHK_DIR_EXISTS) .tmp/qvtk_gcc1.0.0 || $(MKDIR) > .tmp/qvtk_gcc1.0.0 > $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qvtk_gcc1.0.0/ && > $(COPY_FILE) --parents QVTKWidget.h .tmp/qvtk_gcc1.0.0/ && > $(COPY_FILE) --parents QVTKWidget.cpp test.cpp .tmp/qvtk_gcc1.0.0/ && > (cd `dirname .tmp/qvtk_gcc1.0.0` && $(TAR) qvtk_gcc1.0.0.tar > qvtk_gcc1.0.0 && $(COMPRESS) qvtk_gcc1.0.0.tar) && $(MOVE) `dirname > .tmp/qvtk_gcc1.0.0`/qvtk_gcc1.0.0.tar.gz . && $(DEL_FILE) -r > .tmp/qvtk_gcc1.0.0 > > > yaccclean: > lexclean: > clean:compiler_clean > -$(DEL_FILE) $(OBJECTS) > -$(DEL_FILE) *~ core *.core > > > ####### Sub-libraries > > distclean: clean > -$(DEL_FILE) -r qvtk_gcc.app > -$(DEL_FILE) Makefile > > > /usr/local/lib/powerpc/qt/bin/moc: > (cd $(QTDIR)/src/tools/moc && $(MAKE)) > > mocclean: compiler_moc_header_clean compiler_moc_source_clean > > mocables: compiler_moc_header_make_all compiler_moc_source_make_all > > compiler_objective_c_make_all: > compiler_objective_c_clean: > compiler_moc_header_make_all: moc_QVTKWidget.cpp > compiler_moc_header_clean: > -$(DEL_FILE) moc_QVTKWidget.cpp > moc_QVTKWidget.cpp: QVTKWidget.h \ > /private/var/automount/usr/local/lib/powerpc/qt/bin/moc > /usr/local/lib/powerpc/qt/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ > -D__GNUC__ QVTKWidget.h -o moc_QVTKWidget.cpp > > compiler_rcc_make_all: > compiler_rcc_clean: > compiler_image_collection_make_all: qmake_image_collection.cpp > compiler_image_collection_clean: > -$(DEL_FILE) qmake_image_collection.cpp > compiler_moc_source_make_all: > compiler_moc_source_clean: > compiler_rez_source_make_all: > compiler_rez_source_clean: > compiler_uic_make_all: > compiler_uic_clean: > compiler_clean: compiler_objective_c_clean compiler_moc_header_clean > compiler_rcc_clean compiler_image_collection_clean > compiler_moc_source_clean compiler_rez_source_clean compiler_uic_clean > > ####### Compile > > QVTKWidget.o: QVTKWidget.cpp QVTKWidget.h > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o QVTKWidget.o QVTKWidget.cpp > > test.o: test.cpp QVTKWidget.h > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o test.o test.cpp > > moc_QVTKWidget.o: moc_QVTKWidget.cpp > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_QVTKWidget.o > moc_QVTKWidget.cpp > > ####### Install > > install: FORCE > > uninstall: FORCE > > FORCE: > > It would be great if you could give me any hint. > > Thanks, > Hector. > -- View this message in context: http://www.nabble.com/Object-not-rendered-using-qvtk-on-powerpc-tf4906218.html#a14132763 Sent from the VTK - Users mailing list archive at Nabble.com. From hedicu at gmail.com Mon Dec 3 11:11:25 2007 From: hedicu at gmail.com (hedicu) Date: Mon, 3 Dec 2007 08:11:25 -0800 (PST) Subject: [vtkusers] Object not rendered using qvtk on powerpc In-Reply-To: <14050301.post@talk.nabble.com> References: <14050301.post@talk.nabble.com> Message-ID: <14132763.post@talk.nabble.com> Everything is ok now. For the ones interested I'll explain shortly what I did: 1) Compiled again Qt 4.x.x and vtk (with GUISupport activated and so on..., for the ones who are working on a x86_64 machine i suggest to set the C_FLAGS and the CXX_FLAGS = -fPIC) 2) Tried to compile the examples included in vtk/GUI/Qt with ccmake. After a while I realized that the whole qt path for qglobal.h and the libraries including file names had to be set in the corresponding variables. Then set the vtk diretory variable, and the example run without problems. 3) Since I don't feel so comfortable with CMakeLists.txt files I decided to try qmake as Makefile generator. This was not so hard, just create the .pro file including vtk libraries, header files and sources (the order in which the libraries are written matters!), and type qmake .pro. And that's all. Thanks again or your help. H'ector. hedicu wrote: > > Hi everyone, > > here i'm trying to build an example on a powerpc using the QVTKWidget > class. It compiles but when executed nothing can be seen in the > window. The code is the following: > > #include > #include "QVTKWidget.h" > //#include > > #include > #include > #include > #include > #include > > int main(int argc, char* argv[]) { > > vtkConeSource *cone = vtkConeSource::New(); > cone->SetResolution(100); > cone->SetRadius(10); > cone->SetHeight(7); > cone->SetCenter(0,0,0); > > vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New(); > coneMapper->SetInputConnection(cone->GetOutputPort()); > > vtkActor *coneActor = vtkActor::New(); > coneActor->SetMapper(coneMapper); > > vtkRenderer *coneRen = vtkRenderer::New(); > coneRen->AddActor(coneActor); > > vtkRenderWindow *coneRenWin = vtkRenderWindow::New(); > coneRenWin->AddRenderer(coneRen); > > QApplication app(argc, argv); > QVTKWidget wdgt; > > wdgt.SetRenderWindow(coneRenWin); > > #if QT_VERSION < 0x040000 > app.setMainWidget(&wdgt); > #endif > wdgt.show(); > > > return app.exec(); > } > > and the makefile > > ############################################################################# > # Makefile for building: qvtk_gcc.app/Contents/MacOS/qvtk_gcc > # Generated by qmake (2.01a) (Qt 4.2.3) on: Wed Nov 21 16:04:39 2007 > # Project: qvtk_gcc.pro > # Template: app > # Command: /usr/local/lib/powerpc/qt/bin/qmake -macx -o Makefile > qvtk_gcc.pro > ############################################################################# > > ####### Compiler, tools and options > > CC = cc > CXX = c++ > LEX = flex > YACC = yacc > DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED > CFLAGS = -pipe -g -Wall -W -F/usr/local/lib/powerpc/qt/lib > $(DEFINES) > CXXFLAGS = -pipe -g -Wall -W -F/usr/local/lib/powerpc/qt/lib > $(DEFINES) > LEXFLAGS = > YACCFLAGS = -d > INCPATH = > -I/private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++ -I. > -I/private/var/automount/usr/local/lib/powerpc/qt/lib/QtCore.framework/Versions/4/Headers > -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtCore > -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtCore > -I/private/var/automount/usr/local/lib/powerpc/qt/lib/QtGui.framework/Versions/4/Headers > -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtGui > -I/private/var/automount/usr/local/lib/powerpc/qt/include/QtGui > -I/private/var/automount/usr/local/lib/powerpc/qt/include -I. -I. -I. > -I/usr/local/lib/powerpc/vtk-gcc/include/vtk-5.1 > -I/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers > -I/Library/Frameworks/3DconnexionClient.framework/Headers > LINK = c++ > LFLAGS = -headerpad_max_install_names > LIBS = $(SUBLIBS) -framework 3DconnexionClient -framework > Carbon -framework GLUT -framework openGL -fleading-underscore > -I/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers > -I/Library/Frameworks/3DconnexionClient.framework/ > -F/usr/local/lib/powerpc/qt/lib -L/usr/local/lib/powerpc/qt/lib > -framework QtGui -L/usr/local/lib/powerpc/vtk-gcc/lib -lvtkRendering > -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtkCommon -lvtksys > -lvtkpng -lvtktiff -lvtkzlib -lvtkjpeg -lvtkexpat -lvtkftgl > -lvtkfreetype -framework OpenGL -framework AGL -framework Carbon > -framework QuickTime -framework AppKit -framework QtCore -lz -lm > -L/usr/X11R6/lib -lX11 -lGL -lXt -liconv -framework > ApplicationServices -L/System/Library/Frameworks -framework OpenGL > -framework AppKit -framework AGL -framework Carbon -framework > 3DconnexionClient > AR = ar cq > RANLIB = ranlib -s > QMAKE = /usr/local/lib/powerpc/qt/bin/qmake > TAR = tar -cf > COMPRESS = gzip -9f > COPY = cp -f > COPY_FILE = cp -f > COPY_DIR = cp -f -R > INSTALL_FILE = $(COPY_FILE) > INSTALL_DIR = $(COPY_DIR) > INSTALL_PROGRAM = $(COPY_FILE) > DEL_FILE = rm -f > SYMLINK = ln -sf > DEL_DIR = rmdir > MOVE = mv -f > CHK_DIR_EXISTS= test -d > MKDIR = mkdir -p > > ####### Output directory > > OBJECTS_DIR = ./ > > ####### Files > > SOURCES = QVTKWidget.cpp \ > moc_QVTKWidget.cpp \ > test.cpp > # vtkSpcNavInteractor.cpp > OBJECTS = QVTKWidget.o \ > moc_QVTKWidget.o \ > test.o > # vtkSpcNavInteractor.o > DIST = > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf \ > qvtk_gcc.pro > QMAKE_TARGET = qvtk_gcc > DESTDIR = > TARGET = qvtk_gcc.app/Contents/MacOS/qvtk_gcc > > ####### Custom Compiler Variables > QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS = -pipe \ > -g \ > -Wall \ > -W > > > first: all > ####### Implicit rules > > .SUFFIXES: .o .c .cpp .cc .cxx .C > > .cpp.o: > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" > > .cc.o: > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" > > .cxx.o: > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" > > .C.o: > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" > > .c.o: > $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" > > ####### Build rules > > all: Makefile qvtk_gcc.app/Contents/PkgInfo > qvtk_gcc.app/Contents/Info.plist $(TARGET) > > $(TARGET): $(OBJECTS) > @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents/MacOS/ || $(MKDIR) > qvtk_gcc.app/Contents/MacOS/ > $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) > > Makefile: qvtk_gcc.pro > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++/qmake.conf > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf > \ > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf \ > /usr/local/lib/powerpc/qt/lib/QtGui.framework/QtGui.prl \ > /usr/local/lib/powerpc/qt/lib/QtCore.framework/QtCore.prl > $(QMAKE) -macx -o Makefile qvtk_gcc.pro > > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/common/unix.conf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/qconfig.pri: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_functions.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt_config.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/exclusive_builds.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_pre.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_pre.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/objective_c.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/debug.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/default_post.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/default_post.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/warn_on.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/qt.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/unix/thread.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/moc.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/rez.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/mac/sdk.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/resources.prf: > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/features/uic.prf: > /usr/local/lib/powerpc/qt/lib/QtGui.framework/QtGui.prl: > /usr/local/lib/powerpc/qt/lib/QtCore.framework/QtCore.prl: > qmake: FORCE > @$(QMAKE) -macx -o Makefile qvtk_gcc.pro > > qvtk_gcc.app/Contents/PkgInfo: > @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents || $(MKDIR) > qvtk_gcc.app/Contents > @$(DEL_FILE) qvtk_gcc.app/Contents/PkgInfo > @echo "APPL????" >qvtk_gcc.app/Contents/PkgInfo > qvtk_gcc.app/Contents/Info.plist: > @$(CHK_DIR_EXISTS) qvtk_gcc.app/Contents || $(MKDIR) > qvtk_gcc.app/Contents > @$(DEL_FILE) qvtk_gcc.app/Contents/Info.plist > @sed -e "s, at ICON@,,g" -e "s, at EXECUTABLE@,qvtk_gcc,g" -e > "s, at TYPEINFO@,????,g" > /private/var/automount/usr/local/lib/powerpc/qt/mkspecs/macx-g++/Info.plist.app >>qvtk_gcc.app/Contents/Info.plist > dist: > @$(CHK_DIR_EXISTS) .tmp/qvtk_gcc1.0.0 || $(MKDIR) > .tmp/qvtk_gcc1.0.0 > $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qvtk_gcc1.0.0/ && > $(COPY_FILE) --parents QVTKWidget.h .tmp/qvtk_gcc1.0.0/ && > $(COPY_FILE) --parents QVTKWidget.cpp test.cpp .tmp/qvtk_gcc1.0.0/ && > (cd `dirname .tmp/qvtk_gcc1.0.0` && $(TAR) qvtk_gcc1.0.0.tar > qvtk_gcc1.0.0 && $(COMPRESS) qvtk_gcc1.0.0.tar) && $(MOVE) `dirname > .tmp/qvtk_gcc1.0.0`/qvtk_gcc1.0.0.tar.gz . && $(DEL_FILE) -r > .tmp/qvtk_gcc1.0.0 > > > yaccclean: > lexclean: > clean:compiler_clean > -$(DEL_FILE) $(OBJECTS) > -$(DEL_FILE) *~ core *.core > > > ####### Sub-libraries > > distclean: clean > -$(DEL_FILE) -r qvtk_gcc.app > -$(DEL_FILE) Makefile > > > /usr/local/lib/powerpc/qt/bin/moc: > (cd $(QTDIR)/src/tools/moc && $(MAKE)) > > mocclean: compiler_moc_header_clean compiler_moc_source_clean > > mocables: compiler_moc_header_make_all compiler_moc_source_make_all > > compiler_objective_c_make_all: > compiler_objective_c_clean: > compiler_moc_header_make_all: moc_QVTKWidget.cpp > compiler_moc_header_clean: > -$(DEL_FILE) moc_QVTKWidget.cpp > moc_QVTKWidget.cpp: QVTKWidget.h \ > /private/var/automount/usr/local/lib/powerpc/qt/bin/moc > /usr/local/lib/powerpc/qt/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ > -D__GNUC__ QVTKWidget.h -o moc_QVTKWidget.cpp > > compiler_rcc_make_all: > compiler_rcc_clean: > compiler_image_collection_make_all: qmake_image_collection.cpp > compiler_image_collection_clean: > -$(DEL_FILE) qmake_image_collection.cpp > compiler_moc_source_make_all: > compiler_moc_source_clean: > compiler_rez_source_make_all: > compiler_rez_source_clean: > compiler_uic_make_all: > compiler_uic_clean: > compiler_clean: compiler_objective_c_clean compiler_moc_header_clean > compiler_rcc_clean compiler_image_collection_clean > compiler_moc_source_clean compiler_rez_source_clean compiler_uic_clean > > ####### Compile > > QVTKWidget.o: QVTKWidget.cpp QVTKWidget.h > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o QVTKWidget.o QVTKWidget.cpp > > test.o: test.cpp QVTKWidget.h > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o test.o test.cpp > > moc_QVTKWidget.o: moc_QVTKWidget.cpp > $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_QVTKWidget.o > moc_QVTKWidget.cpp > > ####### Install > > install: FORCE > > uninstall: FORCE > > FORCE: > > It would be great if you could give me any hint. > > Thanks, > Hector. > -- View this message in context: http://www.nabble.com/Object-not-rendered-using-qvtk-on-powerpc-tf4906218.html#a14132763 Sent from the VTK - Users mailing list archive at Nabble.com. From will.schroeder at kitware.com Mon Dec 3 11:20:16 2007 From: will.schroeder at kitware.com (Will Schroeder) Date: Mon, 3 Dec 2007 11:20:16 -0500 Subject: [vtkusers] JOB: Positions available at Harvard in the Visual Computing Group Message-ID: <3ae73beb0712030820s3718dbaj4586131710dd322e@mail.gmail.com> Professor Hanspeter Pfister has two full-time positions at Harvard's IIC in the Visual Computing Group (http://iic.harvard.edu/). Senior Software Engineer: http://jobs.harvard.edu/jobs/summ_req?in_post_id=33983 Research Scientist: http://jobs.harvard.edu/jobs/summ_req?in_post_id=33984 I can speak from personal experience that the work is extremely exciting as it involves working cross-disciplinary with world-class biologists and scientists. W -- William J. Schroeder, PhD Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com 518-371-3971 (phone and fax) -------------- next part -------------- An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Mon Dec 3 16:48:21 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Mon, 3 Dec 2007 15:48:21 -0600 Subject: [vtkusers] More than one vtkContourWidget in the same renderer? Message-ID: <44f773f50712031348h453fe5er559f856040b2408b@mail.gmail.com> I'm again boggled by the requirements of a tracing application I'm writing using VTK and KWWidgets. vtkContourWidget is awesome -- as long as you only ever want to have one contour at a time. Unfortunately for anatomical tracing, there are features that can have more than one contour per volume slice. What I'd like to do is be able to click an 'add new contour' button, and have it turn off event processing for the current active contour, instantiate a new vtkContour Widget, and make it the current active contour for interaction. The problem is that the vtkContourWidget doesn't have a 'still displayed but no longer sensitive to mouse events' mode -- you can enable it, and interact with it, or you can disable it, when it disappears from the view. Furthermore, there is an 'i' key event that enables and disables it, which is behavior I'd love to be able to turn off. Thanks in advance for any pointers. From karthik.krishnan at kitware.com Mon Dec 3 16:55:26 2007 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Mon, 3 Dec 2007 16:55:26 -0500 Subject: [vtkusers] More than one vtkContourWidget in the same renderer? In-Reply-To: <44f773f50712031348h453fe5er559f856040b2408b@mail.gmail.com> References: <44f773f50712031348h453fe5er559f856040b2408b@mail.gmail.com> Message-ID: <9ddb27260712031355u577fad63j3c88684f3ec5c2ed@mail.gmail.com> On 12/3/07, kent williams wrote: > > The problem is that the vtkContourWidget doesn't have a 'still > displayed but no longer sensitive to mouse events' mode -- you can > enable it, and interact with it, or you can disable it, when it > disappears from the view. There is (and it works for all widgets that derive from vtkAbstractWidget). Its called ProcessEvents widget->ProcessEventsOff(); widget->ProcessEventsOn(); I know the name SetEnabled is a misnomer :) Its more like SetVisibility. and the ProcessEvents should've been called Enabled.. But the names won't change for Backward compatibility. HTH -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 Fax: 518 371 3971 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mayorga at cimat.mx Mon Dec 3 21:06:45 2007 From: mayorga at cimat.mx (Pedro Pablo Mayorga Alvarez) Date: Mon, 3 Dec 2007 20:06:45 -0600 Subject: [vtkusers] display in stereo mode Message-ID: <004601c8361a$5255bf60$f7013e20$@mx> How can display a cone in stereo mode? I have a video-card (nvidia quadro fx-1300). -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhangtuo123 at yahoo.com.cn Tue Dec 4 00:44:29 2007 From: zhangtuo123 at yahoo.com.cn (tuo zhang) Date: Tue, 4 Dec 2007 13:44:29 +0800 (CST) Subject: [vtkusers] Where is vtkDirectory::FileIsDirectory() Message-ID: <642797.4398.qm@web15814.mail.cnb.yahoo.com> Hi all, I wanna use vtkDirectory::FileIsDirectory() in my program, but I couldn't find the declaration or defination of this method in vtkDirectory.h(.cxx). My VTK version is 5.0.3, is it too low to have this method? Or is there another method to reach this goal? Thank you! ZhangTuo 07/12/04 ___________________________________________________________ ?????????????????? http://cn.mail.yahoo.com/promo/carnival07/ From czzcsc at 163.com Tue Dec 4 01:40:58 2007 From: czzcsc at 163.com (czzcsc) Date: Tue, 4 Dec 2007 14:40:58 +0800 (CST) Subject: [vtkusers] How to get id of cells? Message-ID: <1447487682.944041196750458497.JavaMail.coremail@bj163app98.163.com> Hi everyone, I have created my vtkUnstructuredGrid dataset, and I can extract cells from my dataset by vtkAreaPicker and vtkExtractGeometry. How can I get the id of the extracted cells? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From haloul02 at yahoo.co.uk Tue Dec 4 02:18:29 2007 From: haloul02 at yahoo.co.uk (Hala ALBakour) Date: Tue, 4 Dec 2007 07:18:29 +0000 (GMT) Subject: [vtkusers] Slicing 3D graphical model Message-ID: <537827.8368.qm@web25411.mail.ukl.yahoo.com> I am very new to 3D modelling and vtk, Actually just looking around to find out if vtk would solve my problem, I am wondering if vtk helps to extract 2D slice data (2D image x,y coordinates) from a 3D computer graphical model, originally the 3D model is imported from a standard file format like 3DS, so in any case I need a plugin which helps importing such file and convert it to vtk data structure, Most importantly, does vtk data structure encapsulate x,y,z coordinates, is it possible to extract x,y values at certain cut offs of z for example, what is the most appropriate rendering mechanism/data structure in vtk that supports this, Would it be easier in this case to use other low levels tools like OpenGL, Your help is highly appreciated, Please advise, Hala __________________________________________________________ Sent from Yahoo! - the World's favourite mail http://uk.mail.yahoo.com From yiasemism at cytanet.com.cy Tue Dec 4 03:53:16 2007 From: yiasemism at cytanet.com.cy (Yiasemis) Date: Tue, 4 Dec 2007 10:53:16 +0200 Subject: [vtkusers] Help using vtkOpenglTexture with OpenGl Message-ID: <20071204085313.0A4F0187D51@demokritos5.cytanet.com.cy> Hello, I am trying to use some dicom images I read with VTK into some OpenGl code I write so I can implement some pixel shading on them. 1) How can I use the glBindTexture with an object of type vtkOpenGl ? I tried something with a method ResampleToPowerOfTwo in vtkOpenGLTexture but looks like is not the case. Or at least I cant figure whats the *dptr part of unsigned char* vtkOpenGLTexture::ResampleToPowerOfTwo ( int & xsize, int & ysize, unsigned char * dptr, int bpp ) [protected] Thanks a lot :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Dec 4 08:12:04 2007 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 4 Dec 2007 08:12:04 -0500 Subject: [vtkusers] How to get id of cells? In-Reply-To: <1447487682.944041196750458497.JavaMail.coremail@bj163app98.163.com> References: <1447487682.944041196750458497.JavaMail.coremail@bj163app98.163.com> Message-ID: Ids should be put into the source vtkUnstructuredGrid. They should be of type vtkIdType, have a unique value for each cell or point, and preferably be flagged as the GLOBAL_IDS in vtkDataSetAttributes. Doing this last step makes filters ignore them when they do interpolation. After vtkExtractGeometry, ask for the GLOBAL_IDS array values for each cell and or point to see where each output cell or point came from in the input. cheers Dave DeMarle On 12/4/07, czzcsc wrote: > Hi everyone, > I have created my vtkUnstructuredGrid dataset, and I can extract cells from > my dataset > by vtkAreaPicker and vtkExtractGeometry. How can I get the id of the > extracted cells? > > Thanks > > > ________________________________ > ?????????? ?????????????? > _______________________________________________ > 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 > > From yumin.yuan at kitware.com Tue Dec 4 10:29:16 2007 From: yumin.yuan at kitware.com (Yumin Yuan) Date: Tue, 4 Dec 2007 10:29:16 -0500 Subject: [vtkusers] Where is vtkDirectory::FileIsDirectory() In-Reply-To: <642797.4398.qm@web15814.mail.cnb.yahoo.com> References: <642797.4398.qm@web15814.mail.cnb.yahoo.com> Message-ID: On 12/4/07, tuo zhang wrote: > I wanna use vtkDirectory::FileIsDirectory() in my > program, but I couldn't find the declaration or > defination of this method in vtkDirectory.h(.cxx). > > My VTK version is 5.0.3, is it too low to have this > method? No, vtkDirectory::FileIsDirectory() is in VTK-5-0 branch. You should update your VTK source. HTH, -Yumin ~~~~~~~~~~~~~~~~ Yumin Yuan R&D Engineer Kitware Inc. www.kitware.com ~~~~~~~~~~~~~~~~ From zhengina27 at hotmail.com Tue Dec 4 12:02:21 2007 From: zhengina27 at hotmail.com (Gina) Date: Tue, 4 Dec 2007 12:02:21 -0500 Subject: [vtkusers] export to .vtk Message-ID: Hi all, Could anybody tell me how to convert .obj or .vrml2 formats to .vtk sothat I can read the .vtk model to 3D Slicer? Thanks in advance. Gina _________________________________________________________________ Your smile counts. The more smiles you share, the more we donate.? Join in. www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline -------------- next part -------------- An HTML attachment was scrubbed... URL: From paulojamorim at gmail.com Tue Dec 4 13:05:49 2007 From: paulojamorim at gmail.com (Paulo Henrique Junqueira Amorim) Date: Tue, 4 Dec 2007 15:05:49 -0300 Subject: [vtkusers] Problems with vtkDICOMImageReader Message-ID: <98e18c70712041005u749b0055scc630cf0ae6c2066@mail.gmail.com> Hello all, I am using the class vtkDICOMImageReader (VTK 5.1.0) to read several dicom files acquired with different CT equipments. It worked fine for more than 200 cases. However, recently, I had trouble reading dicom files acquired with Toshiba Aquilion. The image returned by the vtkDICOMImageReader is noisy (full of grayscale dots), pretty similar to fft output. Does anyone know how to solve this? I'm attaching one of the files acquired with Toshiba Aquilion so other developers can reproduce the problem. http://geocities.yahoo.com.br/phamorim/dicom.zip The source code that illustrates the pipeline can be seen below. Thanks in advance, Paulo Amorim ---------------------------------------------------------------------------------------------- from vtk import * reader = vtkDICOMImageReader() reader.SetFileName('D:\\dcm_file') viewer = vtkImageViewer() viewer.SetInput(reader.GetOutput()) viewer.SetColorWindow(400) viewer.SetColorLevel(0) viewer.Render() -------------- next part -------------- An HTML attachment was scrubbed... URL: From wsales at gmail.com Tue Dec 4 13:22:15 2007 From: wsales at gmail.com (Wagner Sales) Date: Tue, 4 Dec 2007 16:22:15 -0200 Subject: [vtkusers] Slicing 3D graphical model In-Reply-To: <537827.8368.qm@web25411.mail.ukl.yahoo.com> References: <537827.8368.qm@web25411.mail.ukl.yahoo.com> Message-ID: <11b83aa60712041022v3b4ddc3amf6646cabb262b3db@mail.gmail.com> Hi Hala, I don't know about the conversion to import others formats in VTK. But slice extraction aren't a difficult task. Take a look at the class vtkImageReslice. The following pieces of code are in C++ and can helps you to extract the slices. //create the matrices double transversalElements[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; double coronalElements[16] = { 1, 0, 0, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, 0, 0, 1 }; double sagittalElements[16] ={ 0, 0,-1, 0, 1, 0, 0, 0, 0,-1, 0, 0, 0, 0, 0, 1 }; // an example of extraction in axial //'ll assume that's the image are readed and are stored in vtkImageData *m_CurrentImageData: m_CurrentImageData->UpdateInformation(); double point[4]; double temp[4]; int extentT[6]; double spacingT[3]; m_CurrentImageData->GetSpacing(spacingT); m_CurrentImageData->GetExtent(extentT); vtkMatrix4x4 *m_Matrix = vtkMatrix4x4::New(); m_Matrix->DeepCopy(sagittalElements); point[0] = 0.0; point[1] = 0.0; //sets the point to the slice to be extracted. point[2] = - m_CurrentImageData->GetSpacing()[1] *m_SliceNumber; point[3] = 1.0; m_Matrix->MultiplyPoint(point, temp); m_Matrix->SetElement(0, 3, temp[0]); m_Matrix->SetElement(1, 3, temp[1]); m_Matrix->SetElement(2, 3, temp[2]); vtkImageReslice *m_Reslicer = vtkImageReslice::New(); m_Reslicer->SetResliceAxes(m_Matrix); vtkImageData *m_ExtractedSlice = m_Reslicer->GetOutput(); .................. With this example and more work, I believe you'll can extract all the slices. That's are just a piece of code, are a good idea take more care about, for example, the slice interval. Regards, Wagner 2007/12/4, Hala ALBakour : > > > I am very new to 3D modelling and vtk, Actually just > looking around to find out if vtk would solve my > problem, I am wondering if vtk helps to extract 2D > slice data (2D image x,y coordinates) from a 3D > computer graphical model, originally the 3D model is > imported from a standard file format like 3DS, so in > any case I need a plugin which helps importing such > file and convert it to vtk data structure, > > Most importantly, does vtk data structure encapsulate > x,y,z coordinates, is it possible to extract x,y > values at certain cut offs of z for example, what is > the most appropriate rendering mechanism/data > structure in vtk that supports this, > > Would it be easier in this case to use other low > levels tools like OpenGL, > > Your help is highly appreciated, > Please advise, > > Hala > > > > __________________________________________________________ > Sent from Yahoo! - the World's favourite mail http://uk.mail.yahoo.com > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Tue Dec 4 15:28:47 2007 From: sean at rogue-research.com (Sean McBride) Date: Tue, 4 Dec 2007 15:28:47 -0500 Subject: [vtkusers] Problems with vtkDICOMImageReader In-Reply-To: <98e18c70712041005u749b0055scc630cf0ae6c2066@mail.gmail.com> References: <98e18c70712041005u749b0055scc630cf0ae6c2066@mail.gmail.com> Message-ID: <20071204202847.136841758@smtp1.sympatico.ca> On 12/4/07 3:05 PM, Paulo Henrique Junqueira Amorim said: >I am using the class vtkDICOMImageReader (VTK 5.1.0) to read several dicom >files acquired with different CT equipments. It worked fine for more than >200 cases. > >However, recently, I had trouble reading dicom files acquired with Toshiba >Aquilion. The image returned by the vtkDICOMImageReader is noisy (full of >grayscale dots), pretty similar to fft output. Does anyone know how to solve >this? -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From tracy.hu at yahoo.com Tue Dec 4 17:38:17 2007 From: tracy.hu at yahoo.com (Tracy Hu) Date: Tue, 4 Dec 2007 14:38:17 -0800 (PST) Subject: [vtkusers] can different texture be pasted on back and front face of a plane? Message-ID: <960032.1489.qm@web45115.mail.sp1.yahoo.com> Is there any way to paste different texture on front face and back face of a plane in vtk? any hint is highly appreciated thanks Tracy --------------------------------- Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From avinandan.sengupta at gmail.com Wed Dec 5 02:39:27 2007 From: avinandan.sengupta at gmail.com (Avinandan Sengupta) Date: Wed, 05 Dec 2007 13:09:27 +0530 Subject: [vtkusers] Rendering polyhedras Message-ID: <475655AF.4060701@gmail.com> Hi, I'm using the following mechanism to render polygons with thickness as 3D objects (polyhedra). Is there something simpler or more effective? Thanks, Avi ########### start of code ############## package require vtk package require vtkinteraction vtkPoints aPoints #0 aPoints InsertNextPoint 350.00 125.00 0.00 aPoints InsertNextPoint 200.00 75.00 0.00 #2 aPoints InsertNextPoint 100.00 100.00 0.00 aPoints InsertNextPoint 100.00 200.00 0.00 #4 aPoints InsertNextPoint 180.00 270.00 0.00 aPoints InsertNextPoint 250.00 100.00 0.00 #6 aPoints InsertNextPoint 350.00 125.00 30.00 aPoints InsertNextPoint 200.00 75.00 30.00 #8 aPoints InsertNextPoint 100.00 100.00 30.00 aPoints InsertNextPoint 100.00 200.00 30.00 #10 aPoints InsertNextPoint 180.00 270.00 30.00 aPoints InsertNextPoint 250.00 100.00 30.00 vtkPolygon aPoly [aPoly GetPointIds] SetNumberOfIds 6 [aPoly GetPointIds] SetId 0 0 [aPoly GetPointIds] SetId 1 1 [aPoly GetPointIds] SetId 2 2 [aPoly GetPointIds] SetId 3 3 [aPoly GetPointIds] SetId 4 4 [aPoly GetPointIds] SetId 5 5 vtkPolygon bPoly [bPoly GetPointIds] SetNumberOfIds 6 [bPoly GetPointIds] SetId 0 6 [bPoly GetPointIds] SetId 1 7 [bPoly GetPointIds] SetId 2 8 [bPoly GetPointIds] SetId 3 9 [bPoly GetPointIds] SetId 4 10 [bPoly GetPointIds] SetId 5 11 vtkQuad quad1 [quad1 GetPointIds] SetId 0 0 [quad1 GetPointIds] SetId 1 1 [quad1 GetPointIds] SetId 2 7 [quad1 GetPointIds] SetId 3 6 vtkQuad quad2 [quad2 GetPointIds] SetId 0 1 [quad2 GetPointIds] SetId 1 2 [quad2 GetPointIds] SetId 2 8 [quad2 GetPointIds] SetId 3 7 vtkQuad quad3 [quad3 GetPointIds] SetId 0 2 [quad3 GetPointIds] SetId 1 3 [quad3 GetPointIds] SetId 2 9 [quad3 GetPointIds] SetId 3 8 vtkQuad quad4 [quad4 GetPointIds] SetId 0 3 [quad4 GetPointIds] SetId 1 4 [quad4 GetPointIds] SetId 2 10 [quad4 GetPointIds] SetId 3 9 vtkQuad quad5 [quad5 GetPointIds] SetId 0 4 [quad5 GetPointIds] SetId 1 5 [quad5 GetPointIds] SetId 2 11 [quad5 GetPointIds] SetId 3 10 vtkQuad quad6 [quad6 GetPointIds] SetId 0 5 [quad6 GetPointIds] SetId 1 0 [quad6 GetPointIds] SetId 2 6 [quad6 GetPointIds] SetId 3 11 vtkCellArray aPolyArray aPolyArray InsertNextCell aPoly aPolyArray InsertNextCell bPoly aPolyArray InsertNextCell quad1 aPolyArray InsertNextCell quad2 aPolyArray InsertNextCell quad3 aPolyArray InsertNextCell quad4 aPolyArray InsertNextCell quad5 aPolyArray InsertNextCell quad6 # Assign points and cells vtkPolyData aPolydata aPolydata SetPoints aPoints aPolydata SetPolys aPolyArray vtkTriangleFilter tf tf SetInput aPolydata vtkPolyDataMapper aMapper aMapper SetInput aPolydata aMapper SetInputConnection [tf GetOutputPort] vtkActor aActor aActor SetMapper aMapper [aActor GetProperty] SetColor 1.0 0.0 0.0 vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 renWin SetSize 300 150 vtkRenderWindowInteractor iren iren SetRenderWindow renWin ren1 SetBackground .1 .2 .4 ren1 AddActor aActor ren1 ResetCamera renWin Render iren AddObserver UserEvent {wm deiconify .vtkInteract} iren Initialize wm withdraw . ########### end of code ############## From bluemoon608 at hotmail.com Wed Dec 5 05:56:17 2007 From: bluemoon608 at hotmail.com (BlueMoon) Date: Wed, 5 Dec 2007 10:56:17 +0000 Subject: [vtkusers] Remeshing/triangle regularization Message-ID: Hi All, When creating trianglated surfaces using MarchingCubes followed by Decimation, I usually get a surface made up by many irregular triangles. This is terrible for visualization and sub-optimal for further applications. Is there any methods in VTK that can remesh the surface so the triangles can be regularized? Such as what's done in the following image. http://i15.tinypic.com/86hs67o.jpg Many thanks in advance. Best, B.M. _________________________________________________________________ ????Windows Live ???????????? http://get.live.cn -------------- next part -------------- An HTML attachment was scrubbed... URL: From domi at vision.ee.ethz.ch Wed Dec 5 06:14:44 2007 From: domi at vision.ee.ethz.ch (Dominik Szczerba) Date: Wed, 5 Dec 2007 12:14:44 +0100 Subject: [vtkusers] Remeshing/triangle regularization In-Reply-To: References: Message-ID: <200712051214.44342.domi@vision.ee.ethz.ch> Not directly. You can build a filter yourself though. I do it combining smoothing and employ distance function to project the nodes back to the original mesh (using vtkWarpFilter if I am not mistaken). -- Dominik On Wednesday 05 December 2007 11.56:17 BlueMoon wrote: > Hi All, > > When creating trianglated surfaces using MarchingCubes followed by > Decimation, I usually get a surface made up by many irregular triangles. > This is terrible for visualization and sub-optimal for further > applications. Is there any methods in VTK that can remesh the surface so > the triangles can be regularized? Such as what's done in the following > image. > > http://i15.tinypic.com/86hs67o.jpg > > Many thanks in advance. > > Best, > B.M. > _________________________________________________________________ > ????Windows Live ???????????? > http://get.live.cn -- Dominik Szczerba, Ph.D. Computer Vision Lab CH-8092 Zurich http://www.vision.ee.ethz.ch/~domi From henrik.westerberg at crg.es Wed Dec 5 10:29:10 2007 From: henrik.westerberg at crg.es (Henrik Westerberg) Date: Wed, 5 Dec 2007 16:29:10 +0100 Subject: [vtkusers] Remeshing/triangle regularization References: <200712051214.44342.domi@vision.ee.ethz.ch> Message-ID: Hello B.M. I ran into this same problem myself. I found it easier to look for something outside of VTK. I wanted to go an open-source route and found netgen to be suitable for my needs: http://www.hpfem.jku.at/netgen/ It can take an stl surface from vtk and calculate a new surface and a volume (tet) mesh as well. There are quite a few websites online giving links to software I can only find one link right now in my bookmarks: http://www.andrew.cmu.edu/user/sowen/software/tetrahedra.html Without any more information about your requirements I can't really help. There are plenty of pay-for software as well. regards, Henrik -----Original Message----- From: vtkusers-bounces+henrik.westerberg=crg.es at vtk.org on behalf of Dominik Szczerba Sent: Wed 12/5/2007 12:14 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] Remeshing/triangle regularization Not directly. You can build a filter yourself though. I do it combining smoothing and employ distance function to project the nodes back to the original mesh (using vtkWarpFilter if I am not mistaken). -- Dominik On Wednesday 05 December 2007 11.56:17 BlueMoon wrote: > Hi All, > > When creating trianglated surfaces using MarchingCubes followed by > Decimation, I usually get a surface made up by many irregular triangles. > This is terrible for visualization and sub-optimal for further > applications. Is there any methods in VTK that can remesh the surface so > the triangles can be regularized? Such as what's done in the following > image. > > http://i15.tinypic.com/86hs67o.jpg > > Many thanks in advance. > > Best, > B.M. > _________________________________________________________________ > ????Windows Live ???????????! > http://get.live.cn -- Dominik Szczerba, Ph.D. Computer Vision Lab CH-8092 Zurich http://www.vision.ee.ethz.ch/~domi _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel.schaerer at insa-lyon.fr Wed Dec 5 10:55:36 2007 From: joel.schaerer at insa-lyon.fr (Joel Schaerer) Date: Wed, 05 Dec 2007 16:55:36 +0100 Subject: [vtkusers] Approximating spline Message-ID: <4756C9F8.9020001@insa-lyon.fr> Dear fellow vtk users, Would you know of code for doing approximating splines in VTK, in the spirit of vtkCardinalSpline but for approximation instead of interpolation? Thanks a lot! joel -- Jo?l Schaerer PhD. Student Advisors: Patrick Clarysse, Isabelle Magnin CREATIS-LRMN, UMR CNRS 5220, Inserm U630 INSA de Lyon 7 rue Jean Capelle bat. Blaise Pascal, 4?me ?tage F-69621 Villeurbanne CEDEX France Tel (+33) 4 72 43 63 06 Fax (+33) 4 72 43 85 26 http://www.creatis.insa-lyon.fr From mathieu.malaterre at gmail.com Wed Dec 5 12:20:33 2007 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Wed, 5 Dec 2007 18:20:33 +0100 Subject: [vtkusers] Problems with vtkDICOMImageReader In-Reply-To: <98e18c70712041005u749b0055scc630cf0ae6c2066@mail.gmail.com> References: <98e18c70712041005u749b0055scc630cf0ae6c2066@mail.gmail.com> Message-ID: On Dec 4, 2007 7:05 PM, Paulo Henrique Junqueira Amorim wrote: > Hello all, > > I am using the class vtkDICOMImageReader (VTK 5.1.0) to read several dicom > files acquired with different CT equipments. It worked fine for more than > 200 cases. > > However, recently, I had trouble reading dicom files acquired with Toshiba > Aquilion. The image returned by the vtkDICOMImageReader is noisy (full of > grayscale dots), pretty similar to fft output. Does anyone know how to solve > this? > > I'm attaching one of the files acquired with Toshiba Aquilion so other > developers can reproduce the problem. > > http://geocities.yahoo.com.br/phamorim/dicom.zip Hi Paulo, The image was compressed using a lossless JPEG codec. vtkDICOMImageReader only handles default DICOM syntax which is garanteed to be supported on any scanner. You could contact your PACS admin to export DICOM as uncompressed, or alternatively -as Sean mentionned- switch to another DICOM library. HTH -Mathieu From rilinca at cg.tuwien.ac.at Wed Dec 5 12:28:26 2007 From: rilinca at cg.tuwien.ac.at (Ilinca, Radu) Date: Wed, 05 Dec 2007 18:28:26 +0100 Subject: [vtkusers] vtk under visual studio 2005 Message-ID: <4756DFBA.5050500@cg.tuwien.ac.at> Hi ! I am not that good in libraries but I want to get started with VTK 5.0 under Visual Studio 2005 , win xp. I did all the steps from the book (CMake, build the solution) , I copy-pasted the Cone example in a new solution, set the project properties accordingly to the one in the demo project and I ran in in the debug mode. I got the cone moving. However, when I switched to Release, I got compiling erros , obviously the VS could not include the .h files. Here are the compiling errors. I do not understand : a) Why didn't it work b) If I was not good at specifying paths, then why does it work in the debug mode ? I would appreciate a step by step solution since I am not a programming guru. ------ Rebuild All started: Project: Intro, Configuration: Release Win32 ------ Deleting intermediate and output files for project 'Intro', configuration 'Release|Win32' Compiling... stdafx.cpp Compiling... Intro.cpp .\Intro.cpp(40) : error C2065: 'vtkConeSource' : undeclared identifier .\Intro.cpp(40) : error C2065: 'cone' : undeclared identifier .\Intro.cpp(40) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(41) : error C2227: left of '->SetHeight' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(42) : error C2227: left of '->SetRadius' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(43) : error C2227: left of '->SetResolution' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(52) : error C2065: 'vtkPolyDataMapper' : undeclared identifier .\Intro.cpp(52) : error C2065: 'coneMapper' : undeclared identifier .\Intro.cpp(52) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(53) : error C2227: left of '->SetInputConnection' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(53) : error C2227: left of '->GetOutputPort' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(62) : error C2065: 'vtkActor' : undeclared identifier .\Intro.cpp(62) : error C2065: 'coneActor' : undeclared identifier .\Intro.cpp(62) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(63) : error C2227: left of '->SetMapper' must point to class/struct/union/generic type eric type ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== From hobbsk at ohiou.edu Wed Dec 5 14:29:30 2007 From: hobbsk at ohiou.edu (Kevin H. Hobbs) Date: Wed, 05 Dec 2007 14:29:30 -0500 Subject: [vtkusers] StreamTracer input Attribute In-Reply-To: <45d654b0711291804w25da56f0m97200e3aad9b8ed2@mail.gmail.com> References: <1196360720.10137.7.camel@gargon.hooperlab> <1196373363.10137.11.camel@gargon.hooperlab> <45d654b0711291804w25da56f0m97200e3aad9b8ed2@mail.gmail.com> Message-ID: <1196882970.556.7.camel@gargon.hooperlab> On Thu, 2007-11-29 at 21:04 -0500, Berk Geveci wrote: > I do. vtkImageGradient by default produces a scalar attribute. The > stream tracer does not know that you want it to use that array. You > need to use a vtkAssignAttribute or use the SetInputArrayToProcess() > method. > > -berk Why does vtkAssignAttribute work in TCL but not in C++? The C++ example below produces an error, but TCL example below that works. The error: ERROR: In /home/kevin/kitware/VTK/Graphics/vtkStreamer.cxx, line 488 vtkStreamLine (0x7c1480): No vector data defined! A C++ code snippet from my application: // Calculate the gradient. vtkImageGradient * gradient = vtkImageGradient::New(); gradient->SetDimensionality(3); gradient->SetInputConnection( vtk_import->GetOutputPort() ); // Tell VTK we actually want to use the gradient. vtkAssignAttribute * aa = vtkAssignAttribute::New(); aa->Assign( vtkDataSetAttributes::SCALARS, vtkDataSetAttributes::VECTORS, vtkAssignAttribute::POINT_DATA ); aa->SetInputConnection( gradient->GetOutputPort() ); // Calculate the streamline. vtkStreamLine * stream = vtkStreamLine::New(); stream->SetStepLength( image_spacing[2] ); stream->SetStartPosition( p2 ); stream->SetInputConnection( aa->GetOutputPort() ); // For now just write. vtkXMLPolyDataWriter * stream_writer = vtkXMLPolyDataWriter::New(); stream_writer->SetFileName( "tmp/stream.vtp" ); stream_writer->SetInputConnection( stream->GetOutputPort() ); stream_writer->Update(); The TCL example that works fine: package require vtk # Create some image data vtkRTAnalyticSource image_source image_source Update # Calculate the gradient vtkImageGradient gradient gradient SetDimensionality 3 gradient SetInputConnection [image_source GetOutputPort] gradient Update # Make the scalars the active vector vtkAssignAttribute aa aa Assign SCALARS VECTORS POINT_DATA aa SetInputConnection [gradient GetOutputPort] # Create streamer vtkStreamLine streamer streamer SetStepLength 0.1 streamer SetInputConnection [aa GetOutputPort] streamer Update # write the streamline vtkXMLPolyDataWriter stream_writer stream_writer SetInputConnection [streamer GetOutputPort] stream_writer SetFileName "tmp/stream.vtp" stream_writer Write exit -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From pbruyant at yahoo.com Thu Dec 6 02:12:26 2007 From: pbruyant at yahoo.com (Philippe Bruyant) Date: Wed, 5 Dec 2007 23:12:26 -0800 (PST) Subject: Fw: [vtkusers] vtk under visual studio 2005 Message-ID: <97678.77560.qm@web37506.mail.mud.yahoo.com> Hi Radu, Maybe the paths to .h files must be separately entered for Debug and Release modes (same suggestion for VTK libs) ? I know it's the case for Visual Studio 6.0. HTH, Philippe ----- Original Message ---- From: "Ilinca, Radu" To: vtkusers at vtk.org Sent: Wednesday, December 5, 2007 6:28:26 PM Subject: [vtkusers] vtk under visual studio 2005 Hi ! I am not that good in libraries but I want to get started with VTK 5.0 under Visual Studio 2005 , win xp. I did all the steps from the book (CMake, build the solution) , I copy-pasted the Cone example in a new solution, set the project properties accordingly to the one in the demo project and I ran in in the debug mode. I got the cone moving. However, when I switched to Release, I got compiling erros , obviously the VS could not include the .h files. Here are the compiling errors. I do not understand : a) Why didn't it work b) If I was not good at specifying paths, then why does it work in the debug mode ? I would appreciate a step by step solution since I am not a programming guru. ------ Rebuild All started: Project: Intro, Configuration: Release Win32 ------ Deleting intermediate and output files for project 'Intro', configuration 'Release|Win32' Compiling... stdafx.cpp Compiling... Intro.cpp .\Intro.cpp(40) : error C2065: 'vtkConeSource' : undeclared identifier .\Intro.cpp(40) : error C2065: 'cone' : undeclared identifier .\Intro.cpp(40) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(41) : error C2227: left of '->SetHeight' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(42) : error C2227: left of '->SetRadius' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(43) : error C2227: left of '->SetResolution' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(52) : error C2065: 'vtkPolyDataMapper' : undeclared identifier .\Intro.cpp(52) : error C2065: 'coneMapper' : undeclared identifier .\Intro.cpp(52) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(53) : error C2227: left of '->SetInputConnection' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(53) : error C2227: left of '->GetOutputPort' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(62) : error C2065: 'vtkActor' : undeclared identifier .\Intro.cpp(62) : error C2065: 'coneActor' : undeclared identifier .\Intro.cpp(62) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(63) : error C2227: left of '->SetMapper' must point to class/struct/union/generic type eric type ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== _______________________________________________ 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 Never miss a thing. Make Yahoo your homepage. ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpr at creatis.insa-lyon.fr Thu Dec 6 02:56:02 2007 From: jpr at creatis.insa-lyon.fr (Jean-Pierre Roux) Date: Thu, 06 Dec 2007 08:56:02 +0100 Subject: [vtkusers] Problems with vtkDICOMImageReader In-Reply-To: <98e18c70712041005u749b0055scc630cf0ae6c2066@mail.gmail.com> References: <98e18c70712041005u749b0055scc630cf0ae6c2066@mail.gmail.com> Message-ID: <4757AB12.9060805@creatis.univ-lyon1.fr> Paulo Henrique Junqueira Amorim wrote: > Hello all, > I am using the class vtkDICOMImageReader (VTK 5.1.0) to read several > dicom files acquired with different CT equipments. It worked fine for > more than 200 cases. > However, recently, I had trouble reading dicom files acquired with > Toshiba Aquilion. The image returned by the vtkDICOMImageReader is > noisy (full of grayscale dots), pretty similar to fft output. Does > anyone know how to solve this? > I'm attaching one of the files acquired with Toshiba Aquilion so other > developers can reproduce the problem. > > http://geocities.yahoo.com.br/phamorim/dicom.zip > Hi, Paulo. Your images have a Transfer Syntax UID=1.2.840.10008.1.2.4.57 -i.e. JPEG Lossless Non-Hierarchical (Process 14) - It's not dealt with by the vtkDICOMImageReader. you should try gdcm (http://www.creatis.inic-lyon1.fr/Public/Gdcm) that comes with a vtkGdcmReader (derived class from vtkImageReader) HTH Jean-Pierre Roux > > The source code that illustrates the pipeline can be seen below. > Thanks in advance, > Paulo Amorim > > ---------------------------------------------------------------------------------------------- > from vtk import * > > reader = vtkDICOMImageReader() > reader.SetFileName ('D:\\dcm_file') > viewer = vtkImageViewer() > viewer.SetInput(reader.GetOutput()) > viewer.SetColorWindow(400) > viewer.SetColorLevel(0) > viewer.Render() From Shekhar.Chandra at sci.monash.edu.au Thu Dec 6 03:48:21 2007 From: Shekhar.Chandra at sci.monash.edu.au (Shakes) Date: Thu, 06 Dec 2007 19:48:21 +1100 Subject: [vtkusers] vtkImageViewer2 bug? Message-ID: <4757B755.9070300@sci.monash.edu.au> Hi Guys, I have been using vtkImageViewer2 to display very small greyscale images (7x7) and found that it seems to clip half of a pixel of each pixel on the edge of the image despite the data being read in correctly. I have attached a screenshot with a comparison of volume plot, vtkImageViewer2, data table and with ImageJ (on the right) and also attached the original test image. No other image viewer has problems with the file and the vtkPNMReader appears to work correctly as I can check the data directly by eye and is correct (the table verifies this). It is also writen by vtkPNMWriter. I have also written a VTI file containing a stack of these and the volume display appears suffer the same effect (very left). Here the camera is reset and I have checked the extents and bounds of vtkImageActor (also checked display bounds and extents), vtkRenderWindow and QVTKWidget and all is fine. I was just wondering if this might be a bug as this would not be visible for large images? Or is there an invisible border? Or something else I can do to rectify it. I have already spent several hours on this and hoping someone can help me. :( Cheers Shakes Relevant Code: int bounds[6]; vtkPNMReader* reader = vtkPNMReader::New(); reader->SetFileName(name.toStdString().c_str()); reader->Update(); imageData = reader->GetOutput(); imageData->GetExtent(bounds); cerr << "Image Size: " << bounds[1]+1 << "x" << bounds[3]+2 << endl; viewer->SetInput(imageData); //Doesn't matter if I use reader->GetOutputPort() viewer->GetRenderer()->ResetCamera(); QVTKWidget::SetRenderWindow(viewer->GetRenderWindow()); viewer->SetupInteractor(QVTKWidget::GetRenderWindow()->GetInteractor()); Other Info: Tested on Kubuntu Gutsy (g++ 4.1.2) x86, openSuse 10.3 x64 and Vista x64 (MSVC 2005 x64). Qt 4.3.2 and VTK 5.0.3. -------------- next part -------------- A non-text attachment was scrubbed... Name: survey.pgm Type: image/x-portable-graymap Size: 108 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkbug2.png Type: image/png Size: 31675 bytes Desc: not available URL: From oliver.gloth at engits.com Thu Dec 6 04:28:59 2007 From: oliver.gloth at engits.com (Oliver Gloth) Date: Thu, 6 Dec 2007 10:28:59 +0100 Subject: [vtkusers] eliminate duplicate nodes Message-ID: <005101c837ea$6ed9edb0$0700a8c0@cod> Dear VTK Users, I am currently working on an open-source project - developing a mesh generator for CFD simulations. Due to budget and time constraints I have chosen to use the VTK data structures as a basis, instead of writing my own data structures. Furthermore this makes building a GUI (based on Qt) to modify and visualise the mesh easy. One thing that is required is a filter to merge two grids and eliminate duplicate nodes. Is such a thing already part of VTK, or does somebody have a piece of code that would do this? The implementation is not trivial, because the 3D search can be very time consuming. If it doesn't exist yet I will implement it myself, but I would like to avoid double work as much as possible. Oliver -- Dr.-Ing. O. Gloth enGits GmbH Kolpingstr. 4 D-79618 Rheinfelden Germany phone:+49(0)7623-717-568, fax:-569, mobile:+49(0)173-317-3698, skype:ogloth From domi at vision.ee.ethz.ch Thu Dec 6 04:44:33 2007 From: domi at vision.ee.ethz.ch (Dominik Szczerba) Date: Thu, 6 Dec 2007 10:44:33 +0100 Subject: [vtkusers] eliminate duplicate nodes In-Reply-To: <005101c837ea$6ed9edb0$0700a8c0@cod> References: <005101c837ea$6ed9edb0$0700a8c0@cod> Message-ID: <200712061044.33151.domi@vision.ee.ethz.ch> There is such a thing in the Paraview source but not in VTK. Just grab its CVS version and search for 'clean unstructured grid' or so. -- Dominik On Thursday 06 December 2007 10.28:59 Oliver Gloth wrote: > Dear VTK Users, > > I am currently working on an open-source project - developing a mesh > generator for CFD simulations. Due to budget and time constraints I have > chosen to use the VTK data structures as a basis, instead of writing my own > data structures. Furthermore this makes building a GUI (based on Qt) to > modify and visualise the mesh easy. One thing that is required is a filter > to merge two grids and eliminate duplicate nodes. Is such a thing already > part of VTK, or does somebody have a piece of code that would do this? The > implementation is not trivial, because the 3D search can be very time > consuming. If it doesn't exist yet I will implement it myself, but I would > like to avoid double work as much as possible. > > Oliver -- Dominik Szczerba, Ph.D. Computer Vision Lab CH-8092 Zurich http://www.vision.ee.ethz.ch/~domi From zihuabox at gmail.com Thu Dec 6 08:13:57 2007 From: zihuabox at gmail.com (Zihua Su) Date: Thu, 6 Dec 2007 21:13:57 +0800 Subject: [vtkusers] About CVS VTK Message-ID: <355e92b70712060513q3ba05f48ma36913f0e2e1855b@mail.gmail.com> Hi all, I am new to VTK, especially, when I try to compile a CVS VTK, I met some problem. Hopefully, someone here can answer my question. I used a new widget which force me to use a CVS version VTK. So i learned how to use CVS. I simply right click on a clean directory and it will logon to the kitware sever..... But when finishing downloading, it give me a file without cmake list,etc. I am not sure where I am wrong. Did download a wrong file? How can i get a CVS version VTK which can be compiled by cmake? many thanks -- Richard From srfpala at earthlink.net Thu Dec 6 09:41:09 2007 From: srfpala at earthlink.net (Bob Palank) Date: Thu, 6 Dec 2007 08:41:09 -0600 Subject: [vtkusers] vtk under visual studio 2005 In-Reply-To: <97678.77560.qm@web37506.mail.mud.yahoo.com> References: <97678.77560.qm@web37506.mail.mud.yahoo.com> Message-ID: <009301c83816$0ab0bd10$6b00a8c0@rrl> Has anyone encountered the following error? I'm confused sisnce there is no Lib.obj file! ---------------------------------------------------------------------------- ------------------------------------------------------- ------ Rebuild All started: Project: vtk50ForSept05, Configuration: Debug Win32 ------ Deleting intermediate and output files for project 'vtk50ForSept05', configuration 'Debug|Win32' Compiling... Cone.cpp Cylinder.cpp Generating Code... Compiling manifest to resources... Linking... LINK : fatal error LNK1104: cannot open file 'H:\vtk50\lib.obj' Build log was saved at "file://h:\vtk50\Examples\CylinderAndLineForvtk50\Debug\BuildLog.htm" vtk50ForSept05 - 1 error(s), 0 warning(s) ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== BR Bob _____ From: vtkusers-bounces+srfpala=earthlink.net at vtk.org [mailto:vtkusers-bounces+srfpala=earthlink.net at vtk.org] On Behalf Of Philippe Bruyant Sent: Thursday, December 06, 2007 1:12 AM To: VTK Users Subject: Fw: [vtkusers] vtk under visual studio 2005 Hi Radu, Maybe the paths to .h files must be separately entered for Debug and Release modes (same suggestion for VTK libs) ? I know it's the case for Visual Studio 6.0. HTH, Philippe ----- Original Message ---- From: "Ilinca, Radu" To: vtkusers at vtk.org Sent: Wednesday, December 5, 2007 6:28:26 PM Subject: [vtkusers] vtk under visual studio 2005 Hi ! I am not that good in libraries but I want to get started with VTK 5.0 under Visual Studio 2005 , win xp. I did all the steps from the book (CMake, build the solution) , I copy-pasted the Cone example in a new solution, set the project properties accordingly to the one in the demo project and I ran in in the debug mode. I got the cone moving. However, when I switched to Release, I got compiling erros , obviously the VS could not include the .h files. Here are the compiling errors. I do not understand : a) Why didn't it work b) If I was not good at specifying paths, then why does it work in the debug mode ? I would appreciate a step by step solution since I am not a programming guru. ------ Rebuild All started: Project: Intro, Configuration: Release Win32 ------ Deleting intermediate and output files for project 'Intro', configuration 'Release|Win32' Compiling... stdafx.cpp Compiling... Intro.cpp .\Intro.cpp(40) : error C2065: 'vtkConeSource' : undeclared identifier .\Intro.cpp(40) : error C2065: 'cone' : undeclared identifier .\Intro.cpp(40) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(41) : error C2227: left of '->SetHeight' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(42) : error C2227: left of '->SetRadius' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(43) : error C2227: left of '->SetResolution' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(52) : error C2065: 'vtkPolyDataMapper' : undeclared identifier .\Intro.cpp(52) : error C2065: 'coneMapper' : undeclared identifier .\Intro.cpp(52) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(53) : error C2227: left of '->SetInputConnection' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(53) : error C2227: left of '->GetOutputPort' must point to class/struct/union/generic type type is ''unknown-type'' .\Intro.cpp(62) : error C2065: 'vtkActor' : undeclared identifier .\Intro.cpp(62) : error C2065: 'coneActor' : undeclared identifier .\Intro.cpp(62) : error C2064: term does not evaluate to a function taking 0 arguments .\Intro.cpp(63) : error C2227: left of '->SetMapper' must point to class/struct/union/generic type eric type ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== _______________________________________________ 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 _____ Never miss a thing. Make Yahoo your homepage. _____ Looking for last minute shopping deals? Find them fast with Yahoo! Search. -------------- next part -------------- An HTML attachment was scrubbed... URL: From freudling at bwh.harvard.edu Thu Dec 6 09:57:59 2007 From: freudling at bwh.harvard.edu (Andreas Freudling) Date: Thu, 06 Dec 2007 09:57:59 -0500 Subject: [vtkusers] vtk under visual studio 2005 In-Reply-To: <009301c83816$0ab0bd10$6b00a8c0@rrl> References: <97678.77560.qm@web37506.mail.mud.yahoo.com> <009301c83816$0ab0bd10$6b00a8c0@rrl> Message-ID: <47580DF7.5060000@bwh.harvard.edu> Hi Bob, are you using VS 2005 "Express"?! If that is the case you also need to install the platform SDK. http://msdn2.microsoft.com/de-de/express/aa700755(en-us).aspx Best Andy Bob Palank schrieb: > Has anyone encountered the following error? I'm confused sisnce there > is no Lib.obj file! > ----------------------------------------------------------------------------------------------------------------------------------- > > ------ Rebuild All started: Project: vtk50ForSept05, Configuration: > Debug Win32 ------ > > Deleting intermediate and output files for project 'vtk50ForSept05', > configuration 'Debug|Win32' > > Compiling... > > Cone.cpp > > Cylinder.cpp > > Generating Code... > > Compiling manifest to resources... > > Linking... > > LINK : fatal error LNK1104: cannot open file 'H:\vtk50\lib.obj' > > Build log was saved at > "file://h:\vtk50\Examples\CylinderAndLineForvtk50\Debug\BuildLog.htm" > > vtk50ForSept05 - 1 error(s), 0 warning(s) > > ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== > > BR > > Bob > > > ------------------------------------------------------------------------ > *From:* vtkusers-bounces+srfpala=earthlink.net at vtk.org > [mailto:vtkusers-bounces+srfpala=earthlink.net at vtk.org] *On Behalf Of > *Philippe Bruyant > *Sent:* Thursday, December 06, 2007 1:12 AM > *To:* VTK Users > *Subject:* Fw: [vtkusers] vtk under visual studio 2005 > > > > Hi Radu, > Maybe the paths to .h files must be separately entered for Debug > and Release modes (same suggestion for VTK libs) ? I know it's the > case for Visual Studio 6.0. > HTH, > Philippe > > ----- Original Message ---- > From: "Ilinca, Radu" > To: vtkusers at vtk.org > Sent: Wednesday, December 5, 2007 6:28:26 PM > Subject: [vtkusers] vtk under visual studio 2005 > > Hi ! > > I am not that good in libraries but I want to get started with VTK 5.0 > under Visual Studio 2005 , win xp. I did all the steps from the book > (CMake, build the solution) , I copy-pasted the Cone example in a new > solution, set the project properties accordingly to the one in the demo > project and I ran in in the debug mode. I got the cone moving. However, > when I switched to Release, I got compiling erros , obviously the VS > could not include the .h files. Here are the compiling errors. I do not > understand : > a) Why didn't it work > b) If I was not good at specifying paths, then why does it work in the > debug mode ? > > I would appreciate a step by step solution since I am not a programming > guru. > > ------ Rebuild All started: Project: Intro, Configuration: Release Win32 > ------ > Deleting intermediate and output files for project 'Intro', > configuration 'Release|Win32' > Compiling... > stdafx.cpp > Compiling... > Intro.cpp > .\Intro.cpp(40) : error C2065: 'vtkConeSource' : undeclared identifier > .\Intro.cpp(40) : error C2065: 'cone' : undeclared identifier > .\Intro.cpp(40) : error C2064: term does not evaluate to a function > taking 0 arguments > .\Intro.cpp(41) : error C2227: left of '->SetHeight' must point to > class/struct/union/generic type > type is ''unknown-type'' > .\Intro.cpp(42) : error C2227: left of '->SetRadius' must point to > class/struct/union/generic type > type is ''unknown-type'' > .\Intro.cpp(43) : error C2227: left of '->SetResolution' must point to > class/struct/union/generic type > type is ''unknown-type'' > .\Intro.cpp(52) : error C2065: 'vtkPolyDataMapper' : undeclared identifier > .\Intro.cpp(52) : error C2065: 'coneMapper' : undeclared identifier > .\Intro.cpp(52) : error C2064: term does not evaluate to a function > taking 0 arguments > .\Intro.cpp(53) : error C2227: left of '->SetInputConnection' must point > to class/struct/union/generic type > type is ''unknown-type'' > .\Intro.cpp(53) : error C2227: left of '->GetOutputPort' must point to > class/struct/union/generic type > type is ''unknown-type'' > .\Intro.cpp(62) : error C2065: 'vtkActor' : undeclared identifier > .\Intro.cpp(62) : error C2065: 'coneActor' : undeclared identifier > .\Intro.cpp(62) : error C2064: term does not evaluate to a function > taking 0 arguments > .\Intro.cpp(63) : error C2227: left of '->SetMapper' must point to > class/struct/union/generic type > eric type > > ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== > > > _______________________________________________ > 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 > > > ------------------------------------------------------------------------ > Never miss a thing. Make Yahoo your homepage. > > > > ------------------------------------------------------------------------ > Looking for last minute shopping deals? Find them fast with Yahoo! > Search. > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > From markww at gmail.com Thu Dec 6 10:03:53 2007 From: markww at gmail.com (Mark Wyszomierski) Date: Thu, 6 Dec 2007 10:03:53 -0500 Subject: [vtkusers] vtkImageViewer2 bug? In-Reply-To: <4757B755.9070300@sci.monash.edu.au> References: <4757B755.9070300@sci.monash.edu.au> Message-ID: I've always noticed the same thing, I think it comes down to the way the image is being texture mapped on the quad. I can't remember too clearly but I looked into it about 2 years ago, I think it's just the way opengl sticks it on there, I could be wrong on that though, Mark On Dec 6, 2007 3:48 AM, Shakes wrote: > Hi Guys, > > I have been using vtkImageViewer2 to display very small greyscale images > (7x7) and found that it seems to clip half of a pixel of each pixel on > the edge of the image despite the data being read in correctly. I have > attached a screenshot with a comparison of volume plot, vtkImageViewer2, > data table and with ImageJ (on the right) and also attached the original > test image. > > No other image viewer has problems with the file and the vtkPNMReader > appears to work correctly as I can check the data directly by eye and is > correct (the table verifies this). It is also writen by vtkPNMWriter. I > have also written a VTI file containing a stack of these and the volume > display appears suffer the same effect (very left). > > Here the camera is reset and I have checked the extents and bounds of > vtkImageActor (also checked display bounds and extents), vtkRenderWindow > and QVTKWidget and all is fine. > > I was just wondering if this might be a bug as this would not be visible > for large images? Or is there an invisible border? Or something else I > can do to rectify it. I have already spent several hours on this and > hoping someone can help me. :( > > Cheers > Shakes > > Relevant Code: > > int bounds[6]; > vtkPNMReader* reader = vtkPNMReader::New(); > > reader->SetFileName(name.toStdString().c_str()); > reader->Update(); > imageData = reader->GetOutput(); > > imageData->GetExtent(bounds); > cerr << "Image Size: " << bounds[1]+1 << "x" << bounds[3]+2 << endl; > > viewer->SetInput(imageData); //Doesn't matter if I use > reader->GetOutputPort() > viewer->GetRenderer()->ResetCamera(); > QVTKWidget::SetRenderWindow(viewer->GetRenderWindow()); > viewer->SetupInteractor(QVTKWidget::GetRenderWindow()->GetInteractor()); > > Other Info: > Tested on Kubuntu Gutsy (g++ 4.1.2) x86, openSuse 10.3 x64 and Vista x64 > (MSVC 2005 x64). Qt 4.3.2 and VTK 5.0.3. > > > _______________________________________________ > 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 > > From burlen at apollo.sr.unh.edu Thu Dec 6 10:27:44 2007 From: burlen at apollo.sr.unh.edu (burlen) Date: Thu, 06 Dec 2007 10:27:44 -0500 Subject: [vtkusers] eliminate duplicate nodes In-Reply-To: <005101c837ea$6ed9edb0$0700a8c0@cod> References: <005101c837ea$6ed9edb0$0700a8c0@cod> Message-ID: <475814F0.9060309@apollo.sr.unh.edu> Does the vtkCleanPolyData class do what you want?? Although I supose you could do it, I am not convinced that VTK would be ideal for CFD project, you might find these links of use: http://www.andrew.cmu.edu/user/sowen/softsurv.html http://www.cs.cmu.edu/~quake/triangle.html http://www.hpfem.jku.at/netgen/ On the other hand at least visualization would be easy. Burlen Oliver Gloth wrote: > Dear VTK Users, > > I am currently working on an open-source project - developing a mesh > generator for CFD simulations. Due to budget and time constraints I have > chosen to use the VTK data structures as a basis, instead of writing my own > data structures. Furthermore this makes building a GUI (based on Qt) to > modify and visualise the mesh easy. One thing that is required is a filter > to merge two grids and eliminate duplicate nodes. Is such a thing already > part of VTK, or does somebody have a piece of code that would do this? The > implementation is not trivial, because the 3D search can be very time > consuming. If it doesn't exist yet I will implement it myself, but I would > like to avoid double work as much as possible. > > Oliver > > From oliver.gloth at engits.com Thu Dec 6 10:49:07 2007 From: oliver.gloth at engits.com (Oliver Gloth) Date: Thu, 6 Dec 2007 16:49:07 +0100 Subject: [vtkusers] eliminate duplicate nodes In-Reply-To: <200712061044.33151.domi@vision.ee.ethz.ch> References: <005101c837ea$6ed9edb0$0700a8c0@cod> <200712061044.33151.domi@vision.ee.ethz.ch> Message-ID: <009501c8381f$897384d0$0700a8c0@cod> Thanks for the info! I will have a look at it as soon as the Kitware server is up and running again - there seems to be a problem today. Oliver -----Original Message----- From: vtkusers-bounces+oliver.gloth=engits.com at vtk.org [mailto:vtkusers-bounces+oliver.gloth=engits.com at vtk.org] On Behalf Of Dominik Szczerba Sent: 06 December 2007 10:45 To: vtkusers at vtk.org Subject: Re: [vtkusers] eliminate duplicate nodes There is such a thing in the Paraview source but not in VTK. Just grab its CVS version and search for 'clean unstructured grid' or so. -- Dominik On Thursday 06 December 2007 10.28:59 Oliver Gloth wrote: > Dear VTK Users, > > I am currently working on an open-source project - developing a mesh > generator for CFD simulations. Due to budget and time constraints I have > chosen to use the VTK data structures as a basis, instead of writing my own > data structures. Furthermore this makes building a GUI (based on Qt) to > modify and visualise the mesh easy. One thing that is required is a filter > to merge two grids and eliminate duplicate nodes. Is such a thing already > part of VTK, or does somebody have a piece of code that would do this? The > implementation is not trivial, because the 3D search can be very time > consuming. If it doesn't exist yet I will implement it myself, but I would > like to avoid double work as much as possible. > > Oliver -- Dominik Szczerba, Ph.D. Computer Vision Lab CH-8092 Zurich http://www.vision.ee.ethz.ch/~domi _______________________________________________ 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 From oliver.gloth at engits.com Thu Dec 6 11:01:09 2007 From: oliver.gloth at engits.com (Oliver Gloth) Date: Thu, 6 Dec 2007 17:01:09 +0100 Subject: [vtkusers] eliminate duplicate nodes In-Reply-To: <475814F0.9060309@apollo.sr.unh.edu> References: <005101c837ea$6ed9edb0$0700a8c0@cod> <475814F0.9060309@apollo.sr.unh.edu> Message-ID: <00a001c83821$37df0ca0$0700a8c0@cod> I had a look at vtkCleanPolyData and the classes vtkMergePoints and vtkPointLocator seem to be good starting points. It is required to clean a vtkUnstructuredGrid, that's why the vtkCleanPolyData is not directly applicable - but thanks for pointing me in the right direction. The links you sent (thanks btw.) are not completely unknown to me and I might use the Netgen package for this project. It is not a CFD project, but a mesh generation project (I would not use VTK data structures for a solver ...). I gave some thought to using VTK: it might not be ideal, but definitely well suited. Tools like, for example, vtkMergePoints, are very valuable and they can be a real pain to implement and debug. The other thing I like about VTK is that it is well documented and has a large user community, and yes visualisation is very easy indeed! Oliver -----Original Message----- From: burlen [mailto:burlen at apollo.sr.unh.edu] Sent: 06 December 2007 16:28 To: Oliver Gloth Cc: vtkusers Subject: Re: [vtkusers] eliminate duplicate nodes Does the vtkCleanPolyData class do what you want?? Although I supose you could do it, I am not convinced that VTK would be ideal for CFD project, you might find these links of use: http://www.andrew.cmu.edu/user/sowen/softsurv.html http://www.cs.cmu.edu/~quake/triangle.html http://www.hpfem.jku.at/netgen/ On the other hand at least visualization would be easy. Burlen Oliver Gloth wrote: > Dear VTK Users, > > I am currently working on an open-source project - developing a mesh > generator for CFD simulations. Due to budget and time constraints I have > chosen to use the VTK data structures as a basis, instead of writing my own > data structures. Furthermore this makes building a GUI (based on Qt) to > modify and visualise the mesh easy. One thing that is required is a filter > to merge two grids and eliminate duplicate nodes. Is such a thing already > part of VTK, or does somebody have a piece of code that would do this? The > implementation is not trivial, because the 3D search can be very time > consuming. If it doesn't exist yet I will implement it myself, but I would > like to avoid double work as much as possible. > > Oliver > > From burlen at apollo.sr.unh.edu Thu Dec 6 12:01:46 2007 From: burlen at apollo.sr.unh.edu (burlen) Date: Thu, 06 Dec 2007 12:01:46 -0500 Subject: [vtkusers] eliminate duplicate nodes In-Reply-To: <00a001c83821$37df0ca0$0700a8c0@cod> References: <005101c837ea$6ed9edb0$0700a8c0@cod> <475814F0.9060309@apollo.sr.unh.edu> <00a001c83821$37df0ca0$0700a8c0@cod> Message-ID: <47582AFA.4080708@apollo.sr.unh.edu> An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Dec 6 12:53:30 2007 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 6 Dec 2007 12:53:30 -0500 Subject: [vtkusers] eliminate duplicate nodes In-Reply-To: <47582AFA.4080708@apollo.sr.unh.edu> References: <005101c837ea$6ed9edb0$0700a8c0@cod> <475814F0.9060309@apollo.sr.unh.edu> <00a001c83821$37df0ca0$0700a8c0@cod> <47582AFA.4080708@apollo.sr.unh.edu> Message-ID: On 12/6/07, burlen wrote: > > I see where you are coming from, vtk is awesome in that it provides a lot > of well documented very thoroughly debugged functionality. Just a thought... > vtkPolyData is a type(not in the C++ sense) of unstructured grid, in fact > all of the cell types applicable for use with the unstructured grid are > available for use with the polydata. In my experience vtkPolyData class > encapsulates the functionality of the vtkUnstructuredGrid, although they are > not symetrically interchangable. You may be able to use poydata in place of You have this point reversed. PolyData cell types are a subset of those in UnstructuredGrid. PolyData, is tuned for graphics cards and rendering. PolyData can only represent 0 (point), 1 (line segment) and 2 (polygons, pixels etc) dimensional cells. UnstructuredGrid can also represent 3 dimensional cells (tetrahedra, voxels etc). > the unstructured grid. & If you couldn't it is very easy to convert between > the two, by taking the point set, cells, and point or cell data from one and > inserting it into the other. So what you might try is to convert your > unstructured grid to polydata clean it then convert back. > GeometryFilter will extract the surfaces of all boundary cells in an UnstructuredGrid, producing PolyData. I am not aware of any filters that can reverse that process (taking the 4 triangles that are on the surface of a tetrahedra and producing the tetrahedra for example.) > Burlen > > > Oliver Gloth wrote: > I had a look at vtkCleanPolyData and the classes vtkMergePoints and > vtkPointLocator seem to be good starting points. It is required to clean a > vtkUnstructuredGrid, that's why the vtkCleanPolyData is not directly > applicable - but thanks for pointing me in the right direction. > > The links you sent (thanks btw.) are not completely unknown to me and I > might use the Netgen package for this project. It is not a CFD project, but > a mesh generation project (I would not use VTK data structures for a solver > ...). I gave some thought to using VTK: it might not be ideal, but > definitely well suited. Tools like, for example, vtkMergePoints, are very > valuable and they can be a real pain to implement and debug. The other thing > I like about VTK is that it is well documented and has a large user > community, and yes visualisation is very easy indeed! > > Oliver > > -----Original Message----- > From: burlen [mailto:burlen at apollo.sr.unh.edu] > Sent: 06 December 2007 16:28 > To: Oliver Gloth > Cc: vtkusers > Subject: Re: [vtkusers] eliminate duplicate nodes > > Does the vtkCleanPolyData class do what you want?? > > Although I supose you could do it, I am not convinced that VTK would be > ideal for CFD project, you might find these links of use: > > http://www.andrew.cmu.edu/user/sowen/softsurv.html > http://www.cs.cmu.edu/~quake/triangle.html > http://www.hpfem.jku.at/netgen/ > > On the other hand at least visualization would be easy. > Burlen > > > Oliver Gloth wrote: > > > Dear VTK Users, > > I am currently working on an open-source project - developing a mesh > generator for CFD simulations. Due to budget and time constraints I have > chosen to use the VTK data structures as a basis, instead of writing my > > own > > > data structures. Furthermore this makes building a GUI (based on Qt) to > modify and visualise the mesh easy. One thing that is required is a filter > to merge two grids and eliminate duplicate nodes. Is such a thing already > part of VTK, or does somebody have a piece of code that would do this? The > implementation is not trivial, because the 3D search can be very time > consuming. If it doesn't exist yet I will implement it myself, but I would > like to avoid double work as much as possible. > > Oliver > > > > > > > _______________________________________________ > 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 > > From burlen at apollo.sr.unh.edu Thu Dec 6 13:32:39 2007 From: burlen at apollo.sr.unh.edu (burlen) Date: Thu, 06 Dec 2007 13:32:39 -0500 Subject: [vtkusers] eliminate duplicate nodes In-Reply-To: References: <005101c837ea$6ed9edb0$0700a8c0@cod> <475814F0.9060309@apollo.sr.unh.edu> <00a001c83821$37df0ca0$0700a8c0@cod> <47582AFA.4080708@apollo.sr.unh.edu> Message-ID: <47584047.7070500@apollo.sr.unh.edu> An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Thu Dec 6 17:48:40 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Thu, 6 Dec 2007 16:48:40 -0600 Subject: [vtkusers] VTK CVS currently kinda messed up. Message-ID: <44f773f50712061448o6f89b0b0me9ff21c51f9d98f1@mail.gmail.com> I'm using VTK CVS to pull in the latest and greatest vtkContourWidget, which depends on some other post-last-official-release stuff, so I can't really separate it out. This is normally not a problem, but today there's some squirrellyness showing up in the build on Mac OSX 10.4.11: 1. VTK_USE_TK -- if you're in the 'build tcl/tk for X11 even though you're on a Mac' world, this symbol is defaulting to off, but KWWidgets depends on it. It used to default on -- I think -- at any rate if you build X11 on OSX you lose unless you explicitly set it to on. 2. SQL in the IO directory -- on OSX, can't find 'mysql.h' -- and I don't really care. If you look at the CMakeLists.txt it adds source files to the IO library that depend on MySQL being found, even if VTK_USE_MYSQL is set to off. From pcjc2 at cam.ac.uk Thu Dec 6 18:35:48 2007 From: pcjc2 at cam.ac.uk (Peter Clifton) Date: Thu, 06 Dec 2007 23:35:48 +0000 Subject: [vtkusers] No depth buffer with wxVTKRenderWindow and wxVTKRenderWindowInteractor (FIX?) Message-ID: <1196984148.5846.9.camel@pcjc2lap> I've chased the depth buffer issue I was having some more (perhaps about as far as I've got time to), and conclude there is some bug in the interaction between wxVTKRenderWindow.py or wxVTKRenderWindowInteractor.py and the VTK GL class underneath. It seems that the widget is re-parented (or that code is invoked) when the widget first comes into existence, and after this point, the GL visual in use doesn't have a depth buffer. I'm not sure if the wrong visual is being used after re-parenting (visuals are part of X11 which I don't really understand), but debug tests I added before / after the re-parenting lead me to suspect this is where the depth buffer functionality disappears. I don't know why this helps, but looking at the old code for VTK from wxwidgets, I tried: --- wxVTKRenderWindowInteractor.py.bak 2007-11-30 02:28:36.000000000 +0000 +++ wxVTKRenderWindowInteractor.py 2007-12-06 23:30:41.000000000 +0000 @@ -321,7 +321,7 @@ # store the handle self.__handle = self.GetHandle() # and give it to VTK - self._Iren.GetRenderWindow().SetWindowInfo(str(self.__handle)) + self._Iren.GetRenderWindow().SetParentInfo(str(self.__handle)) # now that we've painted once, the Render() reparenting logic # is safe And the problem is fixed. I don't expect for a second that this is the right fix, but as I don't understand the subtlties of the VTK rendering class and have not used wxWidgets before, I think it's best to pass this on for for VTK developers to look at fixing. Many thanks for the debugging suggestions along the way. Best wishes, -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) From pppebay at sandia.gov Thu Dec 6 20:09:11 2007 From: pppebay at sandia.gov (Philippe P. Pebay) Date: Thu, 06 Dec 2007 17:09:11 -0800 Subject: [vtkusers] VTK CVS currently kinda messed up. In-Reply-To: <44f773f50712061448o6f89b0b0me9ff21c51f9d98f1@mail.gmail.com> References: <44f773f50712061448o6f89b0b0me9ff21c51f9d98f1@mail.gmail.com> Message-ID: <47589D37.7000205@sandia.gov> Kent: 2. should be fixed now. Please try again and let me know. Thank you. Philippe Pebay kent williams wrote: > I'm using VTK CVS to pull in the latest and greatest vtkContourWidget, > which depends on some other post-last-official-release stuff, so I > can't really separate it out. > > This is normally not a problem, but today there's some squirrellyness > showing up in the build on Mac OSX 10.4.11: > > > 1. VTK_USE_TK -- if you're in the 'build tcl/tk for X11 even though > you're on a Mac' world, this symbol is defaulting to off, but > KWWidgets depends on it. It used to default on -- I think -- at any > rate if you build X11 on OSX you lose unless you explicitly set it to > on. > > 2. SQL in the IO directory -- on OSX, can't find 'mysql.h' -- and I > don't really care. If you look at the CMakeLists.txt it adds source > files to the IO library that depend on MySQL being found, even if > VTK_USE_MYSQL is set to off. > _______________________________________________ > 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 > > -- Philippe P. Pebay Sandia National Laboratories http://www.ca.sandia.gov/crf/staff/staffPage.php?sid=pppebay From Shekhar.Chandra at sci.monash.edu.au Thu Dec 6 23:24:57 2007 From: Shekhar.Chandra at sci.monash.edu.au (shekharc) Date: Fri, 07 Dec 2007 15:24:57 +1100 Subject: [vtkusers] vtkImageViewer2 bug? In-Reply-To: References: <4757B755.9070300@sci.monash.edu.au> Message-ID: <4758CB19.2050102@sci.monash.edu.au> Hi Guys, Thanks for the reply Mark, it appears you might be right. I loaded data into Paraview and found if one lets OpenGL handle the mapping it does what I described before and clips the image but if "Interpolate Colours" is checked everything is fine. This is linked to SetInterpolateScalarsBeforeMapping() member in vtkMapper I think. I have attached what I mean from screenshots. vtkImageViewer doesn't have the vtkImageViewer2 issue if I use vtkImageMagnify to turn of interpolation but doesn't have the same Interactor setup. I have used Image Actor's member InterpolateOff() which controls interpolation display but is no doubt the cause. All I want to do is to display an uninterpolated image but not clip the image if thats even possible with vtkImageViewer2. Is there another lower function involving mapping/interpolation that I can use? Any help would be appreciated. Cheers Shakes Mark Wyszomierski wrote: > I've always noticed the same thing, I think it comes down to the way > the image is being texture mapped on the quad. I can't remember too > clearly but I looked into it about 2 years ago, I think it's just the > way opengl sticks it on there, I could be wrong on that though, > > Mark > > On Dec 6, 2007 3:48 AM, Shakes wrote: >> Hi Guys, >> >> I have been using vtkImageViewer2 to display very small greyscale images >> (7x7) and found that it seems to clip half of a pixel of each pixel on >> the edge of the image despite the data being read in correctly. I have >> attached a screenshot with a comparison of volume plot, vtkImageViewer2, >> data table and with ImageJ (on the right) and also attached the original >> test image. >> >> No other image viewer has problems with the file and the vtkPNMReader >> appears to work correctly as I can check the data directly by eye and is >> correct (the table verifies this). It is also writen by vtkPNMWriter. I >> have also written a VTI file containing a stack of these and the volume >> display appears suffer the same effect (very left). >> >> Here the camera is reset and I have checked the extents and bounds of >> vtkImageActor (also checked display bounds and extents), vtkRenderWindow >> and QVTKWidget and all is fine. >> >> I was just wondering if this might be a bug as this would not be visible >> for large images? Or is there an invisible border? Or something else I >> can do to rectify it. I have already spent several hours on this and >> hoping someone can help me. :( >> >> Cheers >> Shakes >> >> Relevant Code: >> >> int bounds[6]; >> vtkPNMReader* reader = vtkPNMReader::New(); >> >> reader->SetFileName(name.toStdString().c_str()); >> reader->Update(); >> imageData = reader->GetOutput(); >> >> imageData->GetExtent(bounds); >> cerr << "Image Size: " << bounds[1]+1 << "x" << bounds[3]+2 << endl; >> >> viewer->SetInput(imageData); //Doesn't matter if I use >> reader->GetOutputPort() >> viewer->GetRenderer()->ResetCamera(); >> QVTKWidget::SetRenderWindow(viewer->GetRenderWindow()); >> viewer->SetupInteractor(QVTKWidget::GetRenderWindow()->GetInteractor()); >> >> Other Info: >> Tested on Kubuntu Gutsy (g++ 4.1.2) x86, openSuse 10.3 x64 and Vista x64 >> (MSVC 2005 x64). Qt 4.3.2 and VTK 5.0.3. >> >> >> _______________________________________________ >> 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 >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: interp0.png Type: image/png Size: 23857 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: interp1.png Type: image/png Size: 27913 bytes Desc: not available URL: From fie.pye at atlas.cz Fri Dec 7 01:14:31 2007 From: fie.pye at atlas.cz (Pye Fie) Date: Fri, 07 Dec 2007 06:14:31 GMT Subject: [vtkusers] Building VTK Message-ID: Hello. I would like to build and install VTK and MayaVi2. PC: 2x Dual-core Opteron 275 OS: CentOS 5.0, kernel 2.6.18-8.1.15.el5 OS compiler: gcc version 4.2.0, gfortran I have already built and installed python2.5.1 and other module with compiler gcc3.4.6. Now I can't build VTK. I am building with gcc3.4.6. Building stops on the following error: [ 74%] Building CXX object IO/CMakeFiles/vtkIOTCL.dir/vtkZLibDataCompressorTcl.o [ 74%] Building CXX object IO/CMakeFiles/vtkIOTCL.dir/vtkIOTCLInit.o Linking CXX shared library ../bin/libvtkIOTCL.so [ 74%] Built target vtkIOTCL Scanning dependencies of target vtkParseOGLExt [ 74%] Building CXX object Utilities/ParseOGLExt/CMakeFiles/vtkParseOGLExt.dir/ParseOGLExt.o [ 74%] Building CXX object Utilities/ParseOGLExt/CMakeFiles/vtkParseOGLExt.dir/Tokenizer.o Linking CXX executable ../../bin/vtkParseOGLExt CMakeFiles/vtkParseOGLExt.dir/Tokenizer.o: In function `std::__verify_grouping(char const*, unsigned long, std::basic_string, std::allocator > const&)': Tokenizer.cxx:(.text+0x19): undefined reference to `std::basic_string, std::allocator >::size() const' Tokenizer.cxx:(.text+0x70): undefined reference to `std::basic_string, std::allocator >::operator[](unsigned long) const' Tokenizer.cxx:(.text+0xb0): undefined reference to `std::basic_string, std::allocator >::operator[](unsigned long) const' Tokenizer.cxx:(.text+0xdd): undefined reference to `std::basic_string, std::allocator >::operator[](unsigned long) const' CMakeFiles/vtkParseOGLExt.dir/Tokenizer.o: In function `Tokenizer::Tokenizer(char const*, char const*)': Tokenizer.cxx:(.text+0x12a): undefined reference to `std::allocator::allocator()' Tokenizer.cxx:(.text+0x13b): undefined reference to `std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&)' Tokenizer.cxx:(.text+0x14e): undefined reference to `std::allocator::~allocator()' Tokenizer.cxx:(.text+0x164): undefined reference to `std::allocator::~allocator()' Tokenizer.cxx:(.text+0x16d): undefined reference to `std::allocator::allocator()' Tokenizer.cxx:(.text+0x182): undefined reference to `std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&)' The list continues. It seams that there is something wrong with OpenGL but I can't find what is wrong. Could anybody help me? I have attached more detailed information about VTK configuration, building output and building script. Best regards fie pye ------------------------------------------ http://search.atlas.cz/ -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_build.tar.gz Type: application/x-gzip Size: 30276 bytes Desc: not available URL: From nalkar at earthlink.net Fri Dec 7 02:02:45 2007 From: nalkar at earthlink.net (Donald Johnson) Date: Fri, 7 Dec 2007 01:02:45 -0600 Subject: [vtkusers] Using VTK Point Locator Message-ID: Can anyone tell me what i am doing wrong here? Im trying to filter a very dense set of poly lines so that it can be viewed. My plan was to only add new poly lines that had no points close to the points of lines that had already been added to the output. To do this i created a vtkPointLocator and initialized it with a vtkPoints that contained only the points from the first line. I would then check the points of every other line and if none of the points where to close i would add them to the vtkPoints, rebuild the locator and continue. The problem is the locator always return the id -1 for the nearest point even when i check the first line, where it should find exact matches. // get the info objects vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkInformation *outInfo = outputVector->GetInformationObject(0); // get the input and ouptut vtkPolyData *input = vtkPolyData::SafeDownCast(inInfo-> Get(vtkDataObject::DATA_OBJECT())); vtkPolyData *output = vtkPolyData::SafeDownCast(outInfo-> Get(vtkDataObject::DATA_OBJECT())); vtkPoints *inPts = input->GetPoints(); vtkIdType numPts = input->GetNumberOfPoints(); vtkPoints *outPts = vtkPoints::New(); outPts->Allocate(numPts); int n = outPts->GetNumberOfPoints(); vtkPointData *inputPD = input->GetPointData(); vtkCellData *inputCD = input->GetCellData(); vtkDebugMacro(<<"Beginning Line Spacing clean"); if ( (numPts < 1) || (inPts == NULL ) ) { vtkDebugMacro(<<"No data points"); return 1; } vtkCellArray* inLines = input->GetLines(); vtkIdType numLines = inLines->GetNumberOfCells(); vtkCellArray* outLines = vtkCellArray::New(); outLines->Allocate(numLines); if ( (numLines < 1) || (inLines == NULL ) ) { vtkDebugMacro(<<"No data lines"); return 1; } vtkIdType inCellID = 0, newId; int i, j; vtkIdType ptId; vtkIdType npts = 0; vtkIdType *pts = 0; double x[3]; double newx[3]; double d2; double bounds[6]; vtkIdType insertPointId; vtkIdType insertCellId; // seed the output points and lines with the first line inLines->GetCell(0,npts,pts); for(i = 0; i < npts; ++i ) { inPts->GetPoint(pts[i],x); insertPointId = outPts->InsertNextPoint(x); } insertCellId = outLines->InsertNextCell(npts,pts); // calculate the bounds of the input data set input->ComputeBounds(); input->GetBounds(bounds); // set the locator to insert into out points and use the input datasets bounds Locator->InitPointInsertion(outPts,bounds); Locator->BuildLocator(); if ( !this->GetAbortExecute() && inLines->GetNumberOfCells() > 0 ) { // loop should be from 1 to GetNumberOfCells -1 for(i = 0; i < inLines->GetNumberOfCells(); ++i) { bool pass = true; for( j = 0; j < npts; ++j ) { inPts->GetPoint(pts[j],x); ptId = Locator->FindClosestPoint(x); // ptId is always -1 if ( ptId != -1 ) { pass = false; } } if ( pass ) { // add the points to the output points // add the line to output lines } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From cedric.schwartz at enst-bretagne.fr Fri Dec 7 04:24:23 2007 From: cedric.schwartz at enst-bretagne.fr (cedric.schwartz at enst-bretagne.fr) Date: Fri, 7 Dec 2007 10:24:23 +0100 Subject: [vtkusers] using gprof with vtk Message-ID: <20071207102423.flo4nc2xwgg8o8ko@webmail.enst-bretagne.fr> Hello all, When using gprof with vtk, vtk functions are marked . Is there a way to prevent that ? Thanks, Cedric Schwartz From j.m.h.thomas at dl.ac.uk Fri Dec 7 07:53:47 2007 From: j.m.h.thomas at dl.ac.uk (Thomas, JMH (Jens)) Date: Fri, 7 Dec 2007 12:53:47 -0000 Subject: [vtkusers] Problem with building VTK 5.0.3 with Python/Tk on Mac OSX 10.4.1 Message-ID: Hello! I'm trying to build vtk 5.0.3 with the Python and Tcl/Tk wrappers on Mac OSX 10.4.1 on a ppc machine using python 2.5 and building a universal binary. The build currently fails with: [ 30%] Building CXX object Filtering/CMakeFiles/vtkFilteringTCL.dir/vtkFilteringTCLInit.o /Users/jmht/work/codes/CCP1GUI/ccp1gui_app/vtk/VTK-5.0.3_build/Filtering/vtkFilteringTCLInit.cxx make[2]: *** No rule to make target `bin/libvtkCommonTCL.dylib', needed by `bin/libvtkFilteringTCL.5.0.3.dylib'. Stop. make[1]: *** [Filtering/CMakeFiles/vtkFilteringTCL.dir/all] Error 2 make: *** [all] Error 2 Does anyone have any suggestions on how to get this to work? I've attached my CmakeCache.txt and have included some additional information below in case it is of any use. Many thanks, Jens Additional info: I'm using cmake-2.4.7-Darwin-universal The build initially failed building the libvtkCommonTCL.5.0.dylib, but this was because the -ltcl was missing from the link line, and the link was successful after I manually appended this. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: CMakeCache.txt URL: From master at iaas.msu.ru Fri Dec 7 07:49:44 2007 From: master at iaas.msu.ru (Michail Vidiassov) Date: Fri, 7 Dec 2007 15:49:44 +0300 Subject: [vtkusers] PDF 3D support Message-ID: <000001c838cf$c099a6a0$fc03a8c0@csiaas.msu.ru> Dear All, did anybody try to make VTK produce U3D files (a 3D model file format Adobe Reader is player for)? Since Intel provides a (free&open) compiler that makes U3D files from text scene description files it seems to be easy to export to. U3D files can be embedded into PDF by Adobe Acrobat 3D, pdflatex and (not tested by me) some free pdf libraries. Given such (assumed) advantages for purposes of model dissimination, the lack of support in VTK is a matter of little surprise to me. But may be there are issues unknown to me - like U3D being a brain-dead format with no future and opensourcing the U3D library and utilities by Intel was the last act before dumping it? On the positive side - is there public interest in having such an exporter written? Sincerely, Michail From wfisico at yahoo.com.br Fri Dec 7 08:02:23 2007 From: wfisico at yahoo.com.br (walmor godoi) Date: Fri, 7 Dec 2007 05:02:23 -0800 (PST) Subject: [vtkusers] VTK and Mouse 3D (Logitech) Message-ID: <72005.11637.qm@web51906.mail.re2.yahoo.com> Hi , I am developing application in Java (Linux and Windows) for visualization of the 3D industrial tomographies (with VTK / ITK). We buy a Logitech Mouse 3D(Space Explorer model) for interaction facilities. Does anyone know how to configure the mouse to the VTK (in any language)? Somebody build a class for this application? Grateful Walmor Cardoso Godoi, M. Sc. Curitiba - Paran? - Brasil Cel: 55 41 9192-9044 LACTEC - Institute of Technology for Development Url: http://walmor.godoi.goglepages.com Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento! http://br.mail.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From pcjc2 at cam.ac.uk Fri Dec 7 08:31:19 2007 From: pcjc2 at cam.ac.uk (Peter Clifton) Date: Fri, 07 Dec 2007 13:31:19 +0000 Subject: [vtkusers] VTK and Mouse 3D (Logitech) In-Reply-To: <72005.11637.qm@web51906.mail.re2.yahoo.com> References: <72005.11637.qm@web51906.mail.re2.yahoo.com> Message-ID: <1197033668.8517.26.camel@pcjc2lap> On Fri, 2007-12-07 at 05:02 -0800, walmor godoi wrote: > > Hi , > > I am developing application in Java (Linux and Windows) > for visualization of the 3D industrial tomographies (with VTK / > ITK). We buy a Logitech Mouse 3D(Space Explorer model) for interaction > facilities. > > Does anyone know how to configure the mouse to the VTK (in any > language)? > > Somebody build a class for this application? No, but I've been playing with this device myself.. just haven't got around to trying to hook it to the VTK stuff I was doing. For examples of using the device under Linux (Not through the 3Dconnexions SDK, which is probably incompatible with many open source licenses).. http://eugen.leitl.org/spacenavi.c http://www.home.unix-ag.org/simon/files/helix-15.tar.gz (Neither of these were written by me, but both work with a little modification to find the right /dev/input/event* device. (You can use a udev rule to auto-generate /dev/input/spacenavigator when it plugs in). If you're on Windows, then this forum thread links a community provided driver to use the SpaceNavigator as a joystick. That may be a nice generic way to add support in VTK. http://www.3dconnexion.com/forum/viewtopic.php?t=336&postdays=0&postorder=asc&start=0 Best wishes, -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) From sean at rogue-research.com Fri Dec 7 09:24:43 2007 From: sean at rogue-research.com (Sean McBride) Date: Fri, 7 Dec 2007 09:24:43 -0500 Subject: [vtkusers] Problem with building VTK 5.0.3 with Python/Tk on Mac OSX 10.4.1 In-Reply-To: References: Message-ID: <20071207142443.1491200239@smtp1.sympatico.ca> On 12/7/07 12:53 PM, Thomas, JMH (Jens) said: >I'm trying to build vtk 5.0.3 with the Python and Tcl/Tk wrappers on Mac >OSX 10.4.1 on a ppc machine using python 2.5 and building a universal binary. If want want a Universal Binary, you should definitely use CVS, not 5.0.3: Also, do you really mean 10.4.1? Or do you mean 10.4.11 or 10.5.1? In any case, which version of Xcode do you have? >Does anyone have any suggestions on how to get this to work? > >I've attached my CmakeCache.txt and have included some additional >information below in case it is of any use. 1200 lines of text is a lot... :) What settings did you change from their default? >I'm using cmake-2.4.7-Darwin-universal If you are on 10.5, I suggest CVS CMake also. Lastly, there are some Mac dashboards that enable TCL, you may want to look at their settings. -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From francois.bertel at kitware.com Fri Dec 7 10:03:33 2007 From: francois.bertel at kitware.com (Francois Bertel) Date: Fri, 07 Dec 2007 10:03:33 -0500 Subject: [vtkusers] vtkImageViewer2 bug? In-Reply-To: <4758CB19.2050102@sci.monash.edu.au> References: <4757B755.9070300@sci.monash.edu.au> <4758CB19.2050102@sci.monash.edu.au> Message-ID: <475960C5.1040405@kitware.com> A vtkImageData is a uniform grid (can be 3D, 2D or 1D) of points and cells. The geometry part of this dataset is defined by some origin (position of the lower left deepest point) and some spacing (distance between two points, which is also the distance between the center of two cells, spacing can be different in each dimension) In each dimension, there are n points (the number can be different in each dimension), point 0 defines the lowest geometry bound and point (n-1) the highest geometry bound. In each dimension, a cell is bounded by two points. There are (n-1) cells, indexed from 0 to n-2. Cell i is bounded by point i and point i+1. Point i is the boundary between cell i-1 and cell i. An image on a png file is just a 2 dimensional array. There is no geometry attached to it. When it comes to VTK world, this array is stored as a vtkDataArray on a vtkImageData. In a vtkImageData, there are two types of arrays, those associated with position of points (pointdata), those associated with the center of the cells (celldata). The vtkPNMReader makes the choice to attach this array to the points. When it comes to display (map) this array to the imagedata geometry, the values are only defined at the position of the points, any other location between two points is an interpolated value. The type of interpolation is not unique. In nearest interpolation mode, the value displayed is constant around the position of a point. As the first point and last points define also the boundary of the dataset, only one part of the domain they cover is displayed (the geometry does not exist on the left of the most left point, the geometry does not exist on the right of the most right point). In linear mode, values displayed between points are linearly interpolated. That's probably the mode that makes more sense to visualize pointdata. See the first figure in attachment (pointdata.png) In order to display in nearest mode (as you tried on the images you sent in your first message), quads of the same size for each value of a png image, the dataarray has to be assigned to cells instead of points. See the second figure in attachment (celldata.png) Unfortunately, I don't thing this feature exists on the vtkPNMReader. Similar remark for celldata: if you assign the dataarray to celldata and try to display the values in linear mode, the interpolation happens between the centers of two cells. Here comes the boundary issue again, as the most left cell does not have a left neighbor, interpolation cannot happens, the value of the cell remains constant on its left part. Same thing for the most right cell, the value on its right part remains constant until it reaches the right boundary of the imagedata. Regards. shekharc wrote: > Hi Guys, > > Thanks for the reply Mark, it appears you might be right. I loaded data > into Paraview and found if one lets OpenGL handle the mapping it does > what I described before and clips the image but if "Interpolate Colours" > is checked everything is fine. This is linked to > SetInterpolateScalarsBeforeMapping() member in vtkMapper I think. > > I have attached what I mean from screenshots. vtkImageViewer doesn't > have the vtkImageViewer2 issue if I use vtkImageMagnify to turn of > interpolation but doesn't have the same Interactor setup. I have used > Image Actor's member InterpolateOff() which controls interpolation > display but is no doubt the cause. > > All I want to do is to display an uninterpolated image but not clip the > image if thats even possible with vtkImageViewer2. Is there another > lower function involving mapping/interpolation that I can use? > > Any help would be appreciated. > Cheers > Shakes > > Mark Wyszomierski wrote: >> I've always noticed the same thing, I think it comes down to the way >> the image is being texture mapped on the quad. I can't remember too >> clearly but I looked into it about 2 years ago, I think it's just the >> way opengl sticks it on there, I could be wrong on that though, >> >> Mark >> >> On Dec 6, 2007 3:48 AM, Shakes wrote: >>> Hi Guys, >>> >>> I have been using vtkImageViewer2 to display very small greyscale images >>> (7x7) and found that it seems to clip half of a pixel of each pixel on >>> the edge of the image despite the data being read in correctly. I have >>> attached a screenshot with a comparison of volume plot, vtkImageViewer2, >>> data table and with ImageJ (on the right) and also attached the original >>> test image. >>> >>> No other image viewer has problems with the file and the vtkPNMReader >>> appears to work correctly as I can check the data directly by eye and is >>> correct (the table verifies this). It is also writen by vtkPNMWriter. I >>> have also written a VTI file containing a stack of these and the volume >>> display appears suffer the same effect (very left). >>> >>> Here the camera is reset and I have checked the extents and bounds of >>> vtkImageActor (also checked display bounds and extents), vtkRenderWindow >>> and QVTKWidget and all is fine. >>> >>> I was just wondering if this might be a bug as this would not be visible >>> for large images? Or is there an invisible border? Or something else I >>> can do to rectify it. I have already spent several hours on this and >>> hoping someone can help me. :( >>> >>> Cheers >>> Shakes >>> >>> Relevant Code: >>> >>> int bounds[6]; >>> vtkPNMReader* reader = vtkPNMReader::New(); >>> >>> reader->SetFileName(name.toStdString().c_str()); >>> reader->Update(); >>> imageData = reader->GetOutput(); >>> >>> imageData->GetExtent(bounds); >>> cerr << "Image Size: " << bounds[1]+1 << "x" << bounds[3]+2 << endl; >>> >>> viewer->SetInput(imageData); //Doesn't matter if I use >>> reader->GetOutputPort() >>> viewer->GetRenderer()->ResetCamera(); >>> QVTKWidget::SetRenderWindow(viewer->GetRenderWindow()); >>> viewer->SetupInteractor(QVTKWidget::GetRenderWindow()->GetInteractor()); >>> >>> Other Info: >>> Tested on Kubuntu Gutsy (g++ 4.1.2) x86, openSuse 10.3 x64 and Vista x64 >>> (MSVC 2005 x64). Qt 4.3.2 and VTK 5.0.3. >>> >>> >>> _______________________________________________ >>> 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 >>> >>> > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 -- Fran?ois Bertel, PhD | Kitware Inc. Suite 204 1 (518) 371 3971 x113 | 28 Corporate Drive | Clifton Park NY 12065, USA -------------- next part -------------- A non-text attachment was scrubbed... Name: pointdata.png Type: image/png Size: 36539 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: celldata.png Type: image/png Size: 26871 bytes Desc: not available URL: From jtaclas at bidmc.harvard.edu Fri Dec 7 14:12:34 2007 From: jtaclas at bidmc.harvard.edu (jtaclas at bidmc.harvard.edu) Date: Fri, 7 Dec 2007 14:12:34 -0500 Subject: [vtkusers] point cloud as spheres Message-ID: <25A33F7C2B7E2E458182A863929DD9D832D7C9@EVS7.its.caregroup.org> If I wanted to visualize a point cloud (about 100 points) as a cloud of spheres, what would be the simplest way for me to do that? Would I make a sphere centered at each point, and add them all to a vtkAssembly? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From quasilister at gmail.com Fri Dec 7 16:14:59 2007 From: quasilister at gmail.com (quasilister) Date: Fri, 07 Dec 2007 16:14:59 -0500 Subject: [vtkusers] 2D contouring with vtkDiscreteMarchingCube Message-ID: <1197062099.30685.3.camel@localhost.localdomain> Dear vtkUsers, I seem to be having some trouble contouring 2D data with vtkDiscreteMarchingCubes. I "trick" the algorithm by giving an extra z-dimension to vtkImageData. For example If my data is 100x100 (x-y), I write vol.SetDimensions(100,100,2), however, my vtkFloatArray will only contain 100x100 points. When I render an image for the first time my method works just fine: http://debye.physics.indiana.edu/images/correct.jpg However, if I reload and render the same data several times, the rendered images have points or entire blocks that are incorrectly plotted: http://debye.physics.indiana.edu/images/incorrect_1.jpg http://debye.physics.indiana.edu/images/incorrect_2.jpg I have tried this both under windows and linux and get similar results. I am using PyQt and python-VTK Thank you, --Benjamjn From Shekhar.Chandra at sci.monash.edu.au Fri Dec 7 19:12:05 2007 From: Shekhar.Chandra at sci.monash.edu.au (shekharc) Date: Sat, 08 Dec 2007 11:12:05 +1100 Subject: [vtkusers] vtkImageViewer2 bug? In-Reply-To: <475960C5.1040405@kitware.com> References: <4757B755.9070300@sci.monash.edu.au> <4758CB19.2050102@sci.monash.edu.au> <475960C5.1040405@kitware.com> Message-ID: <4759E155.9090909@sci.monash.edu.au> Hi Francois, Thanks very much for your reply. I'm digesting and looking into this now. :) Cheers Shakes/Shekhar PS: If any one needs an ASCII Read/Write code for the PNM's. Let me know. (I will have a look into how I can contribute to VTK if this is useful feature to people.) Francois Bertel wrote: > A vtkImageData is a uniform grid (can be 3D, 2D or 1D) of points and cells. > > The geometry part of this dataset is defined by some origin (position of the lower left deepest point) and some spacing (distance between two points, which is also the distance between the center of two cells, spacing can be different in each dimension) > > In each dimension, there are n points (the number can be different in each dimension), point 0 defines the lowest geometry bound and point (n-1) the highest geometry bound. In each dimension, a cell is bounded by two points. There are (n-1) cells, indexed from 0 to n-2. Cell i is bounded by point i and point i+1. Point i is the boundary between cell i-1 and cell i. > > An image on a png file is just a 2 dimensional array. There is no geometry attached to it. When it comes to VTK world, this array is stored as a vtkDataArray on a vtkImageData. > > In a vtkImageData, there are two types of arrays, those associated with position of points (pointdata), those associated with the center of the cells (celldata). The vtkPNMReader makes the choice to attach this array to the points. > > When it comes to display (map) this array to the imagedata geometry, the values are only defined at the position of the points, any other location between two points is an interpolated value. The type of interpolation is not unique. > > In nearest interpolation mode, the value displayed is constant around the position of a point. As the first point and last points define also the boundary of the dataset, only one part of the domain they cover is displayed (the geometry does not exist on the left of the most left point, the geometry does not exist on the right of the most right point). > > In linear mode, values displayed between points are linearly interpolated. That's probably the mode that makes more sense to visualize pointdata. > > See the first figure in attachment (pointdata.png) > > In order to display in nearest mode (as you tried on the images you sent in your first message), quads of the same size for each value of a png image, the dataarray has to be assigned to cells instead of points. > > See the second figure in attachment (celldata.png) > > Unfortunately, I don't thing this feature exists on the vtkPNMReader. > > Similar remark for celldata: if you assign the dataarray to celldata and try to display the values in linear mode, the interpolation happens between the centers of two cells. Here comes the boundary issue again, as the most left cell does not have a left neighbor, interpolation cannot happens, the value of the cell remains constant on its left part. Same thing for the most right cell, the value on its right part remains constant until it reaches the right boundary of the imagedata. > > > Regards. > > shekharc wrote: >> Hi Guys, >> >> Thanks for the reply Mark, it appears you might be right. I loaded data >> into Paraview and found if one lets OpenGL handle the mapping it does >> what I described before and clips the image but if "Interpolate Colours" >> is checked everything is fine. This is linked to >> SetInterpolateScalarsBeforeMapping() member in vtkMapper I think. >> >> I have attached what I mean from screenshots. vtkImageViewer doesn't >> have the vtkImageViewer2 issue if I use vtkImageMagnify to turn of >> interpolation but doesn't have the same Interactor setup. I have used >> Image Actor's member InterpolateOff() which controls interpolation >> display but is no doubt the cause. >> >> All I want to do is to display an uninterpolated image but not clip the >> image if thats even possible with vtkImageViewer2. Is there another >> lower function involving mapping/interpolation that I can use? >> >> Any help would be appreciated. >> Cheers >> Shakes >> >> Mark Wyszomierski wrote: >>> I've always noticed the same thing, I think it comes down to the way >>> the image is being texture mapped on the quad. I can't remember too >>> clearly but I looked into it about 2 years ago, I think it's just the >>> way opengl sticks it on there, I could be wrong on that though, >>> >>> Mark >>> >>> On Dec 6, 2007 3:48 AM, Shakes wrote: >>>> Hi Guys, >>>> >>>> I have been using vtkImageViewer2 to display very small greyscale images >>>> (7x7) and found that it seems to clip half of a pixel of each pixel on >>>> the edge of the image despite the data being read in correctly. I have >>>> attached a screenshot with a comparison of volume plot, vtkImageViewer2, >>>> data table and with ImageJ (on the right) and also attached the original >>>> test image. >>>> >>>> No other image viewer has problems with the file and the vtkPNMReader >>>> appears to work correctly as I can check the data directly by eye and is >>>> correct (the table verifies this). It is also writen by vtkPNMWriter. I >>>> have also written a VTI file containing a stack of these and the volume >>>> display appears suffer the same effect (very left). >>>> >>>> Here the camera is reset and I have checked the extents and bounds of >>>> vtkImageActor (also checked display bounds and extents), vtkRenderWindow >>>> and QVTKWidget and all is fine. >>>> >>>> I was just wondering if this might be a bug as this would not be visible >>>> for large images? Or is there an invisible border? Or something else I >>>> can do to rectify it. I have already spent several hours on this and >>>> hoping someone can help me. :( >>>> >>>> Cheers >>>> Shakes >>>> >>>> Relevant Code: >>>> >>>> int bounds[6]; >>>> vtkPNMReader* reader = vtkPNMReader::New(); >>>> >>>> reader->SetFileName(name.toStdString().c_str()); >>>> reader->Update(); >>>> imageData = reader->GetOutput(); >>>> >>>> imageData->GetExtent(bounds); >>>> cerr << "Image Size: " << bounds[1]+1 << "x" << bounds[3]+2 << endl; >>>> >>>> viewer->SetInput(imageData); //Doesn't matter if I use >>>> reader->GetOutputPort() >>>> viewer->GetRenderer()->ResetCamera(); >>>> QVTKWidget::SetRenderWindow(viewer->GetRenderWindow()); >>>> viewer->SetupInteractor(QVTKWidget::GetRenderWindow()->GetInteractor()); >>>> >>>> Other Info: >>>> Tested on Kubuntu Gutsy (g++ 4.1.2) x86, openSuse 10.3 x64 and Vista x64 >>>> (MSVC 2005 x64). Qt 4.3.2 and VTK 5.0.3. >>>> >>>> >>>> _______________________________________________ >>>> 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 >>>> >>>> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 > > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 From srfpala at earthlink.net Fri Dec 7 19:43:25 2007 From: srfpala at earthlink.net (Bob Palank) Date: Fri, 7 Dec 2007 18:43:25 -0600 Subject: [vtkusers] Lib.obj issue still exists Message-ID: <000a01c83933$5835df20$6b00a8c0@rrl> Running VC++ 2005 Express on XP Pro After referencing the vtk50\Include folder I get a clean compile which yields a vtkTest01.obj in the Debug folder. The linker creates the .exe and all is well since no code exist within main and no references to the vtk Library have been added. No executable vtk code was added - just a set of vtk includes ..... all is well ----------------------------------------------------------- Next, I add a Linker Input dependency for the folder h:\vtk50\lib still there is no code main() - the compile is clean but the Linker indicates Linking... LINK : fatal error LNK1104: cannot open file 'h:\vtk50\lib.obj' Build log was saved at "file://h:\vtk50\Examples\vtkTest01\vtkTest01\Debug\BuildLog.htm" Of course there is no lib.obj file. So what should I do ? Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shekhar.Chandra at sci.monash.edu.au Fri Dec 7 20:54:41 2007 From: Shekhar.Chandra at sci.monash.edu.au (shekharc) Date: Sat, 08 Dec 2007 12:54:41 +1100 Subject: [vtkusers] Lib.obj issue still exists In-Reply-To: <000a01c83933$5835df20$6b00a8c0@rrl> References: <000a01c83933$5835df20$6b00a8c0@rrl> Message-ID: <4759F961.3000702@sci.monash.edu.au> Hi Bob, You input dependency is a path, VC++ thinks its a file and since it has no extension it thinks its a object file. I'm guessing you entered this in Project Properties. If you want to link against VTK, you can add /LIBPATH:"h:\vtk50\lib" there or you could add the paths in Tools->Options and under Project and Solutions, enter the path in Lib section or finally copy the libraries to VC Lib directory. Then you'll have to link to the libraries in the properties by their name (like vtkRendering.lib, note the extension). This is what the properties "Additional Dependencies" should contain I think. Also ensure your VC++ is setup properly using otherwise VTK apps wont work anyway. Hope that helps. Cheers Shakes Bob Palank wrote: > Running VC++ 2005 Express on XP Pro > > > After referencing the vtk50\Include folder I get a clean compile > which yields a vtkTest01.obj in the Debug folder. > The linker creates the .exe and all is well since no code exist within > main and no references to the vtk Library have been added. > > No executable vtk code was added - just a set of vtk includes ..... all > is well > > ----------------------------------------------------------- > > Next, I add a Linker Input dependency for the folder h:\vtk50\lib > > still there is no code main() - the compile is clean but the Linker > indicates > > Linking... > > LINK : fatal error LNK1104: cannot open file 'h:\vtk50\lib.obj' > > Build log was saved at > "file://h:\vtk50\Examples\vtkTest01\vtkTest01\Debug\BuildLog.htm" > > Of course there is no lib.obj file. > > So what should I do ? > > Bob > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 From abatzis at ceid.upatras.gr Sat Dec 8 09:33:18 2007 From: abatzis at ceid.upatras.gr (abatzis at ceid.upatras.gr) Date: Sat, 8 Dec 2007 16:33:18 +0200 (EET) Subject: [vtkusers] vtkInria3d example error Message-ID: <1232.150.140.228.147.1197124398.squirrel@webmail.ceid.upatras.gr> Hello everyone, i m using vtkInria3d in conjuction with itk and vtk. Althought it compiled successfully in a minimal set-up(use ITK, no widgets and no xwidgets), when i m trying to build an example with VS 8 i get a fatal error description: couldnt open include file vtkViewImage3D.h:No such file or directory. Any help about the correct build options, so as to use vtkInria3d as my program's output visual editor and info about the error would be appreciately welcomed. Jim Bsc:Computer Engineering & Informatics Msc:Medical Physics From Pierre.Fillard at sophia.inria.fr Sat Dec 8 10:20:26 2007 From: Pierre.Fillard at sophia.inria.fr (Pierre Fillard) Date: Sat, 8 Dec 2007 16:20:26 +0100 Subject: [vtkusers] vtkInria3d example error In-Reply-To: <1232.150.140.228.147.1197124398.squirrel@webmail.ceid.upatras.gr> References: <1232.150.140.228.147.1197124398.squirrel@webmail.ceid.upatras.gr> Message-ID: <8D49FAF3-18B6-46CC-B936-1519E51FB9D9@sophia.inria.fr> Hello Jim, Are you trying to compile the examples provided with the vtkINRIA3D source code or your own code? The error you report simply means that the vtkINRIA3D include directories were not found or are wrong. Just make sure that the following lines are present in each CMakeLists.txt of the examples: FIND_PACKAGE(vtkINRIA3D) IF(vtkINRIA3D_FOUND) INCLUDE(${vtkINRIA3D_USE_FILE}) ELSE(vtkINRIA3D_FOUND) MESSAGE(FATAL_ERROR "vtkINRIA3D not found. Please set vtkINRIA3D_DIR.") ENDIF(vtkINRIA3D_FOUND) If I remember correctly, these lines are not set in the CMakeLists of the vtkINRIA3D examples (while they should). Just copy them and let me know if it fixes your problem. Hope this helps. Pierre Fillard. On Dec 8, 2007, at 3:33 PM, abatzis at ceid.upatras.gr wrote: > > > > Hello everyone, > > i m using vtkInria3d in conjuction with itk and vtk. Althought it > compiled > successfully in a minimal set-up(use ITK, no widgets and no xwidgets), > when i m trying to build an example with VS 8 i get a fatal error > description: couldnt open include file vtkViewImage3D.h:No such > file or > directory. Any help about the correct build options, so as to use > vtkInria3d as my program's output visual editor and info about the > error > would be appreciately welcomed. > > Jim > Bsc:Computer Engineering & Informatics > Msc:Medical Physics > _______________________________________________ > 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 From lua.byhh at gmail.com Sun Dec 9 00:38:37 2007 From: lua.byhh at gmail.com (berry) Date: Sun, 9 Dec 2007 13:38:37 +0800 Subject: [vtkusers] multiview reconstruction Message-ID: Hi, all Is there any vtk class can do multiview reconstruction(either volume or surface ) from multi-view camera pictures ? regards, -- Pang Shengyong Solidification Simulation Lab, State Key Lab of Mould & Die Technology, Huazhong Univ. of Sci. & Tech. China From prw at ceiriog.eclipse.co.uk Sun Dec 9 05:58:37 2007 From: prw at ceiriog.eclipse.co.uk (Peter Wainwright) Date: Sun, 09 Dec 2007 10:58:37 +0000 Subject: [vtkusers] Missing headers when compiling Slicer3 Message-ID: <1197197918.24512.7.camel@ceiriog.eclipse.co.uk> Hi, I'm trying to compile the latest SVN version of Slicer3 http://www.na-mic.org/Wiki/index.php/Slicer3 using the latest CVS version of VTK. The compilation complains about a couple of missing headers: [ 16%] Building CXX object Libs/MRML/CMakeFiles/MRML.dir/vtkMRMLScene.o In file included from /usr/local/Vis3/bin/../include/vtk-5.1/vtksys/hash_map.hxx:42, from /home/prw/src/Slicer3-20071209/Libs/MRML/vtkMRMLScene.h:32, from /home/prw/src/Slicer3-20071209/Libs/MRML/vtkMRMLScene.cxx:22: /usr/local/Vis3/bin/../include/vtk-5.1/vtksys/hashtable.hxx:44:43: error: vtksys/cstddef: No such file or directory make[2]: *** [Libs/MRML/CMakeFiles/MRML.dir/vtkMRMLScene.o] Error 1 /home/prw/src/Slicer3-20071209/Base/Logic/vtkImageSlice.cxx:27:35: error: vtkTemplateAliasMacro.h: No such file or directory make[2]: *** [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/vtkImageSlice.o] Error 1 make[1]: *** [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/all] Error 2 make: *** [all] Error 2 I have found the same problem in CVS/SVN versions of VTK/Slicer3 for several months now. I work around the problem by manually "installing" the header files where Slicer3 expects to find them. Can you tell me whether these are public headers (in which case VTK should be fixed to install them) or whether they are internal private headers (in which case Slicer3 should not be using them)? Thanks, Peter Wainwright From bill.lorensen at gmail.com Sun Dec 9 08:31:29 2007 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 9 Dec 2007 08:31:29 -0500 Subject: [vtkusers] Missing headers when compiling Slicer3 In-Reply-To: <1197197918.24512.7.camel@ceiriog.eclipse.co.uk> References: <1197197918.24512.7.camel@ceiriog.eclipse.co.uk> Message-ID: <4db4735c0712090531k3cadf7b9k88edd056f0503eea@mail.gmail.com> Peter, I've cross-posted this to the slicer developers list. I don't think that Slicer3 builds against VTK cvs. I believe the recommended VTK branch is: VTK-5-0. Bill On Dec 9, 2007 5:58 AM, Peter Wainwright wrote: > Hi, > > I'm trying to compile the latest SVN version of Slicer3 > > http://www.na-mic.org/Wiki/index.php/Slicer3 > > using the latest CVS version of VTK. The compilation complains about a > couple of missing headers: > > [ 16%] Building CXX object Libs/MRML/CMakeFiles/MRML.dir/vtkMRMLScene.o > In file included > from /usr/local/Vis3/bin/../include/vtk-5.1/vtksys/hash_map.hxx:42, > > from /home/prw/src/Slicer3-20071209/Libs/MRML/vtkMRMLScene.h:32, > > from /home/prw/src/Slicer3-20071209/Libs/MRML/vtkMRMLScene.cxx:22: > /usr/local/Vis3/bin/../include/vtk-5.1/vtksys/hashtable.hxx:44:43: > error: vtksys/cstddef: No such file or directory > make[2]: *** [Libs/MRML/CMakeFiles/MRML.dir/vtkMRMLScene.o] Error 1 > > > > > /home/prw/src/Slicer3-20071209/Base/Logic/vtkImageSlice.cxx:27:35: > error: vtkTemplateAliasMacro.h: No such file or directory > make[2]: *** [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/vtkImageSlice.o] > Error 1 > make[1]: *** [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/all] Error 2 > make: *** [all] Error 2 > > I have found the same problem in CVS/SVN versions of VTK/Slicer3 for > several months now. I work around the problem by manually "installing" > the header files where Slicer3 expects to find them. > > Can you tell me whether these are public headers (in which case VTK > should be fixed to install them) or whether they are internal private > headers (in which case Slicer3 should not be using them)? > > > Thanks, > Peter Wainwright > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddarkzero at hotmail.com Sun Dec 9 16:37:59 2007 From: daviddarkzero at hotmail.com (Jose David Pfuturi Huisa) Date: Sun, 9 Dec 2007 22:37:59 +0100 Subject: [vtkusers] vtkImageData python Message-ID: Hello everybody I want to create an image with vtkImagedata, i saw an example using C++ code as follows: int x,y;vtkImageData *image;image=vtkImageData::New();image->SetDimensions(256,256,1);image->SetScalarTypeToFloat();image->AllocateScalars();float *ptr=static_cast(image->GetScalarPointer());for(y=0;y<256;++y){ for(x=0;x<256;++x) {*ptr++=10.0*sin(0.1*x)*sin(0.1*y); }} vtkImageViewer *viewer=vtkImageViewer::New();viewer->SetInput(image);viewer->SetColorWindow(20);viewer->SetColorLevel(0);viewer->Render(); How could i do it using Python? i tried to do it but GetScalarPointer() returns a pointer and in c++ this pointer stores the scalar value each position but on Python i dont know how i can do it. image=vtkImageData()image.SetDimensions(256,256,1)image.SetOrigin(0,0,0)image.SetScalarTypeToUnsignedChar ()image.AllocateScalars () ptr=data.GetScalarPointer() for y in range(0,256): for x in range(0,256): #?viewer=vtkImageViewer();viewer.SetInput(image);viewer.SetColorWindow(20);viewer.SetColorLevel(0); In *ptr++=10.0*sin(0.1*x)*sin(0.1*y) i suppose that it changes the pixel value, true? if not then, an image has pixels, and this pixels has a RGB value, How could i get this value (each pixel)? thanks a lot Jos? _________________________________________________________________ Tecnolog?a, moda, motor, viajes,?suscr?bete a nuestros boletines para estar a la ?ltima http://newsletters.msn.com/hm/maintenanceeses.asp?L=ES&C=ES&P=WCMaintenance&Brand=WL&RU=http%3a%2f%2fmail.live.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sun Dec 9 17:18:13 2007 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Mon, 10 Dec 2007 09:18:13 +1100 Subject: [vtkusers] point cloud as spheres In-Reply-To: <25A33F7C2B7E2E458182A863929DD9D832D7C9@EVS7.its.caregroup.org> References: <25A33F7C2B7E2E458182A863929DD9D832D7C9@EVS7.its.caregroup.org> Message-ID: Look at vtkGlyph3D and the examples using it. http://www.vtk.org/doc/nightly/html/classvtkGlyph3D.html Andrw On Dec 8, 2007 6:12 AM, wrote: > > If I wanted to visualize a point cloud (about 100 points) as a cloud of > spheres, what would be the simplest way for me to do that? Would I make a > sphere centered at each point, and add them all to a vtkAssembly? > > Jason > > _______________________________________________ > 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 > > -- ___________________________________________ 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.acfr.usyd.edu.au/ ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shekhar.Chandra at sci.monash.edu.au Sun Dec 9 18:45:20 2007 From: Shekhar.Chandra at sci.monash.edu.au (shekharc) Date: Mon, 10 Dec 2007 10:45:20 +1100 Subject: [vtkusers] vtkImageData python In-Reply-To: References: Message-ID: <475C7E10.4050908@sci.monash.edu.au> Hi Jose, For the C++ API Docs: virtual float GetScalarComponentAsFloat (int x, int y, int z, int component) virtual void SetScalarComponentFromFloat (int x, int y, int z, int component, float v) virtual double GetScalarComponentAsDouble (int x, int y, int z, int component) virtual void SetScalarComponentFromDouble (int x, int y, int z, int component, double v) Those will do what u want. U can also set the number of scalar components and their type. Just check out the Doxygen API Doc. Hope that helps. Cheers Shakes Jose David Pfuturi Huisa wrote: > Hello everybody > I want to create an image with vtkImagedata, i saw an example using C++ > code as follows: > int x,y; > vtkImageData *image; > image=vtkImageData::New(); > image->SetDimensions(256,256,1); > image->SetScalarTypeToFloat(); > image->AllocateScalars(); > float *ptr=static_cast(image->GetScalarPointer()); > for(y=0;y<256;++y) > { for(x=0;x<256;++x) > {*ptr++=10.0*sin(0.1*x)*sin(0.1*y); > } > } > vtkImageViewer *viewer=vtkImageViewer::New(); > viewer->SetInput(image); > viewer->SetColorWindow(20); > viewer->SetColorLevel(0); > viewer->Render(); > > How could i do it using Python? i tried to do it but GetScalarPointer() > returns a pointer and in c++ this pointer stores the scalar value each > position but on Python i dont know how i can do it. > image=vtkImageData() > image.SetDimensions(256,256,1) > image.SetOrigin(0,0,0) > image.SetScalarTypeToUnsignedChar () > image.AllocateScalars () > ptr=data.GetScalarPointer() > for y in range(0,256): > for x in range(0,256): > #? > viewer=vtkImageViewer(); > viewer.SetInput(image); > viewer.SetColorWindow(20); > viewer.SetColorLevel(0); > > In *ptr++=10.0*sin(0.1*x)*sin(0.1*y) i suppose that it changes the pixel > value, true? > if not then, an image has pixels, and this pixels has a RGB value, How > could i get this value (each pixel)? > > thanks a lot > > Jos? > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > Tecnolog?a, moda, motor, viajes,?suscr?bete a nuestros boletines para > estar a la ?ltima MSN Newsletters > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 From morenoisidro at yahoo.com.ar Sun Dec 9 20:27:20 2007 From: morenoisidro at yahoo.com.ar (Isidro Moreno) Date: Sun, 9 Dec 2007 22:27:20 -0300 Subject: [vtkusers] Strange behaviour of vtkXYPlotActor class Message-ID: <000c01c83acb$d4dca060$7bc388be@Moreno> Hi! I'm a beginer in VTK and I've been trying to draw the sinus func with vtkxyplotactor. The strange thing is that although I indicate which are the x-y components in the values array, the system draws the "arc sin" function. I don't know how to understand this; Am I wrong? or the system swap components? Here's the code: #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkPolyData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkXYPlotActor.h" #include "vtkDataSetCollection.h" int main(){ // CONSOLE: how many points entry to form the "line". // CONSOLA: Ingreso de la cantidad de puntos que formar?n la "curva". int data_puntos; cout<<"Ingrese cantidad de puntos (1-50): "; cin>>data_puntos; // Creaci?n de una Celda - Definici?n topol?gica y geom?trica // Definici?n Topol?gica // Inserci?n de 1(una) celda con 'n' puntos vtkCellArray *cellarray=vtkCellArray::New(); cellarray->InsertNextCell(data_puntos); // Definici?n Geom?trica y relaci?n con la topolog?a vtkPoints *puntos=vtkPoints::New(); for(int j=0;jInsertCellPoint(j); // ___ j = n?ID de cada punto puntos->InsertPoint( j, // _________________________ n? ID j/5.0, // _____________________ valor de "x" sin(j/5.0), // ________________ valor de "y" 0.0 // _________________________valor de "z" );} // Agregado de informaci?n topol?gica y geom?trica al DataSet vtkPolyData *polydata=vtkPolyData::New(); polydata->SetPoints(puntos); // Puntos polydata->SetLines(cellarray); // Celdas - 1(una) polydata->GetPointData()->SetScalars(puntos->GetData()); polydata->GetPointData()->Update(); // Creaci?n de un Actor vtkXYPlotActor *actor=vtkXYPlotActor::New(); actor->SetXValuesToValue(); actor->SetDataObjectXComponent(0,1); actor->SetDataObjectYComponent(0,2); actor->AddInput(polydata); // The following didn't help me enough... : ( cout<GetNumberOfItems()="<GetInputList()->GetNumberOfItems()<Delete(); puntos->Delete(); cellarray->Delete(); actor->Delete(); renderer->Delete(); ventana->Delete(); interac->Delete(); return 0;} Thanks in advance! Isidro. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jake.nickel at gmail.com Sun Dec 9 23:48:57 2007 From: jake.nickel at gmail.com (Jake Nickel) Date: Sun, 9 Dec 2007 22:48:57 -0600 Subject: [vtkusers] How to render separate objects in different colors In-Reply-To: <4db4735c0711280541rd9a9674k3f305c0d10320b97@mail.gmail.com> References: <61efc8380711272211g1882a2d8i1ad15997b2d7605b@mail.gmail.com> <4db4735c0711280541rd9a9674k3f305c0d10320b97@mail.gmail.com> Message-ID: <61efc8380712092048u9a5cda1ra1f3afbe10e7aefc@mail.gmail.com> That works great! Now I would like to take the objects that I have and be able to control their rendered color through user interaction. I have a vtkCellPicker that is used to get the 3D point selected by the user. What is the best way of getting the scalar value associated to that point? In other words, if I have an (x, y, z) location that should be a part of object 9 (whose scalar value is 9), is there a method that I can call with (x, y, z) that will return '9' or some sort of a vtkObject that I can extract the scalar value from? Thanks! -Jake On Nov 28, 2007 7:41 AM, Bill Lorensen wrote: > Jake, > > vtkDiscreteMarchingCubes will extract one or more labeled structures from > a vtk image. > > http://www.vtk.org/doc/nightly/html/classvtkDiscreteMarchingCubes.html > > There is a short example of usage in: > > http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Graphics/Testing/Tcl/TestDiscreteMarchingCubes.tcl?root=VTK&content-type=text/plain > > > Bill > > On Nov 28, 2007 1:11 AM, Jake Nickel wrote: > > > Hi All, > > > > I have an Analyze image that is segmented into different objects in the > > following manner: All voxels associated with object 1 are assigned value = > > 1, voxels associated with object 2 are assigned value = 2, etc. (Background > > voxel values = 0) > > > > I would like to visualize the entire data set and have a single object > > stand out by rendering it with a different color than the rest of the > > objects. For example, I would like object 1 to be red and objects 2 and up > > to be white (black background). > > > > The data set is large enough to where volume rendering performance is > > very slow, so I have been surface rendering instead. I am able to read the > > image in using ITK and get the voxel values. In order to render the > > surface, I've used the itkImageToVTKImageFilter to convert the image to VTK. > > > > > > Is there a special filter that would be good for doing this? Or does > > anyone have any insight as to how I should approach this? > > > > Thanks in advance for any help! > > -Jake > > > > _______________________________________________ > > 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 > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent_elkouby at yahoo.fr Mon Dec 10 05:38:02 2007 From: vincent_elkouby at yahoo.fr (vincent elkouby) Date: Mon, 10 Dec 2007 10:38:02 +0000 (GMT) Subject: [vtkusers] light problems with vtkLODProp3D Message-ID: <601026.1437.qm@web27506.mail.ukl.yahoo.com> Hello, I add two mappers in a vtkLODProp3D (one vtkVolumeTextureMapper3D and one vtkFixedPointVolumeRayCastMapper) and I add 10 positional lights. It works very well with vtkFixedPointVolumeRayCastMapper but when the vtkLODProp3D selects the vtkVolumeTextureMapper3D , it uses only one light (the first added). So it's very dark with vtkVolumeTextureMapper3D and normal with vtkFixedPointVolumeRayCastMapper. I have been looking for an answer to this problem without succes. So may be do you know this problem and the answer... Thank you. Part of my code: vtkVolumeProperty * volumeProperty=vtkVolumeProperty::New(); vtkFixedPointVolumeRayCastMapper * volMapper=vtkFixedPointVolumeRayCastMapper::New(); setVolumeProperty(volumeProperty,dataFunction); volMapper->SetSampleDistance(dataFunction.getScalarDistance()); volMapper->SetImageSampleDistance(1.0); vtkVolumeTextureMapper3D *volMap3D=vtkVolumeTextureMapper3D::New(); volMap3D->SetSampleDistance(dataFunction.getScalarDistance()); volMap3D->SetPreferredMethodToNVidia(); vtkLODProp3D * volumeLOD=vtkLODProp3D::New(); int id3D, idRC; id3D=volumeLOD->AddLOD(volMap3D,0.0); idRC=volumeLOD->AddLOD(volMapper,0.0); volumeLOD->SetLODProperty(idRC,volumeProperty); volumeLOD->SetLODProperty(id3D,volumeProperty); _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.m.h.thomas at dl.ac.uk Mon Dec 10 07:49:20 2007 From: j.m.h.thomas at dl.ac.uk (Thomas, JMH (Jens)) Date: Mon, 10 Dec 2007 12:49:20 -0000 Subject: [vtkusers] Problem with building VTK 5.0.3 with Python/Tk on Mac OSX 10.4.1 References: <20071207142443.1491200239@smtp1.sympatico.ca> Message-ID: Hi Sean, Thanks for getting back to me. >Also, do you really mean 10.4.1? Or do you mean 10.4.11 or 10.5.1? In >any case, which version of Xcode do you have? Sorry - that was a typo, it's OSX 10.4.11 with Xcode 2.5 >>I've attached my CmakeCache.txt and have included some additional >>information below in case it is of any use. >1200 lines of text is a lot... :) What settings did you change from >their default? BUILD_SHARED_LIBS: ON CMAKE_OSX_ARCHITECTURES: ppc;i386 VTK_WRAP_PYTHON: ON VTK_WRAP_TCL: ON BUILD_TESTING: OFF CMAKE_VERBOSE_MAKEFILE: ON >If you are on 10.5, I suggest CVS CMake also. I've redone the build with CVS versions of both VTK and CMake. The build fails twice as -ltcl is missing from the link stage for libvtkCommonTCL.5.1.0.dylib and the file vtk right at the end of the build. I was able to fix the former by editing the file Common/CMakeFiles/vtkCommonTCL.dir/link.txt to add -ltcl and the latter by manually executing the link for vtk and appending -ltcl. This allows the build to run to completion. However, if I install the python files (using setup.py) and then try and run the file: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/tk/vtkLoadPythonTkWidgets.py It fails with the error: File "./vtkTkRenderWidget.py", line 466, in vtkRenderWidgetConeExample() File "./vtkTkRenderWidget.py", line 443, in vtkRenderWidgetConeExample pane = vtkTkRenderWidget(root,width=300,height=300) File "./vtkTkRenderWidget.py", line 81, in __init__ vtkLoadPythonTkWidgets(master.tk) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/tk/vtkLoadPythonTkWidgets.py", line 67, in vtkLoadPythonTkWidgets interp.call('load', filename) _tkinter.TclError: image not found NSCreateObjectFileImageFromFile() error: not a Mach-O MH_BUNDLE file It appears it's trying to load the file libvtkRenderingPythonTkWidgets.dylib, but this file hasn't been built (which I think is because the Cmake variable VTK_USE_TK hasn't been set, even though the Tcl and Tk libraries were found during the configure). Is there an easy way to fix this? >Lastly, there are some Mac dashboards that enable TCL, you may want to >look at their settings. I'm not very familiar with dashboard, so it's quite possible I missed something, but've looked at http://www.vtk.org/Testing/Dashboard/20071210-0300-Nightly/Dashboard.html and couldn't find any that had the python and tcl wrapping turned on. Best wishes, Jens -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From emogeden at NRCan.gc.ca Mon Dec 10 09:47:02 2007 From: emogeden at NRCan.gc.ca (Ogedengbe, Emmanuel) Date: Mon, 10 Dec 2007 09:47:02 -0500 Subject: [vtkusers] VTK with Window Vista Message-ID: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> Dear All, I have no problem with the installation and use of VTK on window XP; but it seems I have compatibility problem with the installation on my laptop which has vista OS. Has anyone tried using VTK with vista and how do you resolve this problem? Thanks in advance. Emmanuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Mon Dec 10 10:16:50 2007 From: sean at rogue-research.com (Sean McBride) Date: Mon, 10 Dec 2007 10:16:50 -0500 Subject: [vtkusers] VTK with Window Vista In-Reply-To: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> References: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> Message-ID: <20071210151650.1635522784@smtp1.sympatico.ca> On 12/10/07 9:47 AM, Ogedengbe, Emmanuel said: >I have no problem with the installation and use of VTK on window XP; but >it seems I have compatibility problem with the installation on my laptop >which has vista OS. Has anyone tried using VTK with vista Yes, there is a nightly dashboard: > and how do you >resolve this problem? Thanks in advance. Which problem? And which VTK? -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From zhangtuo123 at yahoo.com.cn Mon Dec 10 10:36:42 2007 From: zhangtuo123 at yahoo.com.cn (tuo zhang) Date: Mon, 10 Dec 2007 23:36:42 +0800 (CST) Subject: [vtkusers] about vtkPolyDataConnectivityFilter Message-ID: <219385.42893.qm@web15803.mail.cnb.yahoo.com> Hi, I wanna extract the region closest to the specified point with vtkPolyDataConnectivityFilter, could anyone give me an example. Thank you ___________________________________________________________ ?????????????????? http://cn.mail.yahoo.com/promo/carnival07/ From camargo at lncc.br Mon Dec 10 12:11:43 2007 From: camargo at lncc.br (Eduardo Camargo) Date: Mon, 10 Dec 2007 15:11:43 -0200 (BRST) Subject: [vtkusers] Writting files Message-ID: <48583.146.134.8.169.1197306703.squirrel@webmail.lncc.br> Hi, I have a problem with the vtkEnsgihtWriter, the method creates all files correctly (array and .case files) but doesn`t finish the .case file until the user closes Paraview. The method used was the follow: void GenerateCaseFiles(vtkUnstructuredGrid *grid) { ? vtkIntArray *bids = vtkIntArray::New(); ?? bids->SetName("BlockId"); ?? for(int i = 0; i < grid->GetNumberOfCells(); i++) ?????? bids->InsertNextValue(1); ?? grid->GetCellData()->SetScalars(bids); ??? ??? ??? char name[256];??? ??? sprintf(name, "%s%s", this->GetOutputPath(), "Out.case"); ??? ??? vtkEnSightWriter * writer; ??? ??? writer = vtkEnSightWriter::New(); ??? ??? writer->SetFileName(name); ??? ??? ??? ??? ??? int blockids[2]; ??? blockids[0] = 1; ??? blockids[1] = 0; ??? writer->SetNumberOfBlocks(1); ??? writer->SetBlockIDs(blockids); ??? ??? ??? ??? ??? ??? for(int i=0; i < grid->GetNumberOfBlocks(); i++) ??? ??? ??? { ??? ??? ??? vtkUnstructuredGrid *output_grid = vtkUnstructuredGrid::New(); ??? ??? ??? ??? output_grid->DeepCopy(grid);??? ??? ??? ??? ??? ??? ??? ??? this->GetGridOfInstantOfTime(i, output_grid); ??? ??? ??? ??? ??? ??? writer->SetInput(output_grid); ??? ??? ??? writer->SetTimeStep(i); ??? ??? ??? writer->Write(); ??? ??? ??? output_grid->Delete();??? ??? ??? ??? } ??? ??? ??? ??? writer->UpdateInformation(); ??? ??? writer->UpdateWholeExtent(); ??? ??? writer->Update(); ??? ??? ??? ??? writer->WriteCaseFile(grid->GetNumberOfBlocks()); ??? ??? ??? ??? ??? ??? writer->Delete(); ??? ??? bids->Delete(); } Regards, Eduardo Camargo Analista de Sistemas HeMoLab - http://www.lncc.br/prjhemo Laborat?rio Nacional de Computa??o Cient?fica - LNCC -------------- next part -------------- An HTML attachment was scrubbed... URL: From emogeden at NRCan.gc.ca Mon Dec 10 12:29:59 2007 From: emogeden at NRCan.gc.ca (Ogedengbe, Emmanuel) Date: Mon, 10 Dec 2007 12:29:59 -0500 Subject: [vtkusers] VTK with Window Vista In-Reply-To: <20071210151650.1635522784@smtp1.sympatico.ca> References: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> <20071210151650.1635522784@smtp1.sympatico.ca> Message-ID: <560727A39D7F3546B0A17F405E4F370602909C5F@s0-ott-x1.nrn.nrcan.gc.ca> Hi, I have VTK version 5.0.2 with CMake 2.4. The problem is the program compatibility issue of CMakesetup.exe with either my OS or the Visual Studio version 9. The error message looks like "CMakeSetUp MFC Application has stopped working". How will I resolve this problem? Emmanuel -----Original Message----- From: Sean McBride [mailto:sean at rogue-research.com] Sent: Monday, December 10, 2007 10:17 To: Ogedengbe, Emmanuel; vtkusers at vtk.org Subject: Re: [vtkusers] VTK with Window Vista On 12/10/07 9:47 AM, Ogedengbe, Emmanuel said: >I have no problem with the installation and use of VTK on window XP; but >it seems I have compatibility problem with the installation on my laptop >which has vista OS. Has anyone tried using VTK with vista Yes, there is a nightly dashboard: > and how do you >resolve this problem? Thanks in advance. Which problem? And which VTK? -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From oliver.gloth at engits.com Mon Dec 10 12:51:34 2007 From: oliver.gloth at engits.com (Oliver Gloth) Date: Mon, 10 Dec 2007 18:51:34 +0100 Subject: [vtkusers] vtkDataSet::Squeeze() Message-ID: <004201c83b55$4ea82340$0300a8c0@cod> A quick question about the Squeeze method: Does it only reduce the excess memory used by the vtkDataSet itself (e.g. points and cell data for a vtkUnstructuredGrid), or does it also reduce the memory usage of associated point and cell data? Thanks for helping, Oliver From karthik.krishnan at kitware.com Mon Dec 10 13:11:33 2007 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Mon, 10 Dec 2007 13:11:33 -0500 Subject: [vtkusers] VTK with Window Vista In-Reply-To: <560727A39D7F3546B0A17F405E4F370602909C5F@s0-ott-x1.nrn.nrcan.gc.ca> References: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> <20071210151650.1635522784@smtp1.sympatico.ca> <560727A39D7F3546B0A17F405E4F370602909C5F@s0-ott-x1.nrn.nrcan.gc.ca> Message-ID: <9ddb27260712101011n7b132a3ft34157ffed32bfb45@mail.gmail.com> On 12/10/07, Ogedengbe, Emmanuel wrote: > > Hi, > I have VTK version 5.0.2 with > CMake 2.4. The problem is the program compatibility issue of > CMakesetup.exe with either my OS or the Visual Studio version 9. You need to use cmake cvs for VS9 . You can build CMake from source ( www.cmake.org) or more conveniently, you can use the nightly binaries here: http://www.cmake.org/files/vCVS/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From prw at ceiriog.eclipse.co.uk Mon Dec 10 13:16:05 2007 From: prw at ceiriog.eclipse.co.uk (Peter Wainwright) Date: Mon, 10 Dec 2007 18:16:05 +0000 Subject: [slicer-devel] [vtkusers] Missing headers when compiling Slicer3 In-Reply-To: <475D5132.4060101@bwh.harvard.edu> References: <1197197918.24512.7.camel@ceiriog.eclipse.co.uk> <4db4735c0712090531k3cadf7b9k88edd056f0503eea@mail.gmail.com> <475D5132.4060101@bwh.harvard.edu> Message-ID: <1197310565.28722.12.camel@ceiriog.eclipse.co.uk> On Mon, 2007-12-10 at 09:46 -0500, Steve Pieper wrote: > Hi Bill, Peter - > > Yes, slicer3 is typically built against the VTK-5-0 cvs branch. > > I ran a slicer3 build against the vtk head and didn't see any issues. > Is your build against an install tree or a build tree? I guess you would say it was against an "install tree"? That is to say I did "make install" to install all the prerequisite packages in a common prefix "/usr/local/Vis" and then built Slicer3 for the same prefix. After installing those 2 headers Slicer3 built, installed and ran. I have not used it in anger since the data I am interested in is in an antique format and I have not been able to load it yet... do you have any tools for importing the "VoxelView" file format? If not I must learn how to write an import module myself... Peter > > Good luck, > Steve > > Bill Lorensen wrote: > > Peter, > > > > I've cross-posted this to the slicer developers list. > > > > I don't think that Slicer3 builds against VTK cvs. I believe the > > recommended VTK branch is: VTK-5-0. > > > > Bill > > On Dec 9, 2007 5:58 AM, Peter Wainwright > > wrote: > > > > Hi, > > > > I'm trying to compile the latest SVN version of Slicer3 > > > > http://www.na-mic.org/Wiki/index.php/Slicer3 > > > > using the latest CVS version of VTK. The compilation complains about a > > couple of missing headers: > > > > [ 16%] Building CXX object Libs/MRML/CMakeFiles/MRML.dir/vtkMRMLScene.o > > In file included > > from /usr/local/Vis3/bin/../include/vtk-5.1/vtksys/hash_map.hxx:42, > > > > from /home/prw/src/Slicer3-20071209/Libs/MRML/vtkMRMLScene.h:32, > > > > from /home/prw/src/Slicer3-20071209/Libs/MRML/vtkMRMLScene.cxx:22: > > /usr/local/Vis3/bin/../include/vtk-5.1/vtksys/hashtable.hxx:44:43: > > error: vtksys/cstddef: No such file or directory > > make[2]: *** [Libs/MRML/CMakeFiles/MRML.dir/vtkMRMLScene.o] Error 1 > > > > > > > > > > /home/prw/src/Slicer3-20071209/Base/Logic/vtkImageSlice.cxx:27:35: > > error: vtkTemplateAliasMacro.h: No such file or directory > > make[2]: *** [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/vtkImageSlice.o] > > Error 1 > > make[1]: *** [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/all] Error 2 > > make: *** [all] Error 2 > > > > I have found the same problem in CVS/SVN versions of VTK/Slicer3 for > > several months now. I work around the problem by manually "installing" > > the header files where Slicer3 expects to find them. > > > > Can you tell me whether these are public headers (in which case VTK > > should be fixed to install them) or whether they are internal private > > headers (in which case Slicer3 should not be using them)? > > > > > > Thanks, > > Peter Wainwright > > > > _______________________________________________ > > 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 > > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > slicer-devel mailing list > > slicer-devel at bwh.harvard.edu > > http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel > > To unsubscribe: send email to slicer-devel-request at massmail.spl.harvard.edu with unsubscribe as the subject From jmsantos at mrsrl.stanford.edu Mon Dec 10 15:30:00 2007 From: jmsantos at mrsrl.stanford.edu (Juan Santos) Date: Mon, 10 Dec 2007 12:30:00 -0800 Subject: [vtkusers] Data driven VTK Message-ID: Hi, I'm fairly new to VTK and I have a question regarding the VTK architecture. Basically I have a specialized image reconstruction library "like" VTK but it is data-driven. Basically when data goes in, the processed data comes out of the pipeline. I understand that VTK works the other way around. When data is required at the output, it backpropagates that request until it finds which portions of the pipeline need to be updated. I would like to connect both pipelines (data-driven at the input of VTK) but I'm having some trouble. It would be ideal for me if the whole pipeline is data-driven, but it would be also fine if the VTK portion remains demand-driven, as long as it gets updated when new data arrives from the "data-driven" portion. I looked at video capture examples but unfortunately they relay on the VTK event loop. The data driven portion of the pipeline already has an event loop (to react to new data at the input) so this is not compatible with just mark the data as "Modified" and wait for the pipeline to be updated (as I understand how VTK works). What does work though is if I manually call the render method of the visualizer after I feed the VTK pipeline. Unfortunately, that solution its a little bit odd as the "data conversion" object (the one who connected the data-driven pipeline with VTK) will need to know about the last object in the pipeline to call the update method (maybe this is the only way). Is there a good solution to this kind of problem? I looked into the "pipeline executive" architecture but I don't know enough of that and it seems that the only propagation methods available are demand-driven. I'll appreciate if someone who has some experience with this could point me in the right direction. Thanks Juan -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Dec 10 15:58:31 2007 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 10 Dec 2007 15:58:31 -0500 Subject: [slicer-devel] [vtkusers] Missing headers when compiling Slicer3 In-Reply-To: <475DA450.7010209@bwh.harvard.edu> References: <1197197918.24512.7.camel@ceiriog.eclipse.co.uk> <4db4735c0712090531k3cadf7b9k88edd056f0503eea@mail.gmail.com> <475D5132.4060101@bwh.harvard.edu> <1197310565.28722.12.camel@ceiriog.eclipse.co.uk> <475DA450.7010209@bwh.harvard.edu> Message-ID: <4db4735c0712101258t2d0dd8b7m36226443724e13e0@mail.gmail.com> Steve, Sounds like a vtk install problem. Maybe we can tickle someone at Kitware to look into it. Bill On Dec 10, 2007 3:40 PM, Steve Pieper wrote: > Hi Peter - > > Yes, it sounds like there's a difference between building slicer against > an installed vtk rather than the build tree. Can you build slicer by > pointing at your vtk build tree for now? > > Regarding "VoxelView" format - I don't know... Slicer3 now relies on the > ITK IO factory for reading and writing and it's 'fairly' easy to > implement these as long as your data is pretty standard volumes. > > Best, > Steve > > > Peter Wainwright wrote: > > On Mon, 2007-12-10 at 09:46 -0500, Steve Pieper wrote: > >> Hi Bill, Peter - > >> > >> Yes, slicer3 is typically built against the VTK-5-0 cvs branch. > >> > >> I ran a slicer3 build against the vtk head and didn't see any issues. > >> Is your build against an install tree or a build tree? > > > > I guess you would say it was against an "install tree"? That is to say > > I did "make install" to install all the prerequisite packages in a > > common prefix "/usr/local/Vis" and then built Slicer3 for the same > > prefix. > > > > After installing those 2 headers Slicer3 built, installed and ran. I > > have not used it in anger since the data I am interested in is in an > > antique format and I have not been able to load it yet... do you have > > any tools for importing the "VoxelView" file format? If not I must > > learn how to write an import module myself... > > > > Peter > > > >> Good luck, > >> Steve > >> > >> Bill Lorensen wrote: > >>> Peter, > >>> > >>> I've cross-posted this to the slicer developers list. > >>> > >>> I don't think that Slicer3 builds against VTK cvs. I believe the > >>> recommended VTK branch is: VTK-5-0. > >>> > >>> Bill > >>> On Dec 9, 2007 5:58 AM, Peter Wainwright >>> > wrote: > >>> > >>> Hi, > >>> > >>> I'm trying to compile the latest SVN version of Slicer3 > >>> > >>> http://www.na-mic.org/Wiki/index.php/Slicer3 > >>> > >>> using the latest CVS version of VTK. The compilation complains > about a > >>> couple of missing headers: > >>> > >>> [ 16%] Building CXX object > Libs/MRML/CMakeFiles/MRML.dir/vtkMRMLScene.o > >>> In file included > >>> from /usr/local/Vis3/bin/../include/vtk-5.1 > /vtksys/hash_map.hxx:42, > >>> > >>> from /home/prw/src/Slicer3-20071209/Libs/MRML/vtkMRMLScene.h:32, > >>> > >>> from /home/prw/src/Slicer3-20071209/Libs/MRML/vtkMRMLScene.cxx:22: > >>> /usr/local/Vis3/bin/../include/vtk-5.1/vtksys/hashtable.hxx:44:43: > >>> error: vtksys/cstddef: No such file or directory > >>> make[2]: *** [Libs/MRML/CMakeFiles/MRML.dir/vtkMRMLScene.o] Error > 1 > >>> > >>> > >>> > >>> > >>> /home/prw/src/Slicer3-20071209/Base/Logic/vtkImageSlice.cxx:27:35: > >>> error: vtkTemplateAliasMacro.h: No such file or directory > >>> make[2]: *** > [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/vtkImageSlice.o] > >>> Error 1 > >>> make[1]: *** [Base/Logic/CMakeFiles/SlicerBaseLogic.dir/all] Error > 2 > >>> make: *** [all] Error 2 > >>> > >>> I have found the same problem in CVS/SVN versions of VTK/Slicer3 > for > >>> several months now. I work around the problem by manually > "installing" > >>> the header files where Slicer3 expects to find them. > >>> > >>> Can you tell me whether these are public headers (in which case > VTK > >>> should be fixed to install them) or whether they are internal > private > >>> headers (in which case Slicer3 should not be using them)? > >>> > >>> > >>> Thanks, > >>> Peter Wainwright > >>> > >>> _______________________________________________ > >>> 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 > >>> > >>> > >>> > >>> > ------------------------------------------------------------------------ > >>> > >>> _______________________________________________ > >>> slicer-devel mailing list > >>> slicer-devel at bwh.harvard.edu > >>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-devel > >>> To unsubscribe: send email to > slicer-devel-request at massmail.spl.harvard.edu with unsubscribe as the > subject > -------------- next part -------------- An HTML attachment was scrubbed... URL: From biddisco at cscs.ch Mon Dec 10 16:55:00 2007 From: biddisco at cscs.ch (John Biddiscombe) Date: Mon, 10 Dec 2007 22:55:00 +0100 Subject: [vtkusers] Data driven VTK In-Reply-To: References: Message-ID: <475DB5B4.80100@cscs.ch> An HTML attachment was scrubbed... URL: From dean.inglis at camris.ca Mon Dec 10 17:08:23 2007 From: dean.inglis at camris.ca (dean.inglis at camris.ca) Date: Mon, 10 Dec 2007 17:08:23 -0500 Subject: [vtkusers] image reader problems - enforcing persistance of data after delete Message-ID: <6cfv4r$3omr68@toip37-bus.srvr.bell.ca> In my app, I read in 3D image data from either vtkGdcmReader, vtkXMLImageDataReader, vtkStructuredPointsReader or vtkMetaImageReader. This is done in a two stage process: stage 1: determine the file type based on extension read from a file open dialogue set the reader's ReleaseDataFlag to On add a progress observer allocate the appropriate reader, set a generic reference pointer to it as a vtkAlgorithm* delete the reader stage 2: downcast the correct type of reader from the vtkAlgorithm and get the output vtkImageData* input = reader->GetOutput(); input->UpdateInformation(); input->Update(); the application "this" maintains a pointer to the output by reference counting if (this->ImageData) { this->ImageData->UnRegister(this); // release hold on any previous data } this->ImageData = input; this->ImageData->UnRegister(this); // hold onto the new data display the data This all works fine for vtkGdcmReader and for vtkMetaImageReader but not vtkXMLImageDataReader or vtkStructuredPointsReader. With these readers, scrolling through the image slices causes the data to be re-read from disk, as evidenced by reappearance of a progress meter. Are there known issues with these classes? Why would their output behave differently than that obtained with the other two readers? Is there a way to force the reader to destroy but leave its output intact without copying the output to a new vtkImageData? Dean From naresh_dusane at yahoo.com Mon Dec 10 17:18:07 2007 From: naresh_dusane at yahoo.com (Naresh) Date: Mon, 10 Dec 2007 14:18:07 -0800 (PST) Subject: [vtkusers] Building VTK make for java Message-ID: <712007.94628.qm@web32114.mail.mud.yahoo.com> Hi All, I tried building VTK with cmake and VB6 but in VB I am getting java errors somehow I am not able to get through. Is there any way I can make the VTK binaries in simple manner ? (for this a very good reponse i received from Elhassan but with my system contraints I am ) I want to develope in java please suggest accordingly.I need VTK.jar to be build up at my place. If some one can share libraries that shall help. replies are appriciated. TIA, -Naresh Bollywood, fun, friendship, sports and more. You name it, we have it on http://in.promos.yahoo.com/groups -------------- next part -------------- An HTML attachment was scrubbed... URL: From morenoisidro at yahoo.com.ar Mon Dec 10 17:32:32 2007 From: morenoisidro at yahoo.com.ar (Isidro Moreno) Date: Mon, 10 Dec 2007 19:32:32 -0300 Subject: [vtkusers] Strange behaviour of vtkXYPlotActor class Message-ID: <001401c83b7c$96363ea0$ed25fdc9@Moreno> Hi! I'm a beginer in VTK and I've been trying to draw the sinus func with vtkxyplotactor. The strange thing is that although I indicate which are the x-y components in the values array, the system draws the "arc sin" function. I don't know how to understand this; Am I wrong? or the system swap components? Here's the code: #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkPolyData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkXYPlotActor.h" #include "vtkDataSetCollection.h" int main(){ // CONSOLE: how many points entry to form the "line". // CONSOLA: Ingreso de la cantidad de puntos que formar?n la "curva". int data_puntos; cout<<"Ingrese cantidad de puntos (1-50): "; cin>>data_puntos; // Creaci?n de una Celda - Definici?n topol?gica y geom?trica // Definici?n Topol?gica // Inserci?n de 1(una) celda con 'n' puntos vtkCellArray *cellarray=vtkCellArray::New(); cellarray->InsertNextCell(data_puntos); // Definici?n Geom?trica y relaci?n con la topolog?a vtkPoints *puntos=vtkPoints::New(); for(int j=0;jInsertCellPoint(j); // ___ j = n?ID de cada punto puntos->InsertPoint( j, // _________________________ n? ID j/5.0, // _____________________ valor de "x" sin(j/5.0), // ________________ valor de "y" 0.0 // _________________________valor de "z" );} // Agregado de informaci?n topol?gica y geom?trica al DataSet vtkPolyData *polydata=vtkPolyData::New(); polydata->SetPoints(puntos); // Puntos polydata->SetLines(cellarray); // Celdas - 1(una) polydata->GetPointData()->SetScalars(puntos->GetData()); polydata->GetPointData()->Update(); // Creaci?n de un Actor vtkXYPlotActor *actor=vtkXYPlotActor::New(); actor->SetXValuesToValue(); actor->SetDataObjectXComponent(0,1); actor->SetDataObjectYComponent(0,2); actor->AddInput(polydata); // The following didn't help me enough... : ( cout<GetNumberOfItems()="<GetInputList()->GetNumberOfItems()<Delete(); puntos->Delete(); cellarray->Delete(); actor->Delete(); renderer->Delete(); ventana->Delete(); interac->Delete(); return 0;} Thanks in advance! Isidro. -------------- next part -------------- An HTML attachment was scrubbed... URL: From emogeden at NRCan.gc.ca Mon Dec 10 21:46:44 2007 From: emogeden at NRCan.gc.ca (Ogedengbe, Emmanuel) Date: Mon, 10 Dec 2007 21:46:44 -0500 Subject: [vtkusers] VTK with Window Vista In-Reply-To: <9ddb27260712101011n7b132a3ft34157ffed32bfb45@mail.gmail.com> References: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> <20071210151650.1635522784@smtp1.sympatico.ca> <560727A39D7F3546B0A17F405E4F370602909C5F@s0-ott-x1.nrn.nrcan.gc.ca> <9ddb27260712101011n7b132a3ft34157ffed32bfb45@mail.gmail.com> Message-ID: <560727A39D7F3546B0A17F405E4F370602909EE1@s0-ott-x1.nrn.nrcan.gc.ca> Hello, I have installed the winCVS but guess can't figure out how to build the cmake cvs with it (can't resolve the "Error SetGlobalGenerator called with null" problem). Has anyone encountered this problem before and can offer help? Thanks, Emmanuel. ________________________________ From: Karthik Krishnan [mailto:karthik.krishnan at kitware.com] Sent: Monday, December 10, 2007 13:12 To: Ogedengbe, Emmanuel Cc: vtkusers at vtk.org Subject: Re: [vtkusers] VTK with Window Vista On 12/10/07, Ogedengbe, Emmanuel wrote: Hi, I have VTK version 5.0.2 with CMake 2.4. The problem is the program compatibility issue of CMakesetup.exe with either my OS or the Visual Studio version 9. You need to use cmake cvs for VS9 . You can build CMake from source ( www.cmake.org) or more conveniently, you can use the nightly binaries here: http://www.cmake.org/files/vCVS/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sr.austin at btinternet.com Tue Dec 11 04:34:33 2007 From: sr.austin at btinternet.com (Spencer Ross Austin) Date: Tue, 11 Dec 2007 09:34:33 -0000 Subject: [vtkusers] How to write multiple vtkPolyDataReaders into one single Message-ID: <000001c83bd9$09ebf5e0$152ca8c0@work> Dear Goodwin Lawlor I am a vtk user and unfortunetly relatively new to vtk, I have search the archives and your post "How to write multiple vtkPolyData into on single XML file" is the closest I've come to what I'm trying to do. I have created two series of vtkPoints and saved them out in the polydata format with vtkPolyDataWriter, once I have saved them I try to bring them both into a new program and merge them together using vtkAppendPolyData. Whenever I try to merge two files or even a file and some already existing PolyData it won't render them out. I have provided my code below package require vtk package require vtkinteraction vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 vtkRenderWindowInteractor iren iren SetRenderWindow renWin ren1 SetBackground 1.8 1.8 1.8 renWin SetSize 720 720 # Inport two PolyData Files. # vtkPolyDataReader reader1 reader1 SetFileName "d:/education/spencer/simulation/servers.txt" reader1 update vtkPolyDataReader reader2 reader2 SetFileName "d:/education/spencer/simulation/points.txt" reader2 update # Appended into a single polydata. vtkAppendPolyData apd apd AddInput [reader1 GetOutput] apd AddInput [reader2 GetOutput] vtkSphereSource node node SetRadius 1.25 node SetPhiResolution 18 node SetThetaResolution 18 #create a glyph using 'balls' as the object and 'inputData' for location with 3D space vtkGlyph3D glyphPointsServers glyphPointsServers SetInputConnection [apd GetOutputPort] glyphPointsServers SetSource [node GetOutput] #Assign simple mapper to glyph vtkPolyDataMapper glyphMapperServers glyphMapperServers SetInput [glyphPointsServers GetOutput] #create actor of gylph to enable rendering of #primary server's vtkActor glyphServers glyphServers SetMapper glyphMapperServers [glyphServers GetProperty] SetColor 255 0 0 [glyphServers GetProperty] SetSpecular .3 [glyphServers GetProperty] SetSpecularPower 10 ren1 AddActor glyphServers renWin Render Thankyou for any help you can provide, -------------- next part -------------- An HTML attachment was scrubbed... URL: From sr.austin at btinternet.com Tue Dec 11 04:51:17 2007 From: sr.austin at btinternet.com (Spencer Ross Austin) Date: Tue, 11 Dec 2007 09:51:17 -0000 Subject: [vtkusers] Re: How to write multiple vtkPolyData into on single Message-ID: <007301c83bdb$602a9860$152ca8c0@work> Dear VTK User I am a vtk user and unfortunetly relatively new to it, I have search the archives and your post "How to write multiple vtkPolyData into on single XML file" is the closest I've come to what I'm trying to do. I have created two series of vtkPoints and saved them out in the polydata format with vtkPolyDataWriter, once I have saved them I try to bring them both into a new program and merge them together using vtkAppendPolyData. Whenever I try to merge two files or even a file and some already existing PolyData it won't render them out. I have provided my code below: package require vtk package require vtkinteraction vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 vtkRenderWindowInteractor iren iren SetRenderWindow renWin ren1 SetBackground 1.8 1.8 1.8 renWin SetSize 720 720 # Inport two PolyData Files. # vtkPolyDataReader reader1 reader1 SetFileName "d:/education/spencer/simulation/servers.txt" reader1 update vtkPolyDataReader reader2 reader2 SetFileName "d:/education/spencer/simulation/points.txt" reader2 update # Appended into a single polydata. vtkAppendPolyData apd apd AddInput [reader1 GetOutput] apd AddInput [reader2 GetOutput] vtkSphereSource node node SetRadius 1.25 node SetPhiResolution 18 node SetThetaResolution 18 #create a glyph using 'balls' as the object and 'inputData' for location with 3D space vtkGlyph3D glyphPointsServers glyphPointsServers SetInputConnection [apd GetOutputPort] glyphPointsServers SetSource [node GetOutput] #Assign simple mapper to glyph vtkPolyDataMapper glyphMapperServers glyphMapperServers SetInput [glyphPointsServers GetOutput] #create actor of gylph to enable rendering of #primary server's vtkActor glyphServers glyphServers SetMapper glyphMapperServers [glyphServers GetProperty] SetColor 255 0 0 [glyphServers GetProperty] SetSpecular .3 [glyphServers GetProperty] SetSpecularPower 10 ren1 AddActor glyphServers renWin Render Thankyou for any help you can provide, -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhangtuo123 at yahoo.com.cn Tue Dec 11 05:20:47 2007 From: zhangtuo123 at yahoo.com.cn (tuo zhang) Date: Tue, 11 Dec 2007 18:20:47 +0800 (CST) Subject: [vtkusers] about CellId Message-ID: <103347.55741.qm@web15807.mail.cnb.yahoo.com> Dear Vtk Users, I got a polygon from vtkMarchingCubes on a series of CT images. Now I want to get a picked CellId by calling vtkCellPicker::GetCellId(), but the call always return 1 no matter where is the picker. Could anyone tell me why? Thank you! ___________________________________________________________ ?????????????????? http://cn.mail.yahoo.com/promo/taobao20/index.php From Shekhar.Chandra at sci.monash.edu.au Tue Dec 11 06:17:40 2007 From: Shekhar.Chandra at sci.monash.edu.au (Shakes) Date: Tue, 11 Dec 2007 22:17:40 +1100 Subject: [vtkusers] VTK with Window Vista In-Reply-To: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> References: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> Message-ID: <475E71D4.8030206@sci.monash.edu.au> Hi Emmanuel, I use Visual C++ 8 (Express 2005) without any issues with Vista. VC 9 might be more difficult as you're probably finding out. You could drop a version in the compiler if thats possible with your code. Cheers Shakes Ogedengbe, Emmanuel wrote: > > Dear All, > > I have no problem with the installation and use of VTK on window XP; > but it seems I have compatibility problem with the installation on my > laptop which has vista OS. Has anyone tried using VTK with vista and > how do you resolve this problem? Thanks in advance. > > Emmanuel > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > From emogeden at NRCan.gc.ca Tue Dec 11 12:04:19 2007 From: emogeden at NRCan.gc.ca (Ogedengbe, Emmanuel) Date: Tue, 11 Dec 2007 12:04:19 -0500 Subject: [vtkusers] VTK with Window Vista In-Reply-To: <475E71D4.8030206@sci.monash.edu.au> References: <560727A39D7F3546B0A17F405E4F370602909A7C@s0-ott-x1.nrn.nrcan.gc.ca> <475E71D4.8030206@sci.monash.edu.au> Message-ID: <560727A39D7F3546B0A17F405E4F37060290A106@s0-ott-x1.nrn.nrcan.gc.ca> Hi Shakes, Thanks for your advice. The problem is that all my project codes on the laptop may not be compatible with VC 8 again. Cheers, Emmanuel -----Original Message----- From: Shakes [mailto:Shekhar.Chandra at sci.monash.edu.au] Sent: Tuesday, December 11, 2007 06:18 To: Ogedengbe, Emmanuel Cc: vtkusers at vtk.org Subject: Re: [vtkusers] VTK with Window Vista Hi Emmanuel, I use Visual C++ 8 (Express 2005) without any issues with Vista. VC 9 might be more difficult as you're probably finding out. You could drop a version in the compiler if thats possible with your code. Cheers Shakes Ogedengbe, Emmanuel wrote: > > Dear All, > > I have no problem with the installation and use of VTK on window XP; > but it seems I have compatibility problem with the installation on my > laptop which has vista OS. Has anyone tried using VTK with vista and > how do you resolve this problem? Thanks in advance. > > Emmanuel > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > From jourdain at artenum.com Tue Dec 11 12:09:43 2007 From: jourdain at artenum.com (Sebastien Jourdain) Date: Tue, 11 Dec 2007 18:09:43 +0100 Subject: [vtkusers] Re: Building VTK make for java In-Reply-To: <20071211170132.D6BAC1F81F1@public.kitware.com> References: <20071211170132.D6BAC1F81F1@public.kitware.com> Message-ID: <475EC457.6050003@artenum.com> You can find binaries for windows in the Cassandra project http://dev.artenum.com/projects/cassandra Regards, Seb > Hi All, > > I tried building VTK with cmake and VB6 but in VB I am getting java errors somehow I am not able to get through. > Is there any way I can make the VTK binaries in simple manner ? ( > for this a very good reponse i received from Elhassan but with my system contraints I am ) > > I want to develope in java please suggest accordingly.I need VTK.jar to be build up at my place. > If some one can share libraries that shall help. > > replies are appriciated. > TIA, > -Naresh From morenoisidro at yahoo.com.ar Tue Dec 11 17:33:05 2007 From: morenoisidro at yahoo.com.ar (Isidro Moreno) Date: Tue, 11 Dec 2007 19:33:05 -0300 Subject: [vtkusers] Strange behaviour of vtkXYPlotActor class Message-ID: <000e01c83c45$ea4fafc0$52591fbe@Moreno> Hi! I'm a beginer in VTK and I've been trying to draw the sinus func with vtkxyplotactor. The strange thing is that although I indicate which are the x-y components in the values array, the system draws the "arc sin" function. I don't know how to understand this; Am I wrong? or the system swap components? Here's the code: #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkPolyData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkXYPlotActor.h" #include "vtkDataSetCollection.h" int main(){ // CONSOLE: how many points entry to form the "line". // CONSOLA: Ingreso de la cantidad de puntos que formar?n la "curva". int data_puntos; cout<<"Ingrese cantidad de puntos (1-50): "; cin>>data_puntos; // Creaci?n de una Celda - Definici?n topol?gica y geom?trica // Definici?n Topol?gica // Inserci?n de 1(una) celda con 'n' puntos vtkCellArray *cellarray=vtkCellArray::New(); cellarray->InsertNextCell(data_puntos); // Definici?n Geom?trica y relaci?n con la topolog?a vtkPoints *puntos=vtkPoints::New(); for(int j=0;jInsertCellPoint(j); // ___ j = n?ID de cada punto puntos->InsertPoint( j, // _________________________ n? ID j/5.0, // _____________________ valor de "x" sin(j/5.0), // ________________ valor de "y" 0.0 // _________________________valor de "z" );} // Agregado de informaci?n topol?gica y geom?trica al DataSet vtkPolyData *polydata=vtkPolyData::New(); polydata->SetPoints(puntos); // Puntos polydata->SetLines(cellarray); // Celdas - 1(una) polydata->GetPointData()->SetScalars(puntos->GetData()); polydata->GetPointData()->Update(); // Creaci?n de un Actor vtkXYPlotActor *actor=vtkXYPlotActor::New(); actor->SetXValuesToValue(); actor->SetDataObjectXComponent(0,1); actor->SetDataObjectYComponent(0,2); actor->AddInput(polydata); // The following didn't help me enough... : ( cout<GetNumberOfItems()="<GetInputList()->GetNumberOfItems()<Delete(); puntos->Delete(); cellarray->Delete(); actor->Delete(); renderer->Delete(); ventana->Delete(); interac->Delete(); return 0;} Thanks in advance! Isidro. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mayorga at cimat.mx Tue Dec 11 23:07:43 2007 From: mayorga at cimat.mx (Pedro Pablo Mayorga Alvarez) Date: Tue, 11 Dec 2007 22:07:43 -0600 Subject: [vtkusers] build stereo from pair stereo images as source Message-ID: <000601c83c74$8ea17d00$abe47700$@mx> I have a pair of stereo images in jpeg format, one for left eye, the other for right eye. Is it possible to display them in stereo mode of VTK? If yes, what is the easiest way to do it? _____________________________________ Atte. M.C. Pedro Pablo Mayorga ?lvarez. pedro.mayorga at itesm.mx ITESM Campus Chiapas. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcplatt at dsl.pipex.com Wed Dec 12 08:24:06 2007 From: jcplatt at dsl.pipex.com (John Platt) Date: Wed, 12 Dec 2007 13:24:06 -0000 Subject: [vtkusers] Qt4 - adding a QVTKWidget to QMdiArea nulls the render window of the renderers Message-ID: <000001c83cc2$4a37ec00$0100a8c0@pacsys4> Hi, Creating a QVTKWidget derived object, something like class MdiChild : public QVTKWidget { MdiChild() { ren = vtkRenderer::New(); GetRenderWindow()->AddRenderer( ren ); .... } ... } and adding to a QMdiArea::addSubWindow() nulls the render window associated with the renderer (ren->GetRenderWindow()). This causes other vtk objects which get the render window from the renderer to crash (eg. vtkOrientationMarkerWidget). It appears that QMdiArea::addSubWindow() reparents the MdiChild. QEvent::ParentAboutToChange is trapped by QVTKWidget::event which eventually calls vtkWin32OpenGLRenderWindow::Clean() where ren->SetRenderWindow(NULL); occurs. The QEvent::ParentChange doesn't reset the render window for the renderer list. I don't pretend to understand what should happen. Perhaps GetRenderWindow() should not be called until after addSubWindow() or QEvent::ParentChange should add the render window back to each renderer. Any advice or suggestions would be very much appreciated, TIA John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From camargo at lncc.br Wed Dec 12 08:44:01 2007 From: camargo at lncc.br (Eduardo Camargo) Date: Wed, 12 Dec 2007 11:44:01 -0200 (BRST) Subject: [vtkusers] [Fwd: [Paraview] Writting files] Message-ID: <54777.146.134.8.169.1197467041.squirrel@webmail.lncc.br> Hi, The problem was in the class VtkEnSightWriter. I have just added "fclose(fd);" in the? end of method "WriteCaseFile". HeMoLab Development Team http://www.lncc.br/prjhemo/ ---------------------------- Original Message ---------------------------- Subject: [Paraview] Writting files From: "Eduardo Camargo" Date: Mon, December 10, 2007 2:59 pm To: paraview at paraview.org -------------------------------------------------------------------------- Hi, I have a problem with the vtkEnsgihtWriter, the method creates all files correctly (array and .case files) but doesn`t finish the .case file until the user closes Paraview. The method used was the follow: void GenerateCaseFiles(vtkUnstructuredGrid *grid) { vtkIntArray *bids = vtkIntArray::New(); bids->SetName("BlockId"); for(int i = 0; i < grid->GetNumberOfCells(); i++) bids->InsertNextValue(1); grid->GetCellData()->SetScalars(bids); char name[256]; sprintf(name, "%s%s", this->GetOutputPath(), "Out.case"); vtkEnSightWriter * writer; writer = vtkEnSightWriter::New(); writer->SetFileName(name); int blockids[2]; blockids[0] = 1; blockids[1] = 0; writer->SetNumberOfBlocks(1); writer->SetBlockIDs(blockids); for(int i=0; i < grid->GetNumberOfBlocks(); i++) { vtkUnstructuredGrid *output_grid = vtkUnstructuredGrid::New(); output_grid->DeepCopy(grid); this->GetGridOfInstantOfTime(i, output_grid); writer->SetInput(output_grid); writer->SetTimeStep(i); writer->Write(); output_grid->Delete(); } writer->UpdateInformation(); writer->UpdateWholeExtent(); writer->Update(); writer->WriteCaseFile(grid->GetNumberOfBlocks()); writer->Delete(); bids->Delete(); } Regards, Eduardo Camargo Analista de Sistemas HeMoLab - http://www.lncc.br/prjhemo Laborat?rio Nacional de Computa??o Cient?fica - LNCC _______________________________________________ ParaView mailing list ParaView at paraview.org http://www.paraview.org/mailman/listinfo/paraview -- Atenciosamente, Eduardo Camargo Analista de Sistemas HeMoLab - http://www.lncc.br/prjhemo Laborat?rio Nacional de Computa??o Cient?fica - LNCC -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From corinne at sed.ethz.ch Wed Dec 12 09:37:09 2007 From: corinne at sed.ethz.ch (Corinne Bachmann) Date: Wed, 12 Dec 2007 15:37:09 +0100 Subject: [vtkusers] Problems with vtkpython Message-ID: <1197470230.3301.6.camel@augpc-erdw-geo-hpx-dock-2074.ethz.ch> Dear all I installed vtk and enabled VTK_WRAP_PYTHON to be able to write vtk codes in python. Ccmake and make install resulted in no error messages, when I first tried to run vtkpython it resulted in: vtkpython: error while loading shared libraries: libvtksys.so.5.0: cannot open shared object file: No such file or directory but I managed to fix that with the help of the mailing list archive. When I use vtkpython now it starts up as a normal python enviroment, but none of the vtkmodules seem to work. I was trying an example from this website: http://www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html but already the first line results in an error: from libVTKCommonPython import * Traceback (most recent call last): File "", line 1, in ImportError: No module named libVTKCommonPython I thought then I don't have to import the modules as I am already using vtkpython and not python, but skipping the import steps just resulted in: ren = vtkRenderer() Traceback (most recent call last): File "", line 1, in NameError: name 'vtkRenderer' is not defined So it seems that I forgot some links to the vtk somewhere, but I don't know where. Any help would be very much appreciated. Cheerz, Corinne From abair at viz.tamu.edu Wed Dec 12 11:09:04 2007 From: abair at viz.tamu.edu (Alethea Bair) Date: Wed, 12 Dec 2007 10:09:04 -0600 (CST) Subject: [vtkusers] Problems with vtkpython In-Reply-To: <1197470230.3301.6.camel@augpc-erdw-geo-hpx-dock-2074.ethz.ch> References: <1197470230.3301.6.camel@augpc-erdw-geo-hpx-dock-2074.ethz.ch> Message-ID: <5376.69.5.195.65.1197475744.squirrel@www-viz.tamu.edu> One thing I have found helpful is the sys.path in python import sys sys.path And look at this string to see if the modules you want to load are in any of these directories. If they are not then you should edit the PYTHONPATH environment variable to include whatever path the files are actually in hope that helps Alethea > Dear all > > I installed vtk and enabled VTK_WRAP_PYTHON to be able to write vtk > codes in python. Ccmake and make install resulted in no error messages, > when I first tried to run vtkpython it resulted in: > vtkpython: error while loading shared libraries: libvtksys.so.5.0: > cannot open shared object file: No such file or directory > > but I managed to fix that with the help of the mailing list archive. > When I use vtkpython now it starts up as a normal python enviroment, but > none of the vtkmodules seem to work. I was trying an example from this > website: http://www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html but > already the first line results in an error: > from libVTKCommonPython import * > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named libVTKCommonPython > > I thought then I don't have to import the modules as I am already using > vtkpython and not python, but skipping the import steps just resulted > in: > ren = vtkRenderer() > Traceback (most recent call last): > File "", line 1, in > NameError: name 'vtkRenderer' is not defined > > So it seems that I forgot some links to the vtk somewhere, but I don't > know where. Any help would be very much appreciated. > > Cheerz, > Corinne > > _______________________________________________ > 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 > From chughes at informatics.bangor.ac.uk Wed Dec 12 11:13:32 2007 From: chughes at informatics.bangor.ac.uk (acech) Date: Wed, 12 Dec 2007 08:13:32 -0800 (PST) Subject: [vtkusers] Updating actors Message-ID: <14285329.post@talk.nabble.com> Hi all, Quick question! I am using variable points to draw a line. During the execution of my application these points get moved. How do I force the actor representing the line to be updated so that it reflects this. If I try updating the points and then adding the actor to the renderer again I end up with both the old line and the new line. What is the process for simply updating it? Many thanks, Chris -- View this message in context: http://www.nabble.com/Updating-actors-tp14285329p14285329.html Sent from the VTK - Users mailing list archive at Nabble.com. From corinne at sed.ethz.ch Wed Dec 12 11:18:16 2007 From: corinne at sed.ethz.ch (Corinne Bachmann) Date: Wed, 12 Dec 2007 17:18:16 +0100 Subject: [vtkusers] Problems with vtkpython In-Reply-To: <5376.69.5.195.65.1197475744.squirrel@www-viz.tamu.edu> References: <1197470230.3301.6.camel@augpc-erdw-geo-hpx-dock-2074.ethz.ch> <5376.69.5.195.65.1197475744.squirrel@www-viz.tamu.edu> Message-ID: <1197476296.3301.13.camel@augpc-erdw-geo-hpx-dock-2074.ethz.ch> hi thank you for your tip sys.path gives me: ['', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gtk-2.0', '/usr/local/lib/python2.5/site-packages'] and libVTKCommonPython.so is in /usr/local/lib/python2.5/site-packages/vtk, so it should be included, but importing it results in an error. oh, and I forgot to mention before, I am using vtk 5.0.3, python 2.5.1 on Suse 10.3. -Corinne On Wed, 2007-12-12 at 10:09 -0600, Alethea Bair wrote: > One thing I have found helpful is the sys.path in python > > import sys > sys.path > > And look at this string to see if the modules you want to load are in any > of these directories. If they are not then you should edit the PYTHONPATH > environment variable to include whatever path the files are actually in > > hope that helps > Alethea > > > > Dear all > > > > I installed vtk and enabled VTK_WRAP_PYTHON to be able to write vtk > > codes in python. Ccmake and make install resulted in no error messages, > > when I first tried to run vtkpython it resulted in: > > vtkpython: error while loading shared libraries: libvtksys.so.5.0: > > cannot open shared object file: No such file or directory > > > > but I managed to fix that with the help of the mailing list archive. > > When I use vtkpython now it starts up as a normal python enviroment, but > > none of the vtkmodules seem to work. I was trying an example from this > > website: http://www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html but > > already the first line results in an error: > > from libVTKCommonPython import * > > Traceback (most recent call last): > > File "", line 1, in > > ImportError: No module named libVTKCommonPython > > > > I thought then I don't have to import the modules as I am already using > > vtkpython and not python, but skipping the import steps just resulted > > in: > > ren = vtkRenderer() > > Traceback (most recent call last): > > File "", line 1, in > > NameError: name 'vtkRenderer' is not defined > > > > So it seems that I forgot some links to the vtk somewhere, but I don't > > know where. Any help would be very much appreciated. > > > > Cheerz, > > Corinne > > > > _______________________________________________ > > 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 > > > > From master at iaas.msu.ru Wed Dec 12 11:29:20 2007 From: master at iaas.msu.ru (Michail Vidiassov) Date: Wed, 12 Dec 2007 19:29:20 +0300 (MSK) Subject: [vtkusers] "3D Graphing calculator" Message-ID: Dear All, can you point me to a simple program/library that lives on top of VTK and provides basic mathematical plotting, like making 3d graph of z(x,y) with contour lines on it and XYZ coloring? I.e. I am looking for something a level higher than the capabilities of vtk itself, a bit like plotting commands in Maple or Mathematica. Octaviz (Octave+VTK) is something like that, but it needs Octave and so is not really small. Sincerely, Michail From j.m.h.thomas at dl.ac.uk Wed Dec 12 11:41:14 2007 From: j.m.h.thomas at dl.ac.uk (Jens Thomas) Date: Wed, 12 Dec 2007 16:41:14 +0000 Subject: [vtkusers] Problems with vtkpython In-Reply-To: <1197476296.3301.13.camel@augpc-erdw-geo-hpx-dock-2074.ethz.ch> References: <1197470230.3301.6.camel@augpc-erdw-geo-hpx-dock-2074.ethz.ch><5376.69.5.195.65.1197475744.squirrel@www-viz.tamu.edu> <1197476296.3301.13.camel@augpc-erdw-geo-hpx-dock-2074.ethz.ch> Message-ID: <47600F2A.70400@dl.ac.uk> Hi Corinne, Corinne Bachmann wrote: > hi > > thank you for your tip > > sys.path gives me: > ['', '/usr/lib/python25.zip', '/usr/lib/python2.5', > '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', > '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages', > '/usr/lib/python2.5/site-packages/Numeric', > '/usr/lib/python2.5/site-packages/PIL', > '/usr/lib/python2.5/site-packages/gtk-2.0', > '/usr/local/lib/python2.5/site-packages'] > > and libVTKCommonPython.so is > in /usr/local/lib/python2.5/site-packages/vtk, so it should be included, > but importing it results in an error. > I think you'll also need to add the path to the .so files to LD_LIBRARY_PATH, so (if you're using bash) try executing: export LD_LIBRARY_PATH=/usr/local/lib/python2.5/site-packages/vtk:$LD_LIBRARY_PATH before you start python and see if you can import vtk then. Best wishes, Jens > > oh, and I forgot to mention before, I am using vtk 5.0.3, python 2.5.1 > on Suse 10.3. > > -Corinne > > > On Wed, 2007-12-12 at 10:09 -0600, Alethea Bair wrote: > >> One thing I have found helpful is the sys.path in python >> >> import sys >> sys.path >> >> And look at this string to see if the modules you want to load are in any >> of these directories. If they are not then you should edit the PYTHONPATH >> environment variable to include whatever path the files are actually in >> >> hope that helps >> Alethea >> >> >> >>> Dear all >>> >>> I installed vtk and enabled VTK_WRAP_PYTHON to be able to write vtk >>> codes in python. Ccmake and make install resulted in no error messages, >>> when I first tried to run vtkpython it resulted in: >>> vtkpython: error while loading shared libraries: libvtksys.so.5.0: >>> cannot open shared object file: No such file or directory >>> >>> but I managed to fix that with the help of the mailing list archive. >>> When I use vtkpython now it starts up as a normal python enviroment, but >>> none of the vtkmodules seem to work. I was trying an example from this >>> website: http://www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html but >>> already the first line results in an error: >>> from libVTKCommonPython import * >>> Traceback (most recent call last): >>> File "", line 1, in >>> ImportError: No module named libVTKCommonPython >>> >>> I thought then I don't have to import the modules as I am already using >>> vtkpython and not python, but skipping the import steps just resulted >>> in: >>> ren = vtkRenderer() >>> Traceback (most recent call last): >>> File "", line 1, in >>> NameError: name 'vtkRenderer' is not defined >>> >>> So it seems that I forgot some links to the vtk somewhere, but I don't >>> know where. Any help would be very much appreciated. >>> >>> Cheerz, >>> Corinne >>> >>> _______________________________________________ >>> 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 >>> >>> >> > > _______________________________________________ > 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 > > From master at iaas.msu.ru Wed Dec 12 12:33:30 2007 From: master at iaas.msu.ru (Michail Vidiassov) Date: Wed, 12 Dec 2007 20:33:30 +0300 (MSK) Subject: [vtkusers] Bug (?): /usr/lib/vtk-5.0/vtkCommonKit.cmake contains wrong elements Message-ID: Dear All, I have encountered (Mac OS X 10.5, vtk 5.0.3) the problem, that is similar to the one described in the following bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388736 The file /usr/lib/vtk-5.0/vtkCommonKit.cmake contains the setting of VTK_COMMON_CLASSES; the last elements of this list look like "/debian/stage/vtk-5.0.1/Build/Common/vtkTypeInt8Array" instead of "vtkTypeInt8Array" What is the proper solution? Debian packagers use the attached patch (http://ftp.de.debian.org/debian/pool/main/v/vtk/vtk_5.0.3-1.diff.gz), but since their fix did not find its way into VTK in a year, I suspect that there is something wrong about it (but I am only guessing, since I know nothing about the authour/packager relations in VTK domain). Sincerely, Michail -------------- next part -------------- --- vtk-5.0.3.orig/CMake/vtkExportKit.cmake +++ vtk-5.0.3/CMake/vtkExportKit.cmake @@ -4,7 +4,7 @@ SET(KIT_ABSTRACT_LIST) SET(KIT_EXCLUDE_LIST) FOREACH(src ${sources}) - STRING(REGEX REPLACE "\\.cxx$" "" CLASS "${src}") + GET_FILENAME_COMPONENT(CLASS "${src}" NAME_WE) SET(KIT_CLASS_LIST "${KIT_CLASS_LIST}\n \"${CLASS}\"") GET_SOURCE_FILE_PROPERTY(IS_ABSTRACT ${src} ABSTRACT) IF(IS_ABSTRACT MATCHES "^1$") From William.T.Bridgman at nasa.gov Wed Dec 12 13:10:47 2007 From: William.T.Bridgman at nasa.gov (W.T. Bridgman) Date: Wed, 12 Dec 2007 13:10:47 -0500 Subject: [vtkusers] Using vtkpython with X11 on headless Mac OS X systems Message-ID: <3D0767A4-036D-45C2-9260-EF6A92890916@nasa.gov> I'm trying to build vtkpython to run on some Macs in a cluster. Mac OS X 10.4.11, Python 2.4.4, VTK fairly recently from CVS. Using the guidance I've found on the list, I seem to have a partially successful X11 build for vtk/vtkpython. I can run the c sample programs like Cone and have it display through the X11 window to another Mac or linux machine, but the vtkpython programs fail with an X11 error like allocating colors, etc. I'm thinking this may be because the default Tk on the Mac doesn't have X11 installed. Am I correct in assuming that the vtkpython graphical components are piped through Tk? It appears that the TclTkAquaBI installation installs a Tk X11 framework for the Mac and I am thinking about installing that and rebuilding VTK. Does anyone on the list have experience with this or can provide some hint as to whether I'm on the right track? Thanks, Tom From tim_d_soper at yahoo.com Wed Dec 12 14:04:08 2007 From: tim_d_soper at yahoo.com (Tim Soper) Date: Wed, 12 Dec 2007 11:04:08 -0800 (PST) Subject: [vtkusers] setting camera orientation Message-ID: <815642.52711.qm@web33007.mail.mud.yahoo.com> So I searched online to find any reference as to why there is no easy SetOrientation method as part of the vtkCamera. I 'm not sure I understand. This seems really basic. As of now, I have to port the code snippet below into every application I use. Can anyone explain why this can't just be put into the vtkCamera class directly? Once the three angles are known, the view matrix can be computed. It seems a bit laborious to have to compute the focus and view up explicitly to change the orientation, but I don't see another way of doing this with the current methods in the vtkCamera class. void SetCameraPositionOrientation( vtkCamera* cam, double position[3], double orientation[3] ) { double focus[3]; double viewup[3]; if( cam == NULL ) return; focus[0] = position[0] - -cos(orientation[0])*sin(orientation[1]); focus[1] = position[1] - sin(orientation[0]); focus[2] = position[2] - cos(orientation[0])*cos(orientation[1]); viewup[0] = cos(orientation[1])*sin(orientation[2])+ sin(orientation[1])*sin(orientation[2])*cos(orientation[2]); viewup[1] = cos(orientation[0])*cos(orientation[2]); viewup[2] = sin(orientation[1])*sin(orientation[2])- cos(orientation[1])*sin(orientation[0])*cos(orientation[2]); //set the camera position and orientation cam->SetPosition( position ); cam->SetViewUp( viewup ); cam->SetFocalPoint( focus ); } ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping From nkwmailinglists at gmail.com Wed Dec 12 16:22:10 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Wed, 12 Dec 2007 15:22:10 -0600 Subject: [vtkusers] How do I extract multiple vtkPolyData from a single vtkPolyData read from an XML file. Message-ID: <44f773f50712121322w4aec90b8l52f4485b84e8f036@mail.gmail.com> Code example below but here is what I'm trying to do: I load a 3D volume and use vtkContourWidget to trace contours on different slices. Then, I need to write out a file that contains all those contours. To write the file out is easy: my code is below. Basically I use a vtkAppendPolyData object to stick all the contours (which I save as vtkPolyData) into a single vtkPolyData, and then write that out. But there really isn't the opposite of a vtkAppendPolyData. I assume I'll have to do some sort of traversal to pull my contours back out of the reader's output. Does anyone have an example of that? void vtkKWImageViewerWidget:: SaveROI(const char *filename) { vtkAppendPolyData *pd = vtkAppendPolyData::New(); for(TraceMap::iterator tmIt = this->m_SliceTraces.begin(); tmIt != this->m_SliceTraces.end(); ++tmIt) { for(PolyDataList::iterator polyIt = tmIt->second.begin(); polyIt != tmIt->second.end(); ++polyIt) { pd->AddInput(*polyIt); } } pd->Update(); vtkXMLPolyDataWriter *writer = vtkXMLPolyDataWriter::New(); writer->SetInput(pd->GetOutput()); writer->SetDataModeToAscii(); writer->SetFileName(filename); writer->Write(); writer->Delete(); pd->Delete(); } From nkwmailinglists at gmail.com Wed Dec 12 17:49:42 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Wed, 12 Dec 2007 16:49:42 -0600 Subject: [vtkusers] How do I extract multiple vtkPolyData from a single vtkPolyData read from an XML file. In-Reply-To: References: <44f773f50712121322w4aec90b8l52f4485b84e8f036@mail.gmail.com> Message-ID: <44f773f50712121449r1f88ad7ak97f6ef9a2b125bad@mail.gmail.com> I hope you don't mind me reposting your response to the list; you sent it to me alone. I looked at this as a solution and it rather baffled me, so I have a solution that involves fiddling around with the vtkCells directly. I know that the vtkPolyData in the disk file will comprise a collection of lines, so i call vtk::PolyData->GetPoints() to get the point array, then vtk::PolyData->GetLInes() to get the lines. Then I call vtkCellArray::GetCell() to pick out the indices for each line's points in the point array.... Convoluted I know, but I couldn't really see how to use vtkPolyDataConnectivityFilter could do ti for me, so I went caveman on the problem. It would ultimately be more useful to have some simple things happening, like there being some sort of converse to vtkAppendPolyData, or some way, given that you know the structure of the data you're reading in you could just ask the reader for it. But so long asa I get the job done it doesn't matter so much to me.... On Dec 12, 2007 3:45 PM, Alexandre GOUAILLARD wrote: > Hi kent, > > You can use vtkPolyDataConnectivityFilter that will help you separate > contours that are not connected. > > Run once with SetExtractionModeToAllRegion() to get the number of contours > with GetNumberOfExtractedRegions(), then extract them by adding the region > Id through AddSpecifiedRegion(int id). I don't remember how to get the > output then, but this should get you started. > > For information, you have the equivalent in ITK: > VtkPolyData => itkMesh / itkQuadEdgeMEsh > VtkPolyDataConnectivityFilter => itkConnectedRegionMeshFilter / > itkQuadEdgeMeshExtractCOmponentFilter > > Alex. > > > > On 12/12/07 1:22 PM, "kent williams" wrote: > > > Code example below but here is what I'm trying to do: I load a 3D > > volume and use vtkContourWidget to trace contours on different slices. > > Then, I need to write out a file that contains all those contours. > > To write the file out is easy: my code is below. Basically I use a > > vtkAppendPolyData object to stick all the contours (which I save as > > vtkPolyData) into a single vtkPolyData, and then write that out. > > > > But there really isn't the opposite of a vtkAppendPolyData. I assume > > I'll have to do some sort of traversal to pull my contours back out of > > the reader's output. Does anyone have an example of that? > > > > void > > vtkKWImageViewerWidget:: > > SaveROI(const char *filename) > > { > > vtkAppendPolyData *pd = vtkAppendPolyData::New(); > > for(TraceMap::iterator tmIt = this->m_SliceTraces.begin(); > > tmIt != this->m_SliceTraces.end(); ++tmIt) > > { > > for(PolyDataList::iterator polyIt = tmIt->second.begin(); > > polyIt != tmIt->second.end(); ++polyIt) > > { > > pd->AddInput(*polyIt); > > } > > } > > pd->Update(); > > vtkXMLPolyDataWriter *writer = vtkXMLPolyDataWriter::New(); > > writer->SetInput(pd->GetOutput()); > > writer->SetDataModeToAscii(); > > writer->SetFileName(filename); > > writer->Write(); > > writer->Delete(); > > pd->Delete(); > > } > > _______________________________________________ > > 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 > > > From Shekhar.Chandra at sci.monash.edu.au Wed Dec 12 18:36:06 2007 From: Shekhar.Chandra at sci.monash.edu.au (shekharc) Date: Thu, 13 Dec 2007 10:36:06 +1100 Subject: [vtkusers] Qt4 - adding a QVTKWidget to QMdiArea nulls the render window of the renderers In-Reply-To: <000001c83cc2$4a37ec00$0100a8c0@pacsys4> References: <000001c83cc2$4a37ec00$0100a8c0@pacsys4> Message-ID: <47607066.4050606@sci.monash.edu.au> Hi John, I suggest u use QWorkspace instead, it should allow u todo exactly the same thing as QMdiArea. I have used this very successfully. This is because QMdiArea is mainly designed to use subclasses of QMdiSubWindow (as evident from setActive and currentWindow members) and QVTKWidget is probably only derived from QWidget. See the MDI Example in the docs for more info. Hope that helps. Cheers Shakes John Platt wrote: > Hi, > > > > Creating a QVTKWidget derived object, something like > > > > class MdiChild : public QVTKWidget > > { > > MdiChild() { ren = vtkRenderer::New(); > > GetRenderWindow()->AddRenderer( ren ); ???? } > > ??? > > } > > > > and adding to a QMdiArea::addSubWindow() nulls the render window > associated with the renderer (ren->GetRenderWindow()). This causes other > vtk objects which get the render window from the renderer to crash (eg. > vtkOrientationMarkerWidget). > > > > It appears that QMdiArea::addSubWindow() reparents the MdiChild. > QEvent::ParentAboutToChange is trapped by QVTKWidget::event which > eventually calls vtkWin32OpenGLRenderWindow::Clean() where > > ren->SetRenderWindow(NULL); occurs. > > > > The QEvent::ParentChange doesn?t reset the render window for the > renderer list. > > > > I don?t pretend to understand what should happen. Perhaps > GetRenderWindow() should not be called until after addSubWindow() or > QEvent::ParentChange should add the render window back to each renderer. > > > > Any advice or suggestions would be very much appreciated, > > > > TIA > > > > John. > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 From hanfei at caltech.edu Wed Dec 12 18:47:55 2007 From: hanfei at caltech.edu (Alexandre GOUAILLARD) Date: Wed, 12 Dec 2007 15:47:55 -0800 Subject: [vtkusers] How do I extract multiple vtkPolyData from a single vtkPolyData read from an XML file. In-Reply-To: <44f773f50712121449r1f88ad7ak97f6ef9a2b125bad@mail.gmail.com> Message-ID: Hop, I thought I cc the list, my bad. Send me one of your file with all the contour merged in the same polydata and I ll send you back the corresponding code using vtkPolyDataConnectivity filter tonight. Cheers. Alex. On 12/12/07 2:49 PM, "kent williams" wrote: > I hope you don't mind me reposting your response to the list; you sent > it to me alone. > > I looked at this as a solution and it rather baffled me, so I have a > solution that involves fiddling around with the vtkCells directly. I > know that the vtkPolyData in the disk file will comprise a collection > of lines, so i call vtk::PolyData->GetPoints() to get the point array, > then vtk::PolyData->GetLInes() to get the lines. Then I call > vtkCellArray::GetCell() to pick out the indices for each line's points > in the point array.... > > Convoluted I know, but I couldn't really see how to use > vtkPolyDataConnectivityFilter could do ti for me, so I went caveman on > the problem. > > It would ultimately be more useful to have some simple things > happening, like there being some sort of converse to > vtkAppendPolyData, or some way, given that you know the structure of > the data you're reading in you could just ask the reader for it. But > so long asa I get the job done it doesn't matter so much to me.... > > On Dec 12, 2007 3:45 PM, Alexandre GOUAILLARD wrote: >> Hi kent, >> >> You can use vtkPolyDataConnectivityFilter that will help you separate >> contours that are not connected. >> >> Run once with SetExtractionModeToAllRegion() to get the number of contours >> with GetNumberOfExtractedRegions(), then extract them by adding the region >> Id through AddSpecifiedRegion(int id). I don't remember how to get the >> output then, but this should get you started. >> >> For information, you have the equivalent in ITK: >> VtkPolyData => itkMesh / itkQuadEdgeMEsh >> VtkPolyDataConnectivityFilter => itkConnectedRegionMeshFilter / >> itkQuadEdgeMeshExtractCOmponentFilter >> >> Alex. >> >> >> >> On 12/12/07 1:22 PM, "kent williams" wrote: >> >>> Code example below but here is what I'm trying to do: I load a 3D >>> volume and use vtkContourWidget to trace contours on different slices. >>> Then, I need to write out a file that contains all those contours. >>> To write the file out is easy: my code is below. Basically I use a >>> vtkAppendPolyData object to stick all the contours (which I save as >>> vtkPolyData) into a single vtkPolyData, and then write that out. >>> >>> But there really isn't the opposite of a vtkAppendPolyData. I assume >>> I'll have to do some sort of traversal to pull my contours back out of >>> the reader's output. Does anyone have an example of that? >>> >>> void >>> vtkKWImageViewerWidget:: >>> SaveROI(const char *filename) >>> { >>> vtkAppendPolyData *pd = vtkAppendPolyData::New(); >>> for(TraceMap::iterator tmIt = this->m_SliceTraces.begin(); >>> tmIt != this->m_SliceTraces.end(); ++tmIt) >>> { >>> for(PolyDataList::iterator polyIt = tmIt->second.begin(); >>> polyIt != tmIt->second.end(); ++polyIt) >>> { >>> pd->AddInput(*polyIt); >>> } >>> } >>> pd->Update(); >>> vtkXMLPolyDataWriter *writer = vtkXMLPolyDataWriter::New(); >>> writer->SetInput(pd->GetOutput()); >>> writer->SetDataModeToAscii(); >>> writer->SetFileName(filename); >>> writer->Write(); >>> writer->Delete(); >>> pd->Delete(); >>> } >>> _______________________________________________ >>> 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 >> >> >> From luca.antiga at gmail.com Thu Dec 13 03:07:10 2007 From: luca.antiga at gmail.com (Luca Antiga) Date: Thu, 13 Dec 2007 09:07:10 +0100 Subject: [vtkusers] How do I extract multiple vtkPolyData from a single vtkPolyData read from an XML file. In-Reply-To: References: Message-ID: <09C743E6-FE6A-4D9D-ABFC-C4870787B9FE@gmail.com> Hey guys, what about setting a cell data scalar value to each appended component before appending and thresholding afterwards. A bit of a waste of memory, but at least you don't have to make the assumption that your components will be simply connected. Now that I think about that, this could be a nice simple enhancement for vtkAppendPolyData: to set the scalar value internally for later de-assembling. Best Luca On Dec 13, 2007, at 12:47 AM, Alexandre GOUAILLARD wrote: > Hop, > > I thought I cc the list, my bad. > > Send me one of your file with all the contour merged in the same > polydata > and I ll send you back the corresponding code using > vtkPolyDataConnectivity > filter tonight. > > Cheers. > > Alex. > > > > On 12/12/07 2:49 PM, "kent williams" > wrote: > >> I hope you don't mind me reposting your response to the list; you >> sent >> it to me alone. >> >> I looked at this as a solution and it rather baffled me, so I have a >> solution that involves fiddling around with the vtkCells directly. I >> know that the vtkPolyData in the disk file will comprise a collection >> of lines, so i call vtk::PolyData->GetPoints() to get the point >> array, >> then vtk::PolyData->GetLInes() to get the lines. Then I call >> vtkCellArray::GetCell() to pick out the indices for each line's >> points >> in the point array.... >> >> Convoluted I know, but I couldn't really see how to use >> vtkPolyDataConnectivityFilter could do ti for me, so I went >> caveman on >> the problem. >> >> It would ultimately be more useful to have some simple things >> happening, like there being some sort of converse to >> vtkAppendPolyData, or some way, given that you know the structure of >> the data you're reading in you could just ask the reader for it. But >> so long asa I get the job done it doesn't matter so much to me.... >> >> On Dec 12, 2007 3:45 PM, Alexandre GOUAILLARD >> wrote: >>> Hi kent, >>> >>> You can use vtkPolyDataConnectivityFilter that will help you >>> separate >>> contours that are not connected. >>> >>> Run once with SetExtractionModeToAllRegion() to get the number of >>> contours >>> with GetNumberOfExtractedRegions(), then extract them by adding >>> the region >>> Id through AddSpecifiedRegion(int id). I don't remember how to >>> get the >>> output then, but this should get you started. >>> >>> For information, you have the equivalent in ITK: >>> VtkPolyData => itkMesh / itkQuadEdgeMEsh >>> VtkPolyDataConnectivityFilter => itkConnectedRegionMeshFilter / >>> itkQuadEdgeMeshExtractCOmponentFilter >>> >>> Alex. >>> >>> >>> >>> On 12/12/07 1:22 PM, "kent williams" >>> wrote: >>> >>>> Code example below but here is what I'm trying to do: I load a 3D >>>> volume and use vtkContourWidget to trace contours on different >>>> slices. >>>> Then, I need to write out a file that contains all those contours. >>>> To write the file out is easy: my code is below. Basically I use a >>>> vtkAppendPolyData object to stick all the contours (which I save as >>>> vtkPolyData) into a single vtkPolyData, and then write that out. >>>> >>>> But there really isn't the opposite of a vtkAppendPolyData. I >>>> assume >>>> I'll have to do some sort of traversal to pull my contours back >>>> out of >>>> the reader's output. Does anyone have an example of that? >>>> >>>> void >>>> vtkKWImageViewerWidget:: >>>> SaveROI(const char *filename) >>>> { >>>> vtkAppendPolyData *pd = vtkAppendPolyData::New(); >>>> for(TraceMap::iterator tmIt = this->m_SliceTraces.begin(); >>>> tmIt != this->m_SliceTraces.end(); ++tmIt) >>>> { >>>> for(PolyDataList::iterator polyIt = tmIt->second.begin(); >>>> polyIt != tmIt->second.end(); ++polyIt) >>>> { >>>> pd->AddInput(*polyIt); >>>> } >>>> } >>>> pd->Update(); >>>> vtkXMLPolyDataWriter *writer = vtkXMLPolyDataWriter::New(); >>>> writer->SetInput(pd->GetOutput()); >>>> writer->SetDataModeToAscii(); >>>> writer->SetFileName(filename); >>>> writer->Write(); >>>> writer->Delete(); >>>> pd->Delete(); >>>> } >>>> _______________________________________________ >>>> 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 >>> >>> >>> > > > _______________________________________________ > 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 From j.mccoy at gmx.de Thu Dec 13 04:31:21 2007 From: j.mccoy at gmx.de (McCoy) Date: Thu, 13 Dec 2007 10:31:21 +0100 Subject: [vtkusers] Error compiling VTK-5.1 from cvs on Redhat Enterprise 3 Message-ID: <5210654144.20071213103121@gmx.de> Hi All, I have here an i686 computer with fedora linux and a 64-Bit dual processor workstation with Redhat Enterprise 3. i downloaded the VTK-5.1 source from cvs yesterday (12/12/07) and tried to build it with cmake (2.4.3) on both computers. on the fedora system everything worked fine, on the redhat system i get an error while building vtkDataObjectGenerator.o. it reads: vtkObjectGenerator.cxx: In member function >>void vtkObjectGenerator::MakePolyData(vtkDaaSet*)<< : the rest of the error message is in german, but it seems as if the compiler can't find an correct overloaded function for vtkPolyData::InsertNextCell(VTKCellType, int, int[3]). especially i'm wondering why the same source works fine on the fedora system and fails when using redhat. has anyone an idea where my problem could be? any help would be gladly appreciated... McCoy From j.m.h.thomas at dl.ac.uk Thu Dec 13 05:08:43 2007 From: j.m.h.thomas at dl.ac.uk (Thomas, JMH (Jens)) Date: Thu, 13 Dec 2007 10:08:43 -0000 Subject: [vtkusers] Problem with building VTK 5.0.3 with Python/Tk on Mac OSX 10.4.1 References: <4760FD7A.7000408@dl.ac.uk> Message-ID: Hi, I'm largely answering my own question here in case what I've found is of use to anyone else, but also in case what I've discovered qualifies as a bug. It seems that the default build for VTK on Mac OSX has been changed from Carbon to Cocoa. However (from what I can make out from the root CMakeLists.txt file and the file vtkTkRenderWidget.cxx), it looks like the Tk functionality is only available with Carbon or X. There is a block of code in the root CMakeLists.txt that only turns on VTK_USE_TK if Cocoa isn't being used and VTK_DISABLE_TK_INIT isn't set. As I had turned on the Python and Tcl wrappers but was using the default Cocoa option, the Tk stuff wasn't being built, triggering the error I was seeing. I've reverted to the Carbon build and have now managed to get my universal build working. The build wasn't completely trouble-free though, as there were still problems with the linking of the files: libvtkCommonTCL.5.1.0.dylib libvtkRenderingTCL.5.1.0.dylib bin/vtk as the tcl/tk libraries weren't included on the link line. Best wishes, Jens Hi Sean, Thanks for getting back to me. >Also, do you really mean 10.4.1? Or do you mean 10.4.11 or 10.5.1? In >any case, which version of Xcode do you have? Sorry - that was a typo, it's OSX 10.4.11 with Xcode 2.5 >>I've attached my CmakeCache.txt and have included some additional >>information below in case it is of any use. >1200 lines of text is a lot... :) What settings did you change from >their default? BUILD_SHARED_LIBS: ON CMAKE_OSX_ARCHITECTURES: ppc;i386 VTK_WRAP_PYTHON: ON VTK_WRAP_TCL: ON BUILD_TESTING: OFF CMAKE_VERBOSE_MAKEFILE: ON >If you are on 10.5, I suggest CVS CMake also. I've redone the build with CVS versions of both VTK and CMake. The build fails twice as -ltcl is missing from the link stage for libvtkCommonTCL.5.1.0.dylib and the file vtk right at the end of the build. I was able to fix the former by editing the file Common/CMakeFiles/vtkCommonTCL.dir/link.txt to add -ltcl and the latter by manually executing the link for vtk and appending -ltcl. This allows the build to run to completion. However, if I install the python files (using setup.py) and then try and run the file: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/tk/vtkLoadPythonTkWidgets.py It fails with the error: File "./vtkTkRenderWidget.py", line 466, in vtkRenderWidgetConeExample() File "./vtkTkRenderWidget.py", line 443, in vtkRenderWidgetConeExample pane = vtkTkRenderWidget(root,width=300,height=300) File "./vtkTkRenderWidget.py", line 81, in __init__ vtkLoadPythonTkWidgets(master.tk) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/vtk/tk/vtkLoadPythonTkWidgets.py", line 67, in vtkLoadPythonTkWidgets interp.call('load', filename) _tkinter.TclError: image not found NSCreateObjectFileImageFromFile() error: not a Mach-O MH_BUNDLE file It appears it's trying to load the file libvtkRenderingPythonTkWidgets.dylib, but this file hasn't been built (which I think is because the Cmake variable VTK_USE_TK hasn't been set, even though the Tcl and Tk libraries were found during the configure). Is there an easy way to fix this? >Lastly, there are some Mac dashboards that enable TCL, you may want to >look at their settings. I'm not very familiar with dashboard, so it's quite possible I missed something, but've looked at http://www.vtk.org/Testing/Dashboard/20071210-0300-Nightly/Dashboard.html and couldn't find any that had the python and tcl wrapping turned on. Best wishes, Jens -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada -- =================================================================== Jens Thomas, email: j.m.h.thomas at dl.ac.uk STFC Daresbury Lab, tel: +44-1925-603849 Warrington, fax: +44-1925-603634 WA4 4AD, UK. http: http://www.cse.scitech.ac.uk =================================================================== From haloul02 at yahoo.co.uk Thu Dec 13 05:43:55 2007 From: haloul02 at yahoo.co.uk (Hala ALBakour) Date: Thu, 13 Dec 2007 10:43:55 +0000 (GMT) Subject: [vtkusers] 3DImporter - Does it help to extract polygon or volumetric data? Message-ID: <675647.8210.qm@web25402.mail.ukl.yahoo.com> Dear all, I am very new to 3D modelling and vtk, I am using the 3DSImporter class to import and render a 3DS file, which is working really fine, what I really need is not only rendering, I need to read the file polygon data and convert to it to vtkImageData, is there is any way we can do this with the help of 3DSImporter, the 3DSImporter class contains an interesting method GeneratePolyData but it is protected and cannot be used, I know that vtk supports surface rendering (polygon data), I think what vtk has imported and rendered here is the polygon data of 3DS file? right? my piece of code which imports a 3DS file is the following: vtkRenderer *ren = vtkRenderer::New(); ren->SetBackground(0.1, 0.2, 0.4); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); renWin->SetSize(1024,768); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtk3DSImporter *importer = vtk3DSImporter::New(); importer->SetRenderWindow(renWin); importer->SetFileName("sample.3ds"); importer->ComputeNormalsOn(); importer->Read(); Is it possible to covert what has been generated in the renderWindow into vtkImageData, I am pretty sure there should be a way to manipulate 3DS surface data after importing it, but probably I am not looking in the right direction, Any suggestions and directions from you are really appreciated, Best regards, Hala __________________________________________________________ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com From david.cole at kitware.com Thu Dec 13 06:44:35 2007 From: david.cole at kitware.com (David Cole) Date: Thu, 13 Dec 2007 06:44:35 -0500 Subject: [vtkusers] Error compiling VTK-5.1 from cvs on Redhat Enterprise 3 In-Reply-To: <5210654144.20071213103121@gmx.de> References: <5210654144.20071213103121@gmx.de> Message-ID: Do a cvs update and try again -- that compile error was a temporary situation yesterday that has now been fixed. HTH, David On 12/13/07, McCoy wrote: > > Hi All, > > I have here an i686 computer with fedora linux and a 64-Bit dual processor > workstation with Redhat Enterprise 3. i downloaded the VTK-5.1 source > from cvs yesterday (12/12/07) and tried to build it with cmake > (2.4.3) on both computers. on the fedora system everything worked > fine, on the redhat system i get an error while building > vtkDataObjectGenerator.o. it reads: > vtkObjectGenerator.cxx: In member function >>void > vtkObjectGenerator::MakePolyData(vtkDaaSet*)<< : > the rest of the error message is in german, but it seems as if the > compiler can't find an correct overloaded function for > vtkPolyData::InsertNextCell(VTKCellType, int, int[3]). > > especially i'm wondering why the same source works fine on the fedora > system and fails when using redhat. has anyone an idea where my > problem could be? any help would be gladly appreciated... > > McCoy > > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zibalmail at gmail.com Thu Dec 13 07:23:08 2007 From: zibalmail at gmail.com (Giff) Date: Thu, 13 Dec 2007 13:23:08 +0100 Subject: [vtkusers] Points with same coordinates in vtkPolyData Message-ID: <218870e60712130423v33e68228r657d836767bbf5a5@mail.gmail.com> Hi all, I have a vtkPolyData object that I read from a vrml file using vtkVRMLImporter. The resulting vtkPolyData contains points and polys, but no vertexes, lines, or strips. When I tried to implement an algorithm that should visit all the points in the object, I found out that several points in the model have different id but same 3D coordinates. Even after using vtkCleanPolyData, though the number of points sensibly decreased, many of the points still have the same coordinates. Am I missing something trivial here? Why do different points have the same coordinates? And why there are no vertexes (only points) in my vtkPolyData object? Your help is greatly appreciated. Cheers, G -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent_elkouby at yahoo.fr Thu Dec 13 07:26:17 2007 From: vincent_elkouby at yahoo.fr (vincent elkouby) Date: Thu, 13 Dec 2007 12:26:17 +0000 (GMT) Subject: [vtkusers] light problems with vtkLODProp3D Message-ID: <661228.97815.qm@web27509.mail.ukl.yahoo.com> Hello, I add two mappers in a vtkLODProp3D (one vtkVolumeTextureMapper3D and one vtkFixedPointVolumeRayCastMapper) and I add 10 positional lights. It works very well with vtkFixedPointVolumeRayCastMapper but when the vtkLODProp3D selects the vtkVolumeTextureMapper3D , it uses only one light (the first added). So it's very dark with vtkVolumeTextureMapper3D and normal with vtkFixedPointVolumeRayCastMapper. I have been looking for an answer to this problem without succes. So may be do you know this problem and the answer... Thank you. Part of my code: vtkVolumeProperty * volumeProperty=vtkVolumeProperty::New(); vtkFixedPointVolumeRayCastMapper * volMapper=vtkFixedPointVolumeRayCastMapper::New(); setVolumeProperty(volumeProperty,dataFunction); volMapper->SetSampleDistance(dataFunction.getScalarDistance()); volMapper->SetImageSampleDistance(1.0); vtkVolumeTextureMapper3D *volMap3D=vtkVolumeTextureMapper3D::New(); volMap3D->SetSampleDistance(dataFunction.getScalarDistance()); volMap3D->SetPreferredMethodToNVidia(); vtkLODProp3D * volumeLOD=vtkLODProp3D::New(); int id3D, idRC; id3D=volumeLOD->AddLOD(volMap3D,0.0); idRC=volumeLOD->AddLOD(volMapper,0.0); volumeLOD->SetLODProperty(idRC,volumeProperty); volumeLOD->SetLODProperty(id3D,volumeProperty); Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From haloul02 at yahoo.co.uk Thu Dec 13 08:01:30 2007 From: haloul02 at yahoo.co.uk (Hala ALBakour) Date: Thu, 13 Dec 2007 13:01:30 +0000 (GMT) Subject: [vtkusers] Accessing the MeshList attribute of vtk3DSImporter Message-ID: <923231.54083.qm@web25411.mail.ukl.yahoo.com> Hi all, I am trying to access the MeshList attribute of the class vtk3DSImporter after I read a 3DS file as follows: vtkRenderer *ren = vtkRenderer::New(); ren->SetBackground(0.1, 0.2, 0.4); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); renWin->SetSize(1024,768); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtk3DSImporter *importer = vtk3DSImporter::New(); importer->SetRenderWindow(renWin); importer->SetFileName("sample.3ds"); importer->ComputeNormalsOn(); importer->Read(); vtk3DSMesh* mesh = importer->MeshList; however whenver I try to access the mesh object it looks as empty containing no faces or vetrices, though the rendering window is working very well displaying different kinds of 3D models (.3ds files), do you have any idea of what's going on, am I doing something wrong here, thanks a lot for your help, Hala __________________________________________________________ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com From sean at rogue-research.com Thu Dec 13 10:04:39 2007 From: sean at rogue-research.com (Sean McBride) Date: Thu, 13 Dec 2007 10:04:39 -0500 Subject: [vtkusers] Problem with building VTK 5.0.3 with Python/Tk on Mac OSX 10.4.1 In-Reply-To: References: <4760FD7A.7000408@dl.ac.uk> Message-ID: <20071213150439.1592530478@smtp1.sympatico.ca> On 12/13/07 10:08 AM, Thomas, JMH (Jens) said: >I'm largely answering my own question here in case what I've found is of >use to anyone else, but also in case what I've discovered qualifies as a bug. > >It seems that the default build for VTK on Mac OSX has been changed from >Carbon to Cocoa. Hi Jens, I never received your reply quoted way at the bottom, I don't know why. In any case, the change you noted is not a bug, but is indeed a recent change to CVS. It was discussed on the vtk-dev list. The reason is that Apple has announced that Carbon is not moving to 64 bit, and so it's days are numbered, thus we want to discourage its use as a default. >However (from what I can make out from the root >CMakeLists.txt file and the file vtkTkRenderWidget.cxx), it looks like >the Tk functionality is only available with Carbon or X. You may want to read: >There is a block of code in the root CMakeLists.txt that only turns on >VTK_USE_TK if Cocoa isn't being used and VTK_DISABLE_TK_INIT isn't set. >As I had turned on the Python and Tcl wrappers but was using the default >Cocoa option, the Tk stuff wasn't being built, triggering the error I >was seeing. It would be good to improve VTK's CMakeLists.txt to warn if VTK_USE_TK is on but VTK_USE_CARBON is not. I suggest you file a bug and if you know enough about CMake a patch too. Take care, Sean >I've reverted to the Carbon build and have now managed to get my >universal build working. > >The build wasn't completely trouble-free though, as there were still >problems with the linking of the files: > >libvtkCommonTCL.5.1.0.dylib >libvtkRenderingTCL.5.1.0.dylib >bin/vtk > >as the tcl/tk libraries weren't included on the link line. > >Best wishes, > >Jens > > > >Hi Sean, > >Thanks for getting back to me. > > >Also, do you really mean 10.4.1? Or do you mean 10.4.11 or 10.5.1? In > >any case, which version of Xcode do you have? > >Sorry - that was a typo, it's OSX 10.4.11 with Xcode 2.5 > > >>I've attached my CmakeCache.txt and have included some additional > >>information below in case it is of any use. > > >1200 lines of text is a lot... :) What settings did you change from > >their default? > >BUILD_SHARED_LIBS: ON >CMAKE_OSX_ARCHITECTURES: ppc;i386 >VTK_WRAP_PYTHON: ON >VTK_WRAP_TCL: ON > >BUILD_TESTING: OFF >CMAKE_VERBOSE_MAKEFILE: ON > > >If you are on 10.5, I suggest CVS CMake also. > >I've redone the build with CVS versions of both VTK and CMake. The build >fails twice as -ltcl is missing from the link stage for >libvtkCommonTCL.5.1.0.dylib and the file vtk right at the end of the build. > >I was able to fix the former by editing the file >Common/CMakeFiles/vtkCommonTCL.dir/link.txt to add -ltcl and the latter >by manually executing the link for vtk and appending -ltcl. > >This allows the build to run to completion. > >However, if I install the python files (using setup.py) and then try and >run the file: > >/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- >packages/vtk/tk/vtkLoadPythonTkWidgets.py > >It fails with the error: > > File "./vtkTkRenderWidget.py", line 466, in > vtkRenderWidgetConeExample() > File "./vtkTkRenderWidget.py", line 443, in vtkRenderWidgetConeExample > pane = vtkTkRenderWidget(root,width=300,height=300) > File "./vtkTkRenderWidget.py", line 81, in __init__ > vtkLoadPythonTkWidgets(master.tk) > File >"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- >packages/vtk/tk/vtkLoadPythonTkWidgets.py", >line 67, in vtkLoadPythonTkWidgets > interp.call('load', filename) >_tkinter.TclError: image not found >NSCreateObjectFileImageFromFile() error: not a Mach-O MH_BUNDLE file > > >It appears it's trying to load the file >libvtkRenderingPythonTkWidgets.dylib, but this file hasn't been built >(which I think is because the Cmake variable VTK_USE_TK hasn't been set, >even though the Tcl and Tk libraries were found during the configure). > >Is there an easy way to fix this? > > >Lastly, there are some Mac dashboards that enable TCL, you may want to > >look at their settings. > >I'm not very familiar with dashboard, so it's quite possible I missed >something, but've looked at > >http://www.vtk.org/Testing/Dashboard/20071210-0300-Nightly/Dashboard.html > >and couldn't find any that had the python and tcl wrapping turned on. > >Best wishes, > >Jens > >-- >____________________________________________________________ >Sean McBride, B. Eng sean at rogue-research.com >Rogue Research www.rogue-research.com >Mac Software Developer Montr?al, Qu?bec, Canada > > > > >-- >=================================================================== >Jens Thomas, email: j.m.h.thomas at dl.ac.uk >STFC Daresbury Lab, tel: +44-1925-603849 >Warrington, fax: +44-1925-603634 >WA4 4AD, UK. http: http://www.cse.scitech.ac.uk >=================================================================== > > > > >_______________________________________________ >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 > From sean at rogue-research.com Thu Dec 13 10:10:19 2007 From: sean at rogue-research.com (Sean McBride) Date: Thu, 13 Dec 2007 10:10:19 -0500 Subject: [vtkusers] Using vtkpython with X11 on headless Mac OS X systems In-Reply-To: <3D0767A4-036D-45C2-9260-EF6A92890916@nasa.gov> References: <3D0767A4-036D-45C2-9260-EF6A92890916@nasa.gov> Message-ID: <20071213151019.1935880681@smtp1.sympatico.ca> On 12/12/07 1:10 PM, W.T. Bridgman said: >I'm trying to build vtkpython to run on some Macs in a cluster. Mac >OS X 10.4.11, Python 2.4.4, VTK fairly recently from CVS. > >Using the guidance I've found on the list, I seem to have a partially >successful X11 build for vtk/vtkpython. I can run the c sample >programs like Cone and have it display through the X11 window to >another Mac or linux machine, but the vtkpython programs fail with an >X11 error like allocating colors, etc. > >I'm thinking this may be because the default Tk on the Mac doesn't >have X11 installed. Am I correct in assuming that the vtkpython >graphical components are piped through Tk? > >It appears that the TclTkAquaBI installation installs a Tk X11 >framework for the Mac and I am thinking about installing that and >rebuilding VTK. > >Does anyone on the list have experience with this or can provide some >hint as to whether I'm on the right track? Hi Tom, I'm afraid I know nothing about X11, nor python, nor Tk. :) But, I do maintain a few vtk dashboards and discovered that if the machine is headless (ie with a video card, but with no monitor physically connected) then VTK crashes all kinds. You might want to try with a monitor to see if that changes anything. And maybe read this: -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From abair at viz.tamu.edu Thu Dec 13 11:30:45 2007 From: abair at viz.tamu.edu (Alethea) Date: Thu, 13 Dec 2007 10:30:45 -0600 Subject: [vtkusers] Resource forking problems on Mac with python and vtk Message-ID: <47615E35.30805@viz.tamu.edu> I am running vtk 5.0.3 compiled on Mac OS 10.4 and python 2.3 when I start up vtk examples, the window does not come to the front, cannot be selected, and all keyboard messages go to the command prompt instead of the window. As a result I also cannot even stop the process without killing it in the command prompt. I have found some information about Mac resource fork issues, and using 'Rez' for compiled programs, but cannot seem to find anything about how to fix this problem in a language like python. Any help/pointers would be greatly appreciated -Alethea From david.cole at kitware.com Thu Dec 13 11:41:59 2007 From: david.cole at kitware.com (David Cole) Date: Thu, 13 Dec 2007 11:41:59 -0500 Subject: [vtkusers] Resource forking problems on Mac with python and vtk In-Reply-To: <47615E35.30805@viz.tamu.edu> References: <47615E35.30805@viz.tamu.edu> Message-ID: Other posts regarding this can be found with the google search:vtk mac keyboard site:kitware.com There is also this FAQ on the Wiki: http://www.vtk.org/Wiki/VTK_FAQ#How_to_get_keyboard_events_working_on_Mac_OS_X.3F HTH, David On 12/13/07, Alethea wrote: > > I am running vtk 5.0.3 compiled on Mac OS 10.4 and python 2.3 > > when I start up vtk examples, the window does not come to the front, > cannot be selected, and all keyboard messages go to the command prompt > instead of the window. As a result I also cannot even stop the process > without killing it in the command prompt. > > I have found some information about Mac resource fork issues, and using > 'Rez' for compiled programs, but cannot seem to find anything about how > to fix this problem in a language like python. > > Any help/pointers would be greatly appreciated > > -Alethea > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Thu Dec 13 11:51:44 2007 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Dec 2007 11:51:44 -0500 Subject: [vtkusers] Bug (?): /usr/lib/vtk-5.0/vtkCommonKit.cmake contains wrong elements In-Reply-To: References: Message-ID: <47616320.6090005@kitware.com> Michail Vidiassov wrote: > I have encountered (Mac OS X 10.5, vtk 5.0.3) the problem, that > is similar to the one described in the following bug report > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388736 > > The file /usr/lib/vtk-5.0/vtkCommonKit.cmake contains the setting of > VTK_COMMON_CLASSES; the last elements of this list look like > "/debian/stage/vtk-5.0.1/Build/Common/vtkTypeInt8Array" > instead of > "vtkTypeInt8Array" > > What is the proper solution? The patch is correct. No one ever filed a bug report in the VTK bug tracker about this AFAIK. Anyway, I've applied it to CMake HEAD: /cvsroot/VTK/VTK/CMake/vtkExportKit.cmake,v <-- vtkExportKit.cmake new revision: 1.12; previous revision: 1.11 I've also sent it to the 5.0 branch maintainer for inclusion there. Thanks, -Brad From emonson at cs.duke.edu Thu Dec 13 13:21:18 2007 From: emonson at cs.duke.edu (Eric Monson) Date: Thu, 13 Dec 2007 13:21:18 -0500 Subject: [vtkusers] Setting global point IDs from Python In-Reply-To: <953FB10D-55DA-442B-9FBC-12F74869055F@cs.duke.edu> References: <953FB10D-55DA-442B-9FBC-12F74869055F@cs.duke.edu> Message-ID: <1863FFC2-C9C3-4C2F-9575-764F28F275AB@cs.duke.edu> Hello, I'm using Python to build a vtkUnstructuredGrid and I need to manually set the global point IDs (for some later plotting in ParaView). It doesn't seem to me, though, that the SetGlobalIds() method (for vtkPointData or vtkDataSetAttributes) is directly accessible through the VTK Python wrappers. Does anyone know how to set the global Id attribute on point data from Python? (Maybe I'm just missing something obvious, but I'm pretty new to both Python and VTK.) Thanks, -Eric ----------------------------------------------------- Eric E. Monson Duke Visualization Technology Group From david.cole at kitware.com Thu Dec 13 13:21:39 2007 From: david.cole at kitware.com (David Cole) Date: Thu, 13 Dec 2007 13:21:39 -0500 Subject: [vtkusers] Bug (?): /usr/lib/vtk-5.0/vtkCommonKit.cmake contains wrong elements In-Reply-To: <47616320.6090005@kitware.com> References: <47616320.6090005@kitware.com> Message-ID: On 12/13/07, Brad King wrote: > > I've also sent it to the 5.0 branch maintainer for inclusion there. It has been committed to the VTK-5-0 branch also: /cvsroot/VTK/VTK/CMake/vtkExportKit.cmake,v <-- vtkExportKit.cmake new revision: 1.8.4.1; previous revision: 1.8 David Cole -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Thu Dec 13 13:37:20 2007 From: brad.king at kitware.com (Brad King) Date: Thu, 13 Dec 2007 13:37:20 -0500 Subject: [vtkusers] Bug (?): /usr/lib/vtk-5.0/vtkCommonKit.cmake contains wrong elements In-Reply-To: <47616320.6090005@kitware.com> References: <47616320.6090005@kitware.com> Message-ID: <47617BE0.5080604@kitware.com> Brad King wrote: > Michail Vidiassov wrote: >> The file /usr/lib/vtk-5.0/vtkCommonKit.cmake contains the setting of >> VTK_COMMON_CLASSES; the last elements of this list look like >> "/debian/stage/vtk-5.0.1/Build/Common/vtkTypeInt8Array" >> instead of >> "vtkTypeInt8Array" >> >> What is the proper solution? > > The patch is correct. No one ever filed a bug report in the VTK bug > tracker about this AFAIK. Anyway, I've applied it to CMake HEAD: > > /cvsroot/VTK/VTK/CMake/vtkExportKit.cmake,v <-- vtkExportKit.cmake > new revision: 1.12; previous revision: 1.11 > > I've also sent it to the 5.0 branch maintainer for inclusion there. Okay, the patch was not correct. That code actually constructs files that export classes from the build tree and files that export classes from the install tree. The old code was correct for the build tree and the new code is correct for the install tree. I've committed another fix that does the right thing for each case. /cvsroot/VTK/VTK/CMake/vtkExportKit.cmake,v <-- vtkExportKit.cmake new revision: 1.13; previous revision: 1.12 -Brad From david.cole at kitware.com Thu Dec 13 14:03:16 2007 From: david.cole at kitware.com (David Cole) Date: Thu, 13 Dec 2007 14:03:16 -0500 Subject: [vtkusers] Bug (?): /usr/lib/vtk-5.0/vtkCommonKit.cmake contains wrong elements In-Reply-To: <47617BE0.5080604@kitware.com> References: <47616320.6090005@kitware.com> <47617BE0.5080604@kitware.com> Message-ID: On 12/13/07, Brad King wrote: > > .....the new code is correct for the install tree. I've committed another > fix that does the right thing for each case. > > /cvsroot/VTK/VTK/CMake/vtkExportKit.cmake,v <-- vtkExportKit.cmake > new revision: 1.13; previous revision: 1.12 ...and this one has also been merged into VTK-5-0: /cvsroot/VTK/VTK/CMake/vtkExportKit.cmake,v <-- vtkExportKit.cmake new revision: 1.8.4.2; previous revision: 1.8.4.1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Thu Dec 13 14:07:39 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Thu, 13 Dec 2007 13:07:39 -0600 Subject: [vtkusers] How do I extract multiple vtkPolyData from a single vtkPolyData read from an XML file. In-Reply-To: References: <44f773f50712121322w4aec90b8l52f4485b84e8f036@mail.gmail.com> <44f773f50712121449r1f88ad7ak97f6ef9a2b125bad@mail.gmail.com> Message-ID: <44f773f50712131107x35e78cd5yb80502f8440e2bab@mail.gmail.com> Hmmm. Thanks Mike -- your solution seems to be working just fine. But another question -- I don't get why my code below doesn't work. I'm attaching the XML file I'm trying to read. My assumption is that since the XML file indicates that the only features are 3 lines, I need to just grab the lines, and then use those to initialize new instances of vtkPolyData from them. The Problem I'm seeing is this: The first line I get with lines->GetCell(0,npts,pts) is valid. But the next call lines->GetCell(1,npts,pts), returns zero for npts. Maybe I'm misunderstanding what the hell I'm supposed to do with the Cell pointer returned from vtkPolyData::GetLines(). vtkXMLPolyDataReader *reader = vtkXMLPolyDataReader::New(); reader->SetFileName(filename); reader->Update(); vtkPolyData *pd = reader->GetOutput(); vtkPoints *points = pd->GetPoints(); vtkCellArray *lines = pd->GetLines(); int size = lines->GetNumberOfCells(); int curslice; // // need to create a vtkPolyData for each line // in the file. for(unsigned i = 0; i < size; i++) { double zval; vtkIdType npts; vtkIdType *pts; lines->GetCell(i,npts,pts); vtkPoints *newpts = vtkPoints::New(); newpts->SetDataTypeToDouble(); for(unsigned j = 0; j < npts; j++) { // // don't close the line, it screws up // restoring the polydata if(j == npts - 1 && pts[j] == 0) break; double thePoint[3]; points->GetPoint(pts[j],thePoint); zval = thePoint[2]; // newpts->SetPoint(j,thePoint); newpts->InsertNextPoint(thePoint); } vtkPolyData *newPd = vtkPolyData::New(); ConvertPointSequenceToPolyData(newpts,1,newPd); } reader->Delete(); -------------- next part -------------- A non-text attachment was scrubbed... Name: xxx.xml Type: text/xml Size: 2073 bytes Desc: not available URL: From morenoisidro at yahoo.com.ar Thu Dec 13 13:37:13 2007 From: morenoisidro at yahoo.com.ar (Isidro Moreno) Date: Thu, 13 Dec 2007 15:37:13 -0300 Subject: [vtkusers] Strange behaviour of vtkXYPlotActor class Message-ID: <000901c83db7$32df65b0$4800fdc9@Moreno> Hi! I'm a beginer in VTK and I've been trying to draw the sinus func with vtkxyplotactor for teaching purposes. The strange thing is that although I indicate which are the x-y components in the values array, the system draws the "arc sin" function. I don't know how to understand this; Am I wrong? or the system swap components? Here's the code: #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkPolyData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkXYPlotActor.h" #include "vtkDataSetCollection.h" int main(){ // CONSOLE: how many points entry to form the "line". // CONSOLA: Ingreso de la cantidad de puntos que formar?n la "curva". int data_puntos; cout<<"Ingrese cantidad de puntos (1-50): "; cin>>data_puntos; // Creaci?n de una Celda - Definici?n topol?gica y geom?trica // Definici?n Topol?gica // Inserci?n de 1(una) celda con 'n' puntos vtkCellArray *cellarray=vtkCellArray::New(); cellarray->InsertNextCell(data_puntos); // Definici?n Geom?trica y relaci?n con la topolog?a vtkPoints *puntos=vtkPoints::New(); for(int j=0;jInsertCellPoint(j); // ___ j = n?ID de cada punto puntos->InsertPoint( j, // _________________________ n? ID j/5.0, // _____________________ valor de "x" sin(j/5.0), // ________________ valor de "y" 0.0 // _________________________valor de "z" );} // Agregado de informaci?n topol?gica y geom?trica al DataSet vtkPolyData *polydata=vtkPolyData::New(); polydata->SetPoints(puntos); // Puntos polydata->SetLines(cellarray); // Celdas - 1(una) polydata->GetPointData()->SetScalars(puntos->GetData()); polydata->GetPointData()->Update(); // Creaci?n de un Actor vtkXYPlotActor *actor=vtkXYPlotActor::New(); actor->SetXValuesToValue(); actor->SetDataObjectXComponent(0,1); actor->SetDataObjectYComponent(0,2); actor->AddInput(polydata); // The following didn't help me enough... : ( cout<GetNumberOfItems()="<GetInputList()->GetNumberOfItems()<Delete(); puntos->Delete(); cellarray->Delete(); actor->Delete(); renderer->Delete(); ventana->Delete(); interac->Delete(); return 0;} Thanks in advance! Isidro. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Thu Dec 13 15:00:10 2007 From: sean at rogue-research.com (Sean McBride) Date: Thu, 13 Dec 2007 15:00:10 -0500 Subject: [vtkusers] Resource forking problems on Mac with python and vtk In-Reply-To: <47615E35.30805@viz.tamu.edu> References: <47615E35.30805@viz.tamu.edu> Message-ID: <20071213200010.144985272@smtp1.sympatico.ca> On 12/13/07 10:30 AM, Alethea said: >I am running vtk 5.0.3 compiled on Mac OS 10.4 and python 2.3 > >when I start up vtk examples, the window does not come to the front, >cannot be selected, and all keyboard messages go to the command prompt >instead of the window. As a result I also cannot even stop the process >without killing it in the command prompt. This is: >I have found some information about Mac resource fork issues, and using >'Rez' for compiled programs, but cannot seem to find anything about how >to fix this problem in a language like python. > >Any help/pointers would be greatly appreciated The most recent comment in the bug may be helpful. I think adding the __info_plist section to the executable might work, but have not had time to try. -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From William.T.Bridgman at nasa.gov Thu Dec 13 15:41:14 2007 From: William.T.Bridgman at nasa.gov (W.T. Bridgman) Date: Thu, 13 Dec 2007 15:41:14 -0500 Subject: [vtkusers] Using vtkpython with X11 on headless Mac OS X systems In-Reply-To: <20071213151019.1935880681@smtp1.sympatico.ca> References: <3D0767A4-036D-45C2-9260-EF6A92890916@nasa.gov> <20071213151019.1935880681@smtp1.sympatico.ca> Message-ID: <4BE283CA-25EE-4CAD-93B0-4DDB8C7CA01B@nasa.gov> Sean, The only problem I see with this solution is that the problem appears to be a VTK with Python issue. The VTK samples written in C behave just fine in the environment described. Thanks for your input. Tom On Dec 13, 2007, at 10:10 AM, Sean McBride wrote: > On 12/12/07 1:10 PM, W.T. Bridgman said: > >> I'm trying to build vtkpython to run on some Macs in a cluster. Mac >> OS X 10.4.11, Python 2.4.4, VTK fairly recently from CVS. >> >> Using the guidance I've found on the list, I seem to have a partially >> successful X11 build for vtk/vtkpython. I can run the c sample >> programs like Cone and have it display through the X11 window to >> another Mac or linux machine, but the vtkpython programs fail with an >> X11 error like allocating colors, etc. >> >> I'm thinking this may be because the default Tk on the Mac doesn't >> have X11 installed. Am I correct in assuming that the vtkpython >> graphical components are piped through Tk? >> >> It appears that the TclTkAquaBI installation installs a Tk X11 >> framework for the Mac and I am thinking about installing that and >> rebuilding VTK. >> >> Does anyone on the list have experience with this or can provide some >> hint as to whether I'm on the right track? > > Hi Tom, > > I'm afraid I know nothing about X11, nor python, nor Tk. :) But, > I do > maintain a few vtk dashboards and discovered that if the machine is > headless (ie with a video card, but with no monitor physically > connected) then VTK crashes all kinds. > > You might want to try with a monitor to see if that changes anything. > And maybe read this: > > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada From jcplatt at dsl.pipex.com Thu Dec 13 17:39:35 2007 From: jcplatt at dsl.pipex.com (John Platt) Date: Thu, 13 Dec 2007 22:39:35 -0000 Subject: [vtkusers] Strange behaviour of vtkXYPlotActor class In-Reply-To: <000901c83db7$32df65b0$4800fdc9@Moreno> Message-ID: <002801c83dd9$0e3c4e90$0100a8c0@pacsys4> Hi, It may be easier to use data object input rather than a data set. You could try the following. #include "vtkFloatArray.h" #include "vtkFieldData.h" #include "vtkDataObject.h" #include "vtkXYPlotActor.h" #include "vtkXYPlotWidget.h" #include "vtkMath.h" #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { vtkFloatArray* vtkXYValues = vtkFloatArray::New(); vtkXYValues->SetNumberOfComponents( static_cast(2) ); for ( int i = 0; i < 360; ++i ) { float xy[2]; xy[0] = static_cast(i); xy[1] = sin( xy[0]*vtkMath::DegreesToRadians() ); vtkXYValues->InsertNextTuple( xy ); } vtkFieldData* vtkGraphFieldData = vtkFieldData::New(); vtkGraphFieldData->AddArray( vtkXYValues ); vtkXYValues->Delete(); vtkDataObject* vtkGraphDataObject = vtkDataObject::New(); vtkGraphDataObject->SetFieldData( vtkGraphFieldData ); vtkGraphFieldData->Delete(); vtkXYPlotActor* vtkGraph = vtkXYPlotActor::New(); vtkGraph->AddDataObjectInput( vtkGraphDataObject ); vtkGraphDataObject->Delete(); vtkGraph->SetDataObjectPlotModeToColumns(); vtkGraph->SetXValuesToValue(); // Must state the component for the X & Y otherwise 0 is assumed for both!! int curve = 0; vtkGraph->SetDataObjectXComponent( curve, 0 ); vtkGraph->SetDataObjectYComponent( curve, 1 ); vtkGraph->SetXRange( 0, 360 ); vtkGraph->SetYRange( -1, 1 ); vtkGraph->SetPlotColor( curve, 1,0,0 ); vtkRenderer* renderer = vtkRenderer::New(); renderer->AddActor2D( vtkGraph ); vtkRenderWindow* renderWin = vtkRenderWindow::New(); renderWin->AddRenderer( renderer ); vtkRenderWindowInteractor* interactor = vtkRenderWindowInteractor::New(); interactor->SetRenderWindow( renderWin ); vtkXYPlotWidget* vtkXYPlotWidget = vtkXYPlotWidget::New(); vtkXYPlotWidget->SetXYPlotActor( vtkGraph ); vtkXYPlotWidget->SetInteractor( interactor ); vtkXYPlotWidget->SetEnabled( true ); interactor->Initialize(); interactor->Start(); return 0; } HTH John. -----Original Message----- From: vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org [mailto:vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org] On Behalf Of Isidro Moreno Sent: 13 December 2007 18:37 To: vtkusers at vtk.org Subject: [vtkusers] Strange behaviour of vtkXYPlotActor class Hi! I'm a beginer in VTK and I've been trying to draw the sinus func with vtkxyplotactor for teaching purposes. The strange thing is that although I indicate which are the x-y components in the values array, the system draws the "arc sin" function. I don't know how to understand this; Am I wrong? or the system swap components? Here's the code: #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkPolyData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkXYPlotActor.h" #include "vtkDataSetCollection.h" int main(){ // CONSOLE: how many points entry to form the "line". // CONSOLA: Ingreso de la cantidad de puntos que formar?n la "curva". int data_puntos; cout<<"Ingrese cantidad de puntos (1-50): "; cin>>data_puntos; // Creaci?n de una Celda - Definici?n topol?gica y geom?trica // Definici?n Topol?gica // Inserci?n de 1(una) celda con 'n' puntos vtkCellArray *cellarray=vtkCellArray::New(); cellarray->InsertNextCell(data_puntos); // Definici?n Geom?trica y relaci?n con la topolog?a vtkPoints *puntos=vtkPoints::New(); for(int j=0;jInsertCellPoint(j); // ___ j = n?ID de cada punto puntos->InsertPoint( j, // _________________________ n? ID j/5.0, // _____________________ valor de "x" sin(j/5.0), // ________________ valor de "y" 0.0 // _________________________valor de "z" );} // Agregado de informaci?n topol?gica y geom?trica al DataSet vtkPolyData *polydata=vtkPolyData::New(); polydata->SetPoints(puntos); // Puntos polydata->SetLines(cellarray); // Celdas - 1(una) polydata->GetPointData()->SetScalars(puntos->GetData()); polydata->GetPointData()->Update(); // Creaci?n de un Actor vtkXYPlotActor *actor=vtkXYPlotActor::New(); actor->SetXValuesToValue(); actor->SetDataObjectXComponent(0,1); actor->SetDataObjectYComponent(0,2); actor->AddInput(polydata); // The following didn't help me enough... : ( cout<GetNumberOfItems()="<GetInputList()->GetNumbe rOfItems()<Delete(); puntos->Delete(); cellarray->Delete(); actor->Delete(); renderer->Delete(); ventana->Delete(); interac->Delete(); return 0;} Thanks in advance! Isidro. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcplatt at dsl.pipex.com Thu Dec 13 17:48:30 2007 From: jcplatt at dsl.pipex.com (John Platt) Date: Thu, 13 Dec 2007 22:48:30 -0000 Subject: [vtkusers] Qt4 - adding a QVTKWidget to QMdiArea nulls the render window of the renderers In-Reply-To: <47607066.4050606@sci.monash.edu.au> Message-ID: <002d01c83dda$4db9db90$0100a8c0@pacsys4> Hi Shakes, I hadn't thought about that. I'm still trying to find my way around Qt so I just took the Qt4 MDI sample and started piling in the VTK stuff! For the time being I am just resetting the render window in the renderer. Your help is very much appreciated. John. -----Original Message----- From: shekharc [mailto:Shekhar.Chandra at sci.monash.edu.au] Sent: 12 December 2007 23:36 To: John Platt Cc: vtk Users Subject: Re: [vtkusers] Qt4 - adding a QVTKWidget to QMdiArea nulls the render window of the renderers Hi John, I suggest u use QWorkspace instead, it should allow u todo exactly the same thing as QMdiArea. I have used this very successfully. This is because QMdiArea is mainly designed to use subclasses of QMdiSubWindow (as evident from setActive and currentWindow members) and QVTKWidget is probably only derived from QWidget. See the MDI Example in the docs for more info. Hope that helps. Cheers Shakes John Platt wrote: > Hi, > > > > Creating a QVTKWidget derived object, something like > > > > class MdiChild : public QVTKWidget > > { > > MdiChild() { ren = vtkRenderer::New(); > > GetRenderWindow()->AddRenderer( ren ); .... } > > ... > > } > > > > and adding to a QMdiArea::addSubWindow() nulls the render window > associated with the renderer (ren->GetRenderWindow()). This causes other > vtk objects which get the render window from the renderer to crash (eg. > vtkOrientationMarkerWidget). > > > > It appears that QMdiArea::addSubWindow() reparents the MdiChild. > QEvent::ParentAboutToChange is trapped by QVTKWidget::event which > eventually calls vtkWin32OpenGLRenderWindow::Clean() where > > ren->SetRenderWindow(NULL); occurs. > > > > The QEvent::ParentChange doesn't reset the render window for the > renderer list. > > > > I don't pretend to understand what should happen. Perhaps > GetRenderWindow() should not be called until after addSubWindow() or > QEvent::ParentChange should add the render window back to each renderer. > > > > Any advice or suggestions would be very much appreciated, > > > > TIA > > > > John. > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 From srfpala at earthlink.net Thu Dec 13 18:33:01 2007 From: srfpala at earthlink.net (Bob Palank) Date: Thu, 13 Dec 2007 17:33:01 -0600 Subject: [vtkusers] (no subject) Message-ID: From hazembio at yahoo.com Thu Dec 13 19:04:55 2007 From: hazembio at yahoo.com (Hazem Safwat) Date: Thu, 13 Dec 2007 16:04:55 -0800 (PST) Subject: [vtkusers] Hazem Safwat Message-ID: <987580.87859.qm@web35809.mail.mud.yahoo.com> This my E-mail address , Hazembio at yahoo.com 10Q Hazem Safwat --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From abair at viz.tamu.edu Fri Dec 14 00:43:02 2007 From: abair at viz.tamu.edu (Alethea) Date: Thu, 13 Dec 2007 23:43:02 -0600 Subject: [vtkusers] Resource forking problems on Mac with python and vtk In-Reply-To: <20071213200010.144985272@smtp1.sympatico.ca> References: <47615E35.30805@viz.tamu.edu> <20071213200010.144985272@smtp1.sympatico.ca> Message-ID: <476217E6.5000209@viz.tamu.edu> I believe there is some confusion about what I am trying to do. I would like to use python scripts with vtk. That is from a command prompt I am typing: python ExampleVTK.py Regarding David's suggestions: I tried recompiling and installing vtk from source, including the commands from the wiki in my CMakeLists.txt file: IF(APPLE) SET(EXECUTABLE_FLAG MACOSX_BUNDLE) ENDIF(APPLE) Although this compiled fine and did not break anything new, it did not fix my the window problem. It seems to me that the wiki help is for people /compiling/ vtk applications such as with C++. I don't know how to add these lines to an interpreted language like python. Regarding Carlos' suggestions: Running vtkpython has the same window problem as python. As far as I can tell the only difference between them is whether the PYTHONPATH variable has been set for you or not. Also, I have tried copying the python executable elsewhere and typing: /Developer/Tools/Rez -o localpythoncopy But it seems to simply hang - no response for long minutes until I simply CTRL-C. Have you used Rez enough to say where I'm being really stupid with this? Regarding Sean's suggestions: What executable should I be adding this __info_plist section to? Python? vtk? I am not compiling any source, I am running python scripts... thanks for all your help - (I'm learning a lot!) Alethea From PeterMethfessel at gmx.de Fri Dec 14 05:51:44 2007 From: PeterMethfessel at gmx.de (PeterM) Date: Fri, 14 Dec 2007 11:51:44 +0100 Subject: [vtkusers] Does exist something like a vtk editor (for *.vtk files) Message-ID: <2AD4BBAC3A734C5E8ADD20FEF8435DD4@joker> Hi, I have vtk files, like VLG_blade.vtk. this files are filed with an structured grid and scalar or vektor data for each vertex. The vtk files are binar saved so i cant change the strukture or the information. my question: is there a programm where i can see the the vetrexdata and can change them. Every programm i found like MayaVi and Vistrails and ... are show only finish polygon surface and the vtk posibilities to change the view but i cant work with the datas them self. yours sincerely PM -------------- next part -------------- An HTML attachment was scrubbed... URL: From hazembio at yahoo.com Fri Dec 14 08:01:16 2007 From: hazembio at yahoo.com (Hazem Safwat) Date: Fri, 14 Dec 2007 05:01:16 -0800 (PST) Subject: [vtkusers] Urgent question Message-ID: <635449.53564.qm@web35812.mail.mud.yahoo.com> AA; I successed to add vtk to C# , but when running the program this error appears " FileNotFoundException was unhandled error" and i searched for that and the search result was "Add the VTK dll and library folders to the Visual C# and System environment variables (path)" but i couldn't understand that !! what can i do please ? 10Q Hazem Safwat --------------------------------- Never miss a thing. Make Yahoo your homepage. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kei at gmx.ch Fri Dec 14 08:26:56 2007 From: kei at gmx.ch (Lam Ha Hoang) Date: Fri, 14 Dec 2007 14:26:56 +0100 Subject: [vtkusers] Problem with loading a texture Message-ID: <20071214132656.143990@gmx.net> Hello everyone I am trying to load e texture over a stl-file with the following code: vtkSTLReader *sr = vtkSTLReader::New(); sr->SetFileName("skull.stl"); // create the texture // vtkJPEGReader *myJPEG = vtkJPEGReader::New(); myJPEG->SetFileName("blood.jpg"); vtkTexture *texture = vtkTexture::New(); texture->SetInput(myJPEG->GetOutput()); texture->InterpolateOn(); vtkTextureMapToPlane *myPlane = vtkTextureMapToPlane::New(); myPlane->SetInput(myJPEG->GetOutput()); myPlane->AutomaticPlaneGenerationOn(); vtkPolyDataMapper *stlMapper = vtkPolyDataMapper::New(); stlMapper->SetInputConnection(sr->GetOutputPort()); vtkLODActor *stlActor = vtkLODActor::New(); stlActor->SetMapper(stlMapper); Now i get 2 errors: each time where I use the GetOutput()-function. I know that it is a type-cast-issue and I've already tried the GetOutputDataObject()-function, but for ths case I need a port, which I don't have. What is the easiest solution? Do I need to generate e port? Any help would be appreciated very much. Samples/Examples would be nice. Thanks in advance Lam -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail From morenoisidro at yahoo.com.ar Fri Dec 14 08:18:09 2007 From: morenoisidro at yahoo.com.ar (Isidro Moreno) Date: Fri, 14 Dec 2007 10:18:09 -0300 Subject: [vtkusers] Strange behaviour of vtkXYPlotActor class Message-ID: <000901c83e53$f31f46a0$8816fdc9@Moreno> Thanks John! Everything worked fine! Although I agree with you in the fact that it's easier to use data object rather than a dataset, I wondered If you could tell me why the SetDataObject...Component(... , ...) function doesn't work fine in my example and what's the difference between SetDataObjectPlotModeToColumns() and SetDataObjectPlotModeToRows(), since I don't know what columns and rows these functions refer to (I've already seen the HTML help). Thanks again! Isidro. ----- Original Message ----- From: John Platt To: 'Isidro Moreno' Cc: vtk Users Sent: Thursday, December 13, 2007 7:39 PM Subject: RE: [vtkusers] Strange behaviour of vtkXYPlotActor class Hi, It may be easier to use data object input rather than a data set. You could try the following. #include "vtkFloatArray.h" #include "vtkFieldData.h" #include "vtkDataObject.h" #include "vtkXYPlotActor.h" #include "vtkXYPlotWidget.h" #include "vtkMath.h" #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { vtkFloatArray* vtkXYValues = vtkFloatArray::New(); vtkXYValues->SetNumberOfComponents( static_cast(2) ); for ( int i = 0; i < 360; ++i ) { float xy[2]; xy[0] = static_cast(i); xy[1] = sin( xy[0]*vtkMath::DegreesToRadians() ); vtkXYValues->InsertNextTuple( xy ); } vtkFieldData* vtkGraphFieldData = vtkFieldData::New(); vtkGraphFieldData->AddArray( vtkXYValues ); vtkXYValues->Delete(); vtkDataObject* vtkGraphDataObject = vtkDataObject::New(); vtkGraphDataObject->SetFieldData( vtkGraphFieldData ); vtkGraphFieldData->Delete(); vtkXYPlotActor* vtkGraph = vtkXYPlotActor::New(); vtkGraph->AddDataObjectInput( vtkGraphDataObject ); vtkGraphDataObject->Delete(); vtkGraph->SetDataObjectPlotModeToColumns(); vtkGraph->SetXValuesToValue(); // Must state the component for the X & Y otherwise 0 is assumed for both!! int curve = 0; vtkGraph->SetDataObjectXComponent( curve, 0 ); vtkGraph->SetDataObjectYComponent( curve, 1 ); vtkGraph->SetXRange( 0, 360 ); vtkGraph->SetYRange( -1, 1 ); vtkGraph->SetPlotColor( curve, 1,0,0 ); vtkRenderer* renderer = vtkRenderer::New(); renderer->AddActor2D( vtkGraph ); vtkRenderWindow* renderWin = vtkRenderWindow::New(); renderWin->AddRenderer( renderer ); vtkRenderWindowInteractor* interactor = vtkRenderWindowInteractor::New(); interactor->SetRenderWindow( renderWin ); vtkXYPlotWidget* vtkXYPlotWidget = vtkXYPlotWidget::New(); vtkXYPlotWidget->SetXYPlotActor( vtkGraph ); vtkXYPlotWidget->SetInteractor( interactor ); vtkXYPlotWidget->SetEnabled( true ); interactor->Initialize(); interactor->Start(); return 0; } HTH John. -----Original Message----- From: vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org [mailto:vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org] On Behalf Of Isidro Moreno Sent: 13 December 2007 18:37 To: vtkusers at vtk.org Subject: [vtkusers] Strange behaviour of vtkXYPlotActor class Hi! I'm a beginer in VTK and I've been trying to draw the sinus func with vtkxyplotactor for teaching purposes. The strange thing is that although I indicate which are the x-y components in the values array, the system draws the "arc sin" function. I don't know how to understand this; Am I wrong? or the system swap components? Here's the code: #include "vtkPointData.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkPolyData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkXYPlotActor.h" #include "vtkDataSetCollection.h" int main(){ // CONSOLE: how many points entry to form the "line". // CONSOLA: Ingreso de la cantidad de puntos que formar?n la "curva". int data_puntos; cout<<"Ingrese cantidad de puntos (1-50): "; cin>>data_puntos; // Creaci?n de una Celda - Definici?n topol?gica y geom?trica // Definici?n Topol?gica // Inserci?n de 1(una) celda con 'n' puntos vtkCellArray *cellarray=vtkCellArray::New(); cellarray->InsertNextCell(data_puntos); // Definici?n Geom?trica y relaci?n con la topolog?a vtkPoints *puntos=vtkPoints::New(); for(int j=0;jInsertCellPoint(j); // ___ j = n?ID de cada punto puntos->InsertPoint( j, // _________________________ n? ID j/5.0, // _____________________ valor de "x" sin(j/5.0), // ________________ valor de "y" 0.0 // _________________________valor de "z" );} // Agregado de informaci?n topol?gica y geom?trica al DataSet vtkPolyData *polydata=vtkPolyData::New(); polydata->SetPoints(puntos); // Puntos polydata->SetLines(cellarray); // Celdas - 1(una) polydata->GetPointData()->SetScalars(puntos->GetData()); polydata->GetPointData()->Update(); // Creaci?n de un Actor vtkXYPlotActor *actor=vtkXYPlotActor::New(); actor->SetXValuesToValue(); actor->SetDataObjectXComponent(0,1); actor->SetDataObjectYComponent(0,2); actor->AddInput(polydata); // The following didn't help me enough... : ( cout<GetNumberOfItems()="<GetInputList()->GetNumberOfItems()<Delete(); puntos->Delete(); cellarray->Delete(); actor->Delete(); renderer->Delete(); ventana->Delete(); interac->Delete(); return 0;} Thanks in advance! Isidro. -------------------------------------------------------------------------------- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.17/1177 - Release Date: 7/12/2007 13:11 -------------- next part -------------- An HTML attachment was scrubbed... URL: From PeterMethfessel at gmx.de Fri Dec 14 08:59:15 2007 From: PeterMethfessel at gmx.de (PeterM) Date: Fri, 14 Dec 2007 14:59:15 +0100 Subject: [vtkusers] VTK convert and edit Message-ID: <006601c83e59$83ccd5f0$0b01a8c0@joker> Hi, do anyone know who can i edit the data array of an vtk file. in paraview for example i can see who big the data array is but i cant edit it. and is there a posibility to save obj or wrl files as vtk file? thanks to the comunity. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mongwarrior at yahoo.com Fri Dec 14 09:30:25 2007 From: mongwarrior at yahoo.com (John Ownsoul) Date: Fri, 14 Dec 2007 06:30:25 -0800 (PST) Subject: [vtkusers] Problem with vtkDelaunay3D Message-ID: <14336625.post@talk.nabble.com> Dear Fellows, I want to visualize 3D geographical data with VTK. I use x,y,z resistivity values. I use vtkDelaunay3D and visualize it, but when zooming into the object i saw that it is not a solid object. The object is hollow. How can i visualize a solid object, could you help me. Thanks for everything... http://www.nabble.com/file/p14336625/1.jpg http://www.nabble.com/file/p14336625/2.jpg Here is my code: while (dis.available() != 0) { qwe++; temp=dis.readLine(); processLine(temp); System.out.println("x : " + x + ", y : " + y + ", z : " + z + ", resist. : " + r ); id1=points.InsertNextPoint(x,y,z); //if(r>20 && r<80) r=100; if (r>max) max=r; if (r References: <2AD4BBAC3A734C5E8ADD20FEF8435DD4@joker> Message-ID: <20071214144653.986138963@smtp1.sympatico.ca> On 12/14/07 11:51 AM, PeterM said: >I have vtk files, like VLG_blade.vtk. this files are filed with an >structured grid and scalar or vektor data for each vertex. The vtk files >are binar saved so i cant change the strukture or the information. >my question: is there a programm where i can see the the vetrexdata and >can change them. >Every programm i found like MayaVi and Vistrails and ... are show only >finish polygon surface and the vtk posibilities to change the view but i >cant work with the datas them self. Did you try Paraview? -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From sean at rogue-research.com Fri Dec 14 09:51:50 2007 From: sean at rogue-research.com (Sean McBride) Date: Fri, 14 Dec 2007 09:51:50 -0500 Subject: [vtkusers] Resource forking problems on Mac with python and vtk In-Reply-To: <476217E6.5000209@viz.tamu.edu> References: <47615E35.30805@viz.tamu.edu> <20071213200010.144985272@smtp1.sympatico.ca> <476217E6.5000209@viz.tamu.edu> Message-ID: <20071214145150.1285824580@smtp1.sympatico.ca> On 12/13/07 11:43 PM, Alethea said: >It seems to me that the wiki help is for >people /compiling/ vtk applications such as with C++. True. >Also, I have tried copying the python executable elsewhere and typing: >/Developer/Tools/Rez -o localpythoncopy >But it seems to simply hang - no response for long minutes until I I don't believe you are using Rez correctly, see 'man Rez'. >What executable should I be adding this __info_plist section to? Python? >vtk? I am not compiling any source, I am running python scripts... I'm sorry I can't help more... I've never used Python. Which executable runs Python scripts? Have you used other Python scripts that display a window and successfully allow interaction? -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From abair at viz.tamu.edu Fri Dec 14 14:10:02 2007 From: abair at viz.tamu.edu (Alethea Bair) Date: Fri, 14 Dec 2007 13:10:02 -0600 Subject: [vtkusers] Resource forking problems on Mac with python and vtk In-Reply-To: <20071214145150.1285824580@smtp1.sympatico.ca> References: <47615E35.30805@viz.tamu.edu> <20071213200010.144985272@smtp1.sympatico.ca> <476217E6.5000209@viz.tamu.edu> <20071214145150.1285824580@smtp1.sympatico.ca> Message-ID: <4831E6CE-6BD4-43F2-81D0-2442C1F37817@viz.tamu.edu> On Dec 14, 2007, at 8:51 AM, Sean McBride wrote: > > I'm sorry I can't help more... I've never used Python. Which > executable > runs Python scripts? Have you used other Python scripts that > display a > window and successfully allow interaction? > The executable is 'python' and is generally found in /usr/bin/ And I have successfully used the module 'Tkinter' (stands for Tk interface). The following script opens a window that opens and closes fine and registers keys and clicks (Obviously it doesn't use vtkRenderWindow) ________________ # File: MouseKeyClicks.py from Tkinter import *# load Tkinter module root = Tk() # root widget is the window # define mouse and key callbacks def callback(event): frame.focus_set() print "clicked mouse" def key(event): frame.focus_set() print "pressed key" # make window frame = Frame(root, width=300, height=300) # bind callbacks to keys and left mouse click frame.bind("",key) frame.bind("",callback) frame.pack() # size window and make it visible frame.focus_set() # set focus to the frame so events will be registered root.mainloop() # enter event loop ________________ -Alethea -------------- next part -------------- An HTML attachment was scrubbed... URL: From clinton at elemtech.com Fri Dec 14 14:47:26 2007 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 14 Dec 2007 12:47:26 -0700 Subject: [vtkusers] Qt4 - adding a QVTKWidget to QMdiArea nulls the render window of the renderers In-Reply-To: <20071213170050.6EDED1F85AC@public.kitware.com> References: <20071213170050.6EDED1F85AC@public.kitware.com> Message-ID: <4762DDCE.2060705@elemtech.com> Do you mind giving me some example code to reproduce the problem? I'd like to see if QVTKWidget is doing something wrong here. Thanks, Clint John Platt wrote: > Hi, > > Creating a QVTKWidget derived object, something like > > class MdiChild : public QVTKWidget > > { > > MdiChild() { ren = vtkRenderer::New(); > > GetRenderWindow()->AddRenderer( ren ); ???? } > > ??? > > } > > > > and adding to a QMdiArea::addSubWindow() nulls the render window > associated with the renderer (ren->GetRenderWindow()). This causes other > vtk objects which get the render window from the renderer to crash (eg. > vtkOrientationMarkerWidget). > > > > It appears that QMdiArea::addSubWindow() reparents the MdiChild. > QEvent::ParentAboutToChange is trapped by QVTKWidget::event which > eventually calls vtkWin32OpenGLRenderWindow::Clean() where > > ren->SetRenderWindow(NULL); occurs. > > > > The QEvent::ParentChange doesn?t reset the render window for the > renderer list. > > > > I don?t pretend to understand what should happen. Perhaps > GetRenderWindow() should not be called until after addSubWindow() or > QEvent::ParentChange should add the render window back to each renderer. > > > Any advice or suggestions would be very much appreciated, > > > From nkwmailinglists at gmail.com Fri Dec 14 14:47:28 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Fri, 14 Dec 2007 13:47:28 -0600 Subject: [vtkusers] How do I modify the interaction behavior for the vtkContourWidget? Message-ID: <44f773f50712141147r442808c4t3762a18fa9f36619@mail.gmail.com> Really, I only ask these dumb questions after I poke around the documentation and code examples and google for answers ;-) I have made some good progress on my 3D Image tracer application. The program now can load a 3D volume, and allow a user to trace anatomical features slice by slice, with one or more contours. I currently hook the vtkContourWidgets to a vtkViewImage2D widget (from the vtkinria3d toolkit: http://www-sop.inria.fr/asclepios/software/vtkINRIA3D/ Everything works great EXCEPT -- the vtkContourWidget reacts to some of the same events as the vtkViewImage2D widget. I'm able to turn off all but the essential event handling in the View -- zoom and pan, which is bound to the right mouse button. So first off I want to move the AddFinalPointAction binding from the right mouse button, or change it to Control->RightMouseButton. Secondly the vtkContourWidget::DeleteAction method is bound thusly in vtkContourWidget: this->CallbackMapper->SetCallbackMethod(vtkCommand::KeyPressEvent, vtkEvent::NoModifier, 47, 1, NULL, vtkWidgetEvent::Delete, this, vtkContourWidget::DeleteAction); this->CallbackMapper->SetCallbackMethod(vtkCommand::CharEvent, vtkEvent::NoModifier, 47, 1, NULL, vtkWidgetEvent::Delete, this, vtkContourWidget::DeleteAction); What this ends up doing, as I've discovered from experimentation, is that any time the Ctrl, (Alt/Option) (OpenApple/Cloverleaf), or Shift keys is pressed, the last point of an open contour, or the currently selected point of a closed contour, gets deleted. This seems to me to be pretty end-user-confusing. Those are all buttons that can get pressed accidentally, and normally, being pressed by themselves has null effect. Where by 'normally' I mean 'in nearly every other program that runs on a computer.' Furthermore the DART Man Page for vtkContourWidget says that the vtkContourWidget::DeleteAction is bound to the 'Delete' key. So I'd like to have something like 'F1' or 'Alt-something-or-other' mapped to the vtkContourWidget::AddFinalPointAction action, and 'Delete' or 'Ctrl-something-or-Other' I kind of see how to do this by messing with the vtkWidgetEventTranslator, but I'm a little baffled by how exactly what the magic incantation to do this is. Pointers to examples, or discussion, is welcome. Thanks! From burlen at apollo.sr.unh.edu Fri Dec 14 14:54:56 2007 From: burlen at apollo.sr.unh.edu (burlen) Date: Fri, 14 Dec 2007 14:54:56 -0500 Subject: [vtkusers] Problem with vtkDelaunay3D In-Reply-To: <14336625.post@talk.nabble.com> References: <14336625.post@talk.nabble.com> Message-ID: <4762DF90.6010501@apollo.sr.unh.edu> You are seeing the surface of your object, I think what you are after is either some sort of volume rendering, or to simply slice or sample the data on the interior of your dataset. You can for instance slice the data with a plane, or a spherical shell and visualize the resulting surfaces. You might take a look at using paraview to try various techniques before you bother coding anything up yourself. John Ownsoul wrote: > Dear Fellows, > > I want to visualize 3D geographical data with VTK. I use x,y,z resistivity > values. I use vtkDelaunay3D and visualize it, but when zooming into the > object i saw that it is not a solid object. The object is hollow. How can i > visualize a solid object, could you help me. Thanks for everything... > > > http://www.nabble.com/file/p14336625/1.jpg > http://www.nabble.com/file/p14336625/2.jpg > > > > Here is my code: > > while (dis.available() != 0) > { > qwe++; > temp=dis.readLine(); > > processLine(temp); > System.out.println("x : " + x + ", y : " + y + ", z : " + z + ", > resist. : " + r ); > id1=points.InsertNextPoint(x,y,z); > //if(r>20 && r<80) r=100; > > if (r>max) max=r; > if (r > r=1-r/500; > > values.InsertValue(qwe,r); > ids.InsertNextId(qwe); > cell.InsertNextCell(id1); > } > fis.close(); > bis.close(); > dis.close(); > System.out.println(qwe); > System.out.println("min " + min); > System.out.println("max " + max); > > vtkPolyData polyData = new vtkPolyData(); > polyData.SetPoints(points); > polyData.SetVerts(cell); > polyData.GetPointData().SetScalars(values); > > > //============================================================== > vtkDelaunay3D del3D = new vtkDelaunay3D(); > del3D.SetInput(polyData); > del3D.SetTolerance(0.001); > del3D.BoundingTriangulationOff(); > > vtkDataSetMapper dataSetMapper=new vtkDataSetMapper(); > dataSetMapper.SetInput(del3D.GetOutput()); > //============================================================== > > vtkActor actor = new vtkActor(); > actor.SetMapper(dataSetMapper); > actor.GetProperty().SetColor(1,0,0); > > > > > vtkRenderer renderer = new vtkRenderer(); > vtkRenderWindow renderWindow = new vtkRenderWindow(); > renderWindow.AddRenderer(renderer); > > vtkRenderWindowInteractor iren = new > vtkRenderWindowInteractor(); > iren.SetRenderWindow(renderWindow); > > renderer.AddActor(actor); > renderer.SetBackground(0,0,0); > > renderWindow.SetSize(600, 600); > renderWindow.Render(); > iren.Initialize(); > renderWindow.Render(); > iren.Start(); > > > ==================================================================== > Here is my data set: > > x y z resistivity value > ==== ==== ===== ============ > ..... > 2 1 -0.25 118.741 > 3 1 -0.25 128.561 > 4 1 -0.25 99.534 > 5 1 -0.25 179.084 > 6 1 -0.25 100.552 > 7 1 -0.25 60.644 > 8 1 -0.25 128.533 > 9 1 -0.25 78.901 > ....... > > ==================================================================== > From nkwmailinglists at gmail.com Fri Dec 14 16:03:24 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Fri, 14 Dec 2007 15:03:24 -0600 Subject: [vtkusers] Re: How do I modify the interaction behavior for the vtkContourWidget? In-Reply-To: <44f773f50712141147r442808c4t3762a18fa9f36619@mail.gmail.com> References: <44f773f50712141147r442808c4t3762a18fa9f36619@mail.gmail.com> Message-ID: <44f773f50712141303p318dd48cwace9afea1e628fad@mail.gmail.com> Nothing beats replying to your own post! So I tried what it seems like I should be doing to redefine the event handling for the vtkContour Widget -- thusly: vtkWidgetEventTranslator *xlat = this->m_ContourWidget->GetEventTranslator(); xlat->SetTranslation(vtkCommand::KeyPressEvent, vtkEvent::ControlModifier, 101,1,NULL,vtkWidgetEvent::AddFinalPoint); xlat->SetTranslation(vtkCommand::NoEvent, vtkEvent::NoModifier, 47,1,NULL,vtkWidgetEvent::Delete); I was trying to do two things: 1) change the event binding of the AddFinalPoint event to Control-e (101 being decimal for ASCII e). 2) Turn off handling the 'delete point' behavior entirely. The documentation says any call to SetTranslation will override any previous call to SetTranslation. This appears not to be the case, or maybe I haven't yet figured out the magic incantation yet. From riechmann at ira.uka.de Fri Dec 14 16:51:27 2007 From: riechmann at ira.uka.de (Matthias Riechmann) Date: Fri, 14 Dec 2007 22:51:27 +0100 Subject: [vtkusers] cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib Message-ID: <4762FADF.8060909@ira.uka.de> Hi, I'm experiencing some difficulties trying to compile an application using VTK 5.0.3 and QVTK on MacOS X 10.5 (leopard). The linker gives the following message back to me: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib The origin seems to be in some changes between OS 10.4 and 10.5 and is already documented by apple (http://developer.apple.com/qa/qa2007/qa1567.html) including a workaround, but I don't know where in CMake I need to do the changes. Did anyone else have this problem and got it working? Matthias From nkwmailinglists at gmail.com Fri Dec 14 17:46:02 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Fri, 14 Dec 2007 16:46:02 -0600 Subject: [vtkusers] Filling a polygon in ImageData Message-ID: <44f773f50712141446w457bae5fs63c38f68d195fb5e@mail.gmail.com> I need to go from a collection of closed polygons each associate with a slice of an image volume, to an image volume defining a mask. In other words, for each slice in a volume, I want to set pixels to 1 if they're inside a polygon in the collection, and set them to zero if they're not. Suggestions? From jake_wang1013 at 163.com Fri Dec 14 21:14:44 2007 From: jake_wang1013 at 163.com (wells) Date: Sat, 15 Dec 2007 10:14:44 +0800 Subject: [vtkusers] Vtk 64-bit for cocoa Message-ID: Hi, I need 64-bit VTK for cocoa on Mac 10.5! can any one build success, may tell me how to configure and build. Thanks wells -------------- next part -------------- An HTML attachment was scrubbed... URL: From riechmann at ira.uka.de Sat Dec 15 05:43:11 2007 From: riechmann at ira.uka.de (Matthias Riechmann) Date: Sat, 15 Dec 2007 11:43:11 +0100 Subject: [vtkusers] update: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib In-Reply-To: <4762FADF.8060909@ira.uka.de> References: <4762FADF.8060909@ira.uka.de> Message-ID: <4763AFBF.7030809@ira.uka.de> Hi, I made some progress in narrowing the source of the error down: My project is divided into several executables and several libraries. Some of these libraries are already dependant on VTK and Qt. One executable (call it "A") is dependant of the project's libraries AND VTK and Qt. There I get the error mentioned below. The other executable (call it "B") is only dependant on VTK and QT, it compiles just fine. My guess: I'm linking my executable "A" to VTK and Qt twice: directly and indirectly via my own libraries. Is this a flaw in concept? In Windows and recent MacOS versions it worked out fine but with MacOS 10.5 the problems started. Matthias Matthias Riechmann schrieb: > Hi, > > I'm experiencing some difficulties trying to compile an application > using VTK 5.0.3 and QVTK on MacOS X 10.5 (leopard). The linker gives the > following message back to me: > > cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib > > The origin seems to be in some changes between OS 10.4 and 10.5 and is > already documented by apple > (http://developer.apple.com/qa/qa2007/qa1567.html) including a > workaround, but I don't know where in CMake I need to do the changes. > Did anyone else have this problem and got it working? > > > Matthias > _______________________________________________ > 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 From kei at gmx.ch Sat Dec 15 06:17:49 2007 From: kei at gmx.ch (Lam Ha Hoang) Date: Sat, 15 Dec 2007 12:17:49 +0100 Subject: [vtkusers] How to do a clean render-loop? Message-ID: <20071215111749.178190@gmx.net> Hello everyone I am having trouble with my render-loop. Since there is no interactivity with the render-window itself I would like to do it without a vtkRenderWindowInteractor (or is this a bad idea?). What I want to do is quite simple: I have a external tracking-device, which gives in the coordinates for a rendered object in real-time. My code looks like this: ren1 = vtkRenderer::New(); renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren1); ren1->AddActor(cubeActor); ren1->AddActor(sphereActor2); ren1->SetBackground(10, 10, 10); renWin->SetSize(300, 300); renWin->Render(); then comes the render-loop: while (isRunning) { vtkSphereSource *sphere2 = vtkSphereSource::New(); double theRotation = myRotation.rotating(); cubeActor->RotateX(theRotation); renWin->Render(); Sleep(10); } At least it works, but the problem is, that the render-window is always idle. Is there a cleaner way to do this? Thanks in advance Lam -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger From PeterMethfessel at gmx.de Sat Dec 15 06:47:23 2007 From: PeterMethfessel at gmx.de (PeterM) Date: Sat, 15 Dec 2007 12:47:23 +0100 Subject: [vtkusers] Does exist something like a vtk editor (for *.vtk Message-ID: <008201c83f10$429c3820$0b01a8c0@joker> Hi, i can just see the data array under information, but where can i chnage the values? and do you know how i can export or convert a *.wrl file with paraview as *.vtk. I see only the posibility to save the file as vtm. thx -------------- next part -------------- An HTML attachment was scrubbed... URL: From riechmann at ira.uka.de Sat Dec 15 07:42:01 2007 From: riechmann at ira.uka.de (Matthias Riechmann) Date: Sat, 15 Dec 2007 13:42:01 +0100 Subject: [vtkusers] solved: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib In-Reply-To: <4763AFBF.7030809@ira.uka.de> References: <4762FADF.8060909@ira.uka.de> <4763AFBF.7030809@ira.uka.de> Message-ID: <4763CB99.7070803@ira.uka.de> Found it: downgraded to 32-bit, now it works Matthias Riechmann schrieb: > Hi, > > I made some progress in narrowing the source of the error down: My > project is divided into several executables and several libraries. Some > of these libraries are already dependant on VTK and Qt. One executable > (call it "A") is dependant of the project's libraries AND VTK and Qt. > There I get the error mentioned below. The other executable (call it > "B") is only dependant on VTK and QT, it compiles just fine. > My guess: I'm linking my executable "A" to VTK and Qt twice: directly > and indirectly via my own libraries. Is this a flaw in concept? In > Windows and recent MacOS versions it worked out fine but with MacOS 10.5 > the problems started. > > > Matthias > > > > > Matthias Riechmann schrieb: >> Hi, >> >> I'm experiencing some difficulties trying to compile an application >> using VTK 5.0.3 and QVTK on MacOS X 10.5 (leopard). The linker gives >> the following message back to me: >> >> cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib >> >> The origin seems to be in some changes between OS 10.4 and 10.5 and is >> already documented by apple >> (http://developer.apple.com/qa/qa2007/qa1567.html) including a >> workaround, but I don't know where in CMake I need to do the changes. >> Did anyone else have this problem and got it working? >> >> >> Matthias >> _______________________________________________ >> 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 > _______________________________________________ > 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 From karthik.krishnan at kitware.com Sat Dec 15 11:49:04 2007 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Sat, 15 Dec 2007 11:49:04 -0500 Subject: [vtkusers] Filling a polygon in ImageData In-Reply-To: <44f773f50712141446w457bae5fs63c38f68d195fb5e@mail.gmail.com> References: <44f773f50712141446w457bae5fs63c38f68d195fb5e@mail.gmail.com> Message-ID: <9ddb27260712150849p4cbcba96w129dc7d087692608@mail.gmail.com> Kent: As I understand, you are essentially trying to rasterize a bunch of closed polylines... Here are two ways to do this..... (wrong and right) --------- 1. Use vtkPolyDataToImageStencil to generate vtkImageStencilData. And then using vtkImageStencil to generate the rasterized image See Examples/GUI/Tcl/ImageTracerWidget.tcl On a side note, I have on occassions noted numerical issues with the rasterization done by vtkPolyDataToImageStencil, when you have sharp edges in your polyline, which leads to a streaking effect along an axis.. (see http://www.vtk.org/pipermail/vtkusers/2007-May/091141.html) That said, this is the quick and dirty approach. The right one (and the faster one is below).... OBBTrees are an overkill for something as simple as rasterization. And the ImageTracerWidget example in VTK misdirects a lot of people into using this method. -------- 2. vtkPolygon::PointInPolygon will do the job for you... Just get the bounds of the closed polyline. For every pixel in your image that lies within those bounds, check if its world coordinates are within the Polygon and you are done. The method is very fast. It just checks the number of times a ray starting at the point intersects the polygon. If it intersects it, even number of times, it is outside, odd implies inside. In reality, it throws a bunch of rays in different directions, and does a voting, to overcome numerical issues that might arize when one or more rays fall exactly on an edge of the polygon. ---------- Good luck :) -- Karthik Krishnan R&D Engineer, Kitware Inc. PS: If you choose to use method (2), It would be great if you could wrap it into a VTK filter (deriving from vtkImageAlgorithm) and contribite it :) On 12/14/07, kent williams wrote: > > I need to go from a collection of closed polygons each associate with > a slice of an image volume, to an image volume defining a mask. > > In other words, for each slice in a volume, I want to set pixels to 1 > if they're inside a polygon in the collection, and set them to zero if > they're not. > > Suggestions? > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From PeterMethfessel at gmx.de Sun Dec 16 10:03:51 2007 From: PeterMethfessel at gmx.de (PeterM) Date: Sun, 16 Dec 2007 16:03:51 +0100 Subject: [vtkusers] Edit Data-array (paraview) Message-ID: <008f01c83ff4$deb4a550$0b01a8c0@joker> Hi, is there anybody who knows how you can edit the data of vtk files. I tried to use paraview. i can see the data arrays under the information panel but delete or rename is not possible. i can see every data in the spreadsheet but there is editing not possible, too. What do i wrong? peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From master at iaas.msu.ru Sun Dec 16 10:09:01 2007 From: master at iaas.msu.ru (Michail Vidiassov) Date: Sun, 16 Dec 2007 18:09:01 +0300 (MSK) Subject: [vtkusers] PDF 3D support In-Reply-To: <000001c838cf$c099a6a0$fc03a8c0@csiaas.msu.ru> References: <000001c838cf$c099a6a0$fc03a8c0@csiaas.msu.ru> Message-ID: Dear All, Since nobody replied to my previous post, I have to do that myself > did anybody try to make VTK produce U3D files > (a 3D model file format Adobe Reader is player for)? What is it: for those of you interested in seeing how 3-d PDF can be used in the physical sciences you might like to see this paper. http://astronomy.swin.edu.au/s2plot/3dpdf/ While the subject area of the paper is 3-d PDF for astronomy publishing, it could equally be applied to many other areas of science. VTK examples in pdf: http://www.iaas.msu.ru/tmp/Medical.pdf http://www.iaas.msu.ru/tmp/cells.pdf How can it be achieved: Using the available tools: vtk exoprts to some 3d model file, say VRML -> Acrobat 3D (Windows) converts it to u3d format and embedes in pdf. Acrobat 3D Toolkit allows limited edition of the model. The other tool is Deep Exploration (older version of it is distributed as Acrobat 3D Toolkit), it can produce u3d and, optionally, make a standalone pdf with it. Acrobat (not 3D, say on Mac) and pdfLaTeX with movie15 package can embed a ready U3D file into pdf. The drawbacks are having to shell out money go through Windows GUI every time you regenerate the model and retypeset the document do with the VRML import limitations. My proposal: > Intel provides a (free&open) compiler that makes U3D files > from text scene description files it seems to be easy to export to. It really turned out to be not that hard to convert vtkVRMLExporter into vtkIDTFExporter (even given my zero knowledge of vtk and C programming skills acquired in USSR high school long ago). The bad news were that Intel soft turned out to be hard to compile on Mac. Intel distributes Win32 binaries and promises of portability to Linux and Mac, 32 and 64 bit, big- and low-endian machines. The results of the pipeline (running on Mac OS 10.5) file.cxx -> vtkIDTFExporter -> file.idtf -> IDTFconverter -> file.u3d -> pdflatex -> file.pdf you can see at http://www.iaas.msu.ru/tmp/Medical.pdf http://www.iaas.msu.ru/tmp/cells.pdf Ergo: > On the positive side - is there public interest in having such an exporter written? As far as I can see my converter serves my needs, if someone who wants more turns up I am ready to share the code and discuss improvements (like textures support, optimisation, Intel software packaging). Please, do not ask me about making u3d directly (without IDTF stage). U3D file format spec has parts numbered as (ta-da-dA-DA) 9.6.1.3.4.9.3.2.1.3! It seems really deep to me. And yet the doc does not cover it all, if the Intel support answers a question the usual answer is "Use the Source, Luke"! Sincerely, Michail From freiman at cs.huji.ac.il Sun Dec 16 10:14:56 2007 From: freiman at cs.huji.ac.il (Moti Freiman) Date: Sun, 16 Dec 2007 17:14:56 +0200 Subject: [vtkusers] 3d plugin for powerpoint Message-ID: <39718fc40712160714g70aec52ck9bcd0ba8ae9cdfd0@mail.gmail.com> Hi, I'm serach for a tool that allow me to show 3D ploygonnal models saved as vtk files (vtkPolydata), inside from power point. Does any one have any clue? Thanks, Moti -- __ Moti Freiman, Ph.D Student. Medical Image Processing and Computer-Assisted Surgery Laboratory. School of Computer Science and Engineering. The Hebrew University of Jerusalem Givat Ram, Jerusalem 91904, Israel Phone: +(972)-2-658-5371 (laboratory) WWW site: http://www.cs.huji.ac.il/~freiman -------------- next part -------------- An HTML attachment was scrubbed... URL: From master at iaas.msu.ru Sun Dec 16 11:26:12 2007 From: master at iaas.msu.ru (Michail Vidiassov) Date: Sun, 16 Dec 2007 19:26:12 +0300 (MSK) Subject: [vtkusers] 3d plugin for powerpoint In-Reply-To: <39718fc40712160714g70aec52ck9bcd0ba8ae9cdfd0@mail.gmail.com> References: <39718fc40712160714g70aec52ck9bcd0ba8ae9cdfd0@mail.gmail.com> Message-ID: Dear Moti, On Sun, 16 Dec 2007, Moti Freiman wrote: > I'm serach for a tool that allow me to show 3D ploygonnal models saved as > vtk files (vtkPolydata), inside from power point. http://www.parallelgraphics.com/products/cortona/ Cortona? VRML Client is a fast and highly interactive Web3D viewer that is ideal for viewing 3D models on the Web. Cortona VRML Client works as a VRML plug-in for popular Internet browsers (Internet Explorer, Netscape Browser, Mozilla, Mozilla Firefox, etc.) and office applications (Microsoft PowerPoint, Microsoft Word, etc). Cortona VRML Client can be used for free in the following cases: Personal use Academic use* I did not try it myself. Adobe Acrobat 3D can embed VRML and other CAD files into PowerPoint. And you have to export to VRML or somethig, of course. Just my 0,02 RUR. Sincerely, Michail From nkwmailinglists at gmail.com Sun Dec 16 13:35:03 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Sun, 16 Dec 2007 12:35:03 -0600 Subject: [vtkusers] Filling a polygon in ImageData In-Reply-To: <9ddb27260712150849p4cbcba96w129dc7d087692608@mail.gmail.com> References: <44f773f50712141446w457bae5fs63c38f68d195fb5e@mail.gmail.com> <9ddb27260712150849p4cbcba96w129dc7d087692608@mail.gmail.com> Message-ID: <44f773f50712161035y2b7c091cy85497f173b627d64@mail.gmail.com> Method 2 sounds like the ticket. I wasn't aware that there was such a method. Sometimes Doxygen man pages make it hard to see the trees for the forest. It would also be great if people were more diligent about internally documenting their code so that the Doxygen pages would be more useful! I will look at what's involved in writing this as a vtk filter. My natural inclination is to just write a function that takes a list of the polydata that my 3D Contour tracer generates, and return a binary image giving the mask described by the contours. I'm actually saving and restoring the control points of the contour, which means that I will have to instantiate a vtkContourRepresentation, push in the control points, and then call vtkContourRepresentation::GetContourRepresentationAsPolyData() to get a polygon approximating the spline path around the contour. That was actually the function I called to get the control points the first time through, until I noticed that it was returning a lot more points beyond the control points I'd picked! Then there's the issue that what I get from the vtkContourRepresentation is a vtkCellArray, and not a vtkPolygon. I can see how to instantiate a vtkPolygon and add vertices from the points in the vtkPolyData, but it seems like that transformation should already be in VTK. My last experience with trying to navigate through the vtkCell data structures didn't end well, for reasons I never figured out. On Dec 15, 2007 10:49 AM, Karthik Krishnan wrote: > 2. vtkPolygon::PointInPolygon will do the job for you... > > Just get the bounds of the closed polyline. For every pixel in your image > that lies within those bounds, check if its world coordinates are within the > Polygon and you are done. > > The method is very fast. It just checks the number of times a ray starting > at the point intersects the polygon. If it intersects it, even number of > times, it is outside, odd implies inside. In reality, it throws a bunch of > rays in different directions, and does a voting, to overcome numerical > issues that might arize when one or more rays fall exactly on an edge of the > polygon. > > > PS: If you choose to use method (2), It would be great if you could wrap it > into a VTK filter (deriving from vtkImageAlgorithm) and contribite it :) > From ken.urish at gmail.com Mon Dec 17 00:31:48 2007 From: ken.urish at gmail.com (Ken Urish) Date: Mon, 17 Dec 2007 00:31:48 -0500 Subject: [vtkusers] Error compiling VTK Examples/GUI/Qt Message-ID: Hey Having trouble getting vtk/qt examples to compile. I am getting a number of error messages mostly along the lines of: 1. "....GUI\Qt\SimpleView\uiSimpleView3.ui(233): error C2501: 'Index' : missing storage-class or type specifiers" 2. "....GUI\Qt\SimpleView\uiSimpleView3.ui(41): error C2332: 'class' : missing tag name" In general the *.ui file is making the compiler very angry. For the GUI\Qt\Events, I am getting a number of errors based around not knowing what "Form1" is: 1. "....GUI\Qt\Events\main.cxx(36): error C2065: 'Form1' : undeclared identifier" Any thoughts? I really appreciate the help. CMake 2.4 QT 3.2 VTK 5.0 MSVS 7 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lars.Hegenbart at hs.fzk.de Mon Dec 17 03:14:29 2007 From: Lars.Hegenbart at hs.fzk.de (Hegenbart, Lars) Date: Mon, 17 Dec 2007 09:14:29 +0100 Subject: AW: [vtkusers] Error compiling VTK Examples/GUI/Qt In-Reply-To: References: Message-ID: <6E8393C1E1BCF54D80B631100307D522DBFAB8@FZKMSX4.ka.fzk.de> Ken, .ui-files need to be treated by the uic3.exe or uic.exe, not the MS-compiler. I am not familiar with Qt3.2, since I am using Qt4. When processing ui-files, "ui_classname"-files are generated. They probably contain your missing "Form1". Best regards Lars ________________________________ Von: vtkusers-bounces+lars.hegenbart=hs.fzk.de at vtk.org [mailto:vtkusers-bounces+lars.hegenbart=hs.fzk.de at vtk.org] Im Auftrag von Ken Urish Gesendet: Montag, 17. Dezember 2007 06:32 An: vtkusers at vtk.org Betreff: [vtkusers] Error compiling VTK Examples/GUI/Qt Hey Having trouble getting vtk/qt examples to compile. I am getting a number of error messages mostly along the lines of: 1. "....GUI\Qt\SimpleView\uiSimpleView3.ui(233): error C2501: 'Index' : missing storage-class or type specifiers" 2. "....GUI\Qt\SimpleView\uiSimpleView3.ui(41): error C2332: 'class' : missing tag name" In general the *.ui file is making the compiler very angry. For the GUI\Qt\Events, I am getting a number of errors based around not knowing what "Form1" is: 1. "....GUI\Qt\Events\main.cxx(36): error C2065: 'Form1' : undeclared identifier" Any thoughts? I really appreciate the help. CMake 2.4 QT 3.2 VTK 5.0 MSVS 7 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.meidinger at pps-ag.ch Mon Dec 17 05:47:47 2007 From: marc.meidinger at pps-ag.ch (Marc Meidinger) Date: Mon, 17 Dec 2007 11:47:47 +0100 Subject: [vtkusers] Need help urgently. Stereo 3D page flipping doesnt work -> SetStereoTypeToCrystalEyes() Message-ID: <000001c8409a$43ae0b40$200aa8c0@WS3> Dear developpers I'm stuck in a project having big problems to get the Stereo3D (page flipping) working. Need your help. I'm developping a stereographic application. For displaying the models I have bought the eMagnin Z800 (which supports page flipping input). Page flipping means that the window output is alternating between left and right eye. As I read I must use the SetStereoTypeToCrystalEyes() function to activate page flipping (even if i dont have the crytal eyes), but it doesnt work. I can only see the model as usual, no stereo 3D. Code: ... oRenWin.SetStereoCapableWindow(1); oRenWin.StereoRenderOn(); oRenWin.SetStereoTypeToCrystalEyes(); oRenWin.StereoUpdate(); ... But when I set the stereo type to anaglyph mode, the model is displayed correctly for each eye (in red and cyan). Code: ... oRenWin.SetStereoCapableWindow(1); oRenWin.StereoRenderOn(); oRenWin.SetStereoTypeToAnaglyph(); oRenWin.StereoUpdate(); ... Is there a problem with the SetStereoTypeToCrystalEyes() function or is my code implementation bad? Is there even an other function to use to activate page flipping? I've tried it in C++ and Java but it didnt do the page flipping. System specs: VTK Version 5.0.3 OS: Win XP Implementation Language: Java Graphic card: Nvidia Geforce 6600 (Stereo 3D capable) I would be very glad to get any help. Or maybe someone of you has already implemented something like this... anything would be great! Best Regards Marc Meidinger -------------- next part -------------- An HTML attachment was scrubbed... URL: From jake_wang1013 at 163.com Mon Dec 17 06:13:10 2007 From: jake_wang1013 at 163.com (wells) Date: Mon, 17 Dec 2007 19:13:10 +0800 Subject: [vtkusers] Help! Help! Help! Help! Help! Message-ID: Dear All I need 64-bit VTK for cocoa on Mac 10.5! can any one build success, may tell me how to configure and build. Thanks wells -------------- next part -------------- An HTML attachment was scrubbed... URL: From mongwarrior at yahoo.com Mon Dec 17 07:38:38 2007 From: mongwarrior at yahoo.com (John Ownsoul) Date: Mon, 17 Dec 2007 04:38:38 -0800 (PST) Subject: [vtkusers] Problem with vtkDelaunay3D In-Reply-To: <4762DF90.6010501@apollo.sr.unh.edu> References: <14336625.post@talk.nabble.com> <4762DF90.6010501@apollo.sr.unh.edu> Message-ID: <14370271.post@talk.nabble.com> sorry, but i couldn't understand what i must to do, could you explain how i can do this with vtk in detail? santana wrote: > > You are seeing the surface of your object, I think what you are after is > either some sort of volume rendering, or to simply slice or sample the > data on the interior of your dataset. You can for instance slice the > data with a plane, or a spherical shell and visualize the resulting > surfaces. You might take a look at using paraview to try various > techniques before you bother coding anything up yourself. > > > John Ownsoul wrote: >> Dear Fellows, >> >> I want to visualize 3D geographical data with VTK. I use x,y,z >> resistivity >> values. I use vtkDelaunay3D and visualize it, but when zooming into the >> object i saw that it is not a solid object. The object is hollow. How can >> i >> visualize a solid object, could you help me. Thanks for everything... >> >> >> http://www.nabble.com/file/p14336625/1.jpg >> http://www.nabble.com/file/p14336625/2.jpg >> >> >> >> Here is my code: >> >> while (dis.available() != 0) >> { >> qwe++; >> temp=dis.readLine(); >> >> processLine(temp); >> System.out.println("x : " + x + ", y : " + y + ", z : " + z + ", >> resist. : " + r ); >> id1=points.InsertNextPoint(x,y,z); >> //if(r>20 && r<80) r=100; >> >> if (r>max) max=r; >> if (r> >> r=1-r/500; >> >> values.InsertValue(qwe,r); >> ids.InsertNextId(qwe); >> cell.InsertNextCell(id1); >> } >> fis.close(); >> bis.close(); >> dis.close(); >> System.out.println(qwe); >> System.out.println("min " + min); >> System.out.println("max " + max); >> >> vtkPolyData polyData = new vtkPolyData(); >> polyData.SetPoints(points); >> polyData.SetVerts(cell); >> polyData.GetPointData().SetScalars(values); >> >> >> //============================================================== >> vtkDelaunay3D del3D = new vtkDelaunay3D(); >> del3D.SetInput(polyData); >> del3D.SetTolerance(0.001); >> del3D.BoundingTriangulationOff(); >> >> vtkDataSetMapper dataSetMapper=new vtkDataSetMapper(); >> dataSetMapper.SetInput(del3D.GetOutput()); >> //============================================================== >> >> vtkActor actor = new vtkActor(); >> actor.SetMapper(dataSetMapper); >> actor.GetProperty().SetColor(1,0,0); >> >> >> >> >> vtkRenderer renderer = new vtkRenderer(); >> vtkRenderWindow renderWindow = new vtkRenderWindow(); >> renderWindow.AddRenderer(renderer); >> >> vtkRenderWindowInteractor iren = new >> vtkRenderWindowInteractor(); >> iren.SetRenderWindow(renderWindow); >> >> renderer.AddActor(actor); >> renderer.SetBackground(0,0,0); >> >> renderWindow.SetSize(600, 600); >> renderWindow.Render(); >> iren.Initialize(); >> renderWindow.Render(); >> iren.Start(); >> >> >> ==================================================================== >> Here is my data set: >> >> x y z resistivity value >> ==== ==== ===== ============ >> ..... >> 2 1 -0.25 118.741 >> 3 1 -0.25 128.561 >> 4 1 -0.25 99.534 >> 5 1 -0.25 179.084 >> 6 1 -0.25 100.552 >> 7 1 -0.25 60.644 >> 8 1 -0.25 128.533 >> 9 1 -0.25 78.901 >> ....... >> >> ==================================================================== >> > > _______________________________________________ > 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 > > > ----- > http://quaoar.sr.unh.edu > -- View this message in context: http://www.nabble.com/Problem-with-vtkDelaunay3D-tp14336625p14370271.html Sent from the VTK - Users mailing list archive at Nabble.com. From mathieu.malaterre at gmail.com Mon Dec 17 07:43:55 2007 From: mathieu.malaterre at gmail.com (Mathieu Malaterre) Date: Mon, 17 Dec 2007 13:43:55 +0100 Subject: [vtkusers] PDF 3D support In-Reply-To: References: <000001c838cf$c099a6a0$fc03a8c0@csiaas.msu.ru> Message-ID: Hi Michail, That looks pretty cool ! did you check with the gl2ps team if anyone had started working on it. Since gl2ps is well integrated in VTK it will be easy to simply upgrade gl2ps to get 3D PDF support in VTK. 2 cents, -Mathieu On Dec 16, 2007 4:09 PM, Michail Vidiassov wrote: > Dear All, > > Since nobody replied to my previous post, I have to do that myself > > > did anybody try to make VTK produce U3D files > > (a 3D model file format Adobe Reader is player for)? > > What is it: > > for those of you interested in seeing how 3-d PDF can be used in the > physical sciences you might like to see this paper. > http://astronomy.swin.edu.au/s2plot/3dpdf/ > While the subject area of the paper is 3-d PDF for astronomy publishing, > it could equally be applied to many other areas of science. > > VTK examples in pdf: > > http://www.iaas.msu.ru/tmp/Medical.pdf > http://www.iaas.msu.ru/tmp/cells.pdf > > How can it be achieved: > > Using the available tools: > > vtk exoprts to some 3d model file, say VRML -> > Acrobat 3D (Windows) converts it to u3d format and embedes in pdf. > Acrobat 3D Toolkit allows limited edition of the model. > > The other tool is Deep Exploration (older version of it is distributed as > Acrobat 3D Toolkit), it can produce u3d and, optionally, make a standalone > pdf with it. > Acrobat (not 3D, say on Mac) and pdfLaTeX with movie15 package can embed > a ready U3D file into pdf. > > The drawbacks are having to > shell out money > go through Windows GUI every time you regenerate the model and retypeset the document > do with the VRML import limitations. > > My proposal: > > > Intel provides a (free&open) compiler that makes U3D files > > from text scene description files it seems to be easy to export to. > > It really turned out to be not that hard to convert vtkVRMLExporter into > vtkIDTFExporter (even given my zero knowledge of vtk and C programming > skills acquired in USSR high school long ago). > The bad news were that Intel soft turned out to be hard to compile on Mac. > Intel distributes Win32 binaries and promises of portability to Linux and > Mac, 32 and 64 bit, big- and low-endian machines. > > The results of the pipeline (running on Mac OS 10.5) > file.cxx -> vtkIDTFExporter -> file.idtf -> IDTFconverter -> file.u3d -> > pdflatex -> file.pdf > you can see at > > http://www.iaas.msu.ru/tmp/Medical.pdf > http://www.iaas.msu.ru/tmp/cells.pdf > > Ergo: > > > On the positive side - is there public interest in having such an exporter written? > > As far as I can see my converter serves my needs, > if someone who wants more turns up I am ready to share the code and discuss improvements > (like textures support, optimisation, Intel software packaging). > > Please, do not ask me about making u3d directly (without IDTF stage). > U3D file format spec has parts numbered as (ta-da-dA-DA) 9.6.1.3.4.9.3.2.1.3! > It seems really deep to me. And yet the doc does not cover it all, if the > Intel support answers a question the usual answer is "Use the Source, Luke"! > > > Sincerely, Michail > _______________________________________________ > 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 From divyarathore at gmail.com Mon Dec 17 07:50:27 2007 From: divyarathore at gmail.com (Divya Rathore) Date: Mon, 17 Dec 2007 18:20:27 +0530 Subject: [vtkusers] PDF 3D support In-Reply-To: References: <000001c838cf$c099a6a0$fc03a8c0@csiaas.msu.ru> Message-ID: <592df0170712170450w31dd6dcdj9deaa1f4a3dcde45@mail.gmail.com> On Dec 16, 2007 8:39 PM, Michail Vidiassov wrote: > > VTK examples in pdf: > > http://www.iaas.msu.ru/tmp/Medical.pdf > http://www.iaas.msu.ru/tmp/cells.pdf Acrobat Reader V 7.0.0 gives pasrsing error. What version is to be used? > > > Sincerely, Michail > -- "The difference between school and life? In school, you're taught a lesson and then given a test. In life, you're given a test that teaches you a lesson." -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Mon Dec 17 09:54:38 2007 From: sean at rogue-research.com (Sean McBride) Date: Mon, 17 Dec 2007 09:54:38 -0500 Subject: [vtkusers] Vtk 64-bit for cocoa In-Reply-To: References: Message-ID: <20071217145438.1335753132@smtp10.bellnet.ca> On 12/15/07 10:14 AM, wells said: >I need 64-bit VTK for cocoa on Mac 10.5! can any one build success, may tell >me how to configure and build. What have you tried and what have you read? The FAQ has info on this, and so does the wiki. Start here: PS: Don't repost messages with subjects like "Help Help Help Help", -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From mcoursolle at rogue-research.com Mon Dec 17 09:55:17 2007 From: mcoursolle at rogue-research.com (Mathieu Coursolle) Date: Mon, 17 Dec 2007 09:55:17 -0500 Subject: [vtkusers] Vtk 64-bit for cocoa In-Reply-To: References: Message-ID: <20071217145517.141548554@smtp10.bellnet.ca> You may want to take a look at this: It is a universal 64 bits build under 10.5 using cocoa. Mathieu >Hi, >I need 64-bit VTK for cocoa on Mac 10.5! can any one build success, may >tell me how to configure and build. >Thanks >???? >????wells From master at iaas.msu.ru Mon Dec 17 10:35:12 2007 From: master at iaas.msu.ru (Michail Vidiassov) Date: Mon, 17 Dec 2007 18:35:12 +0300 (MSK) Subject: [vtkusers] PDF 3D support In-Reply-To: <592df0170712170450w31dd6dcdj9deaa1f4a3dcde45@mail.gmail.com> References: <000001c838cf$c099a6a0$fc03a8c0@csiaas.msu.ru> <592df0170712170450w31dd6dcdj9deaa1f4a3dcde45@mail.gmail.com> Message-ID: Dear Divya, On Mon, 17 Dec 2007, Divya Rathore wrote: > On Dec 16, 2007 8:39 PM, Michail Vidiassov wrote: >> VTK examples in pdf: >> http://www.iaas.msu.ru/tmp/Medical.pdf >> http://www.iaas.msu.ru/tmp/cells.pdf > > Acrobat Reader V 7.0.0 gives pasrsing error. What version is to be used? The newer the better, the details (versions and settings) are at http://astronomy.swin.edu.au/s2plot/3dpdf/ I use Reader 8.1.1 on an Intel Mac in both Mac OS and Windows XP. Sincerely, Michail PS. The 3D models support appeared in Reader 7, but there are some known compatibility issues. From nkwmailinglists at gmail.com Mon Dec 17 11:12:14 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Mon, 17 Dec 2007 10:12:14 -0600 Subject: [vtkusers] Using vtkpython with X11 on headless Mac OS X systems In-Reply-To: <3D0767A4-036D-45C2-9260-EF6A92890916@nasa.gov> References: <3D0767A4-036D-45C2-9260-EF6A92890916@nasa.gov> Message-ID: <44f773f50712170812y77ed980bt4a7f78ca38e1e25e@mail.gmail.com> If you want to use VTK Python, I believe you need to also build X11 versions of TCL and TK. Otherwise you'll get Carbon versions of TK, and they really don't play nice with X11. As for whether running OSX headless is the culprit -- don't know. We don't use Python at all but we do use Tcl/TK with remote display from OS X just fine. From rilinca at cg.tuwien.ac.at Mon Dec 17 11:22:23 2007 From: rilinca at cg.tuwien.ac.at (Ilinca, Radu) Date: Mon, 17 Dec 2007 17:22:23 +0100 Subject: [vtkusers] vtk and visual studio Message-ID: <4766A23F.8090209@cg.tuwien.ac.at> I am wroking with Win XP, VS 2005, VTK 5. I ran the examples. Worked. THen I created a new project , respecting the settings of the demo. The copy-pasted code worked except for the 5th example from the tutorial. I get the following: vtk.obj : error LNK2019: unresolved external symbol "public: static class vtkBoxWidget * __cdecl vtkBoxWidget::New(void)" (?New at vtkBoxWidget@@SAPAV1 at XZ) referenced in function _main E:\ETH - Z\vtk\VTK\Debug\vtk.exe : fatal error LNK1120: 1 unresolved externals Who can help? Radu. From domi at vision.ee.ethz.ch Mon Dec 17 11:30:27 2007 From: domi at vision.ee.ethz.ch (Dominik Szczerba) Date: Mon, 17 Dec 2007 17:30:27 +0100 Subject: [vtkusers] vtk and visual studio In-Reply-To: <4766A23F.8090209@cg.tuwien.ac.at> References: <4766A23F.8090209@cg.tuwien.ac.at> Message-ID: <200712171730.32212.domi@vision.ee.ethz.ch> Looks to me you are not linking to one of the needed dlls, probably vtkWidgets. -- Dominik On Monday 17 December 2007 17.22:23 Ilinca, Radu wrote: > I am wroking with Win XP, VS 2005, VTK 5. I ran the examples. Worked. > THen I created a new project , respecting the settings of the demo. The > copy-pasted code worked except for the 5th example from the tutorial. I > get the following: > > vtk.obj : error LNK2019: unresolved external symbol "public: static > class vtkBoxWidget * __cdecl vtkBoxWidget::New(void)" > (?New at vtkBoxWidget@@SAPAV1 at XZ) referenced in function _main > E:\ETH - Z\vtk\VTK\Debug\vtk.exe : fatal error LNK1120: 1 unresolved > externals > > > Who can help? > > Radu. > > _______________________________________________ > 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 -- Dominik Szczerba, Ph.D. Computer Vision Lab CH-8092 Zurich http://www.vision.ee.ethz.ch/~domi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From William.T.Bridgman at nasa.gov Mon Dec 17 11:33:17 2007 From: William.T.Bridgman at nasa.gov (W.T. Bridgman) Date: Mon, 17 Dec 2007 11:33:17 -0500 Subject: [vtkusers] Using vtkpython with X11 on headless Mac OS X systems In-Reply-To: <44f773f50712170812y77ed980bt4a7f78ca38e1e25e@mail.gmail.com> References: <3D0767A4-036D-45C2-9260-EF6A92890916@nasa.gov> <44f773f50712170812y77ed980bt4a7f78ca38e1e25e@mail.gmail.com> Message-ID: <8BCE0D00-920A-4C3A-BBA3-CD43C6E3ECFA@nasa.gov> I have found some references indicating that I will also need to rebuild the python tkinter module so that it will use X11 Tk as well. X11 Tcl/Tk seems to be part of the TclTkAquaBI package. I understand they are installing an X11 option in the build script for python 2.5 but I'm still at Python 2.4 so I'll have to find a way to hack it. Thanks, Tom On Dec 17, 2007, at 11:12 AM, kent williams wrote: > If you want to use VTK Python, I believe you need to also build X11 > versions of TCL and TK. Otherwise you'll get Carbon versions of TK, > and they really don't play nice with X11. > > As for whether running OSX headless is the culprit -- don't know. We > don't use Python at all but we do use Tcl/TK with remote display from > OS X just fine. **** Please Update my e-mail address to my *NEW* OneNASA address below **** -- Dr. William T."Tom" Bridgman Scientific Visualization Studio Global Science & Technology, Inc. NASA/Goddard Space Flight Center Email: William.T.Bridgman at nasa.gov Code 610.3 Phone: 301-286-1346 Greenbelt, MD 20771 FAX: 301-286-1634 http://svs.gsfc.nasa.gov/ From m.weigert at fz-juelich.de Mon Dec 17 12:20:49 2007 From: m.weigert at fz-juelich.de (Markus Weigert) Date: Mon, 17 Dec 2007 18:20:49 +0100 Subject: [vtkusers] Re: Problem with vtkDelauney3D Message-ID: <200712171820.49934.m.weigert@fz-juelich.de> Hi John, the output of Delaunay3D is unstructured grid. You have to convert it to vtkPolyData. I think you can use vtkGeometryFilter for this purpose. Regards, Markus > John Ownsoul wrote: >> Dear Fellows, >> >> I want to visualize 3D geographical data with VTK. I use x,y,z >> resistivity >> values. I use vtkDelaunay3D and visualize it, but when zooming into the >> object i saw that it is not a solid object. The object is hollow. How can >> i >> visualize a solid object, could you help me. Thanks for everything... >> >> >> http://www.nabble.com/file/p14336625/1.jpg >> http://www.nabble.com/file/p14336625/2.jpg >> ------------------------------------------------------------------- ------------------------------------------------------------------- Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzende des Aufsichtsrats: MinDirig'in Baerbel Brumme-Bothe Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), Dr. Ulrich Krafft (stellv. Vorsitzender), Dr. Sebastian M. Schmidt ------------------------------------------------------------------- ------------------------------------------------------------------- From pppebay at sandia.gov Mon Dec 17 13:21:43 2007 From: pppebay at sandia.gov (Philippe P. Pebay) Date: Mon, 17 Dec 2007 10:21:43 -0800 Subject: [vtkusers] polynomial solvers Message-ID: <4766BE37.90102@sandia.gov> Hello As part of the vtkMath -> vtkPolynomialSolvers transfer, I am soon going to move all remaining polynomial solvers from vtkMath to vtkPolynomialSolvers, i.e., the solvers for degree 3 and below (I have already moved the others a few months ago). Subsequently, I will update all calls to these solvers in VTK. Regarding other applications that use these solvers, there is nothing to worry about: backwards compatibility will be preserved. However a deprecation warning will be issued upon each call, advising you to modify your code in order to replaced vtkMath:: with vtkPolynomialSolvers:: wherever appropriate. Again, you won't *have* to comply with this requirement -- for the moment. Please let me know if you have any comments. Thank you, Philippe Pebay -- Philippe P. Pebay Sandia National Laboratories http://www.ca.sandia.gov/crf/staff/staffPage.php?sid=pppebay From mongwarrior at yahoo.com Tue Dec 18 07:37:02 2007 From: mongwarrior at yahoo.com (John Ownsoul) Date: Tue, 18 Dec 2007 04:37:02 -0800 (PST) Subject: [vtkusers] Problem with vtkDelauney3D In-Reply-To: <200712171820.49934.m.weigert@fz-juelich.de> References: <200712171820.49934.m.weigert@fz-juelich.de> Message-ID: <14396168.post@talk.nabble.com> Hi, I can say that i am a beginner at vtk, so i couldn't understand what i must to do. Could you send me a sample code, or explain how to do that? Markus Weigert wrote: > > Hi John, > > the output of Delaunay3D is unstructured grid. > You have to convert it to vtkPolyData. > I think you can use vtkGeometryFilter for this purpose. > > Regards, > Markus > > > >> John Ownsoul wrote: >>> Dear Fellows, >>> >>> I want to visualize 3D geographical data with VTK. I use x,y,z >>> resistivity >>> values. I use vtkDelaunay3D and visualize it, but when zooming into the >>> object i saw that it is not a solid object. The object is hollow. How >>> can >>> i >>> visualize a solid object, could you help me. Thanks for everything... >>> >>> >>> http://www.nabble.com/file/p14336625/1.jpg >>> http://www.nabble.com/file/p14336625/2.jpg >>> > > > ------------------------------------------------------------------- > ------------------------------------------------------------------- > Forschungszentrum Juelich GmbH > 52425 Juelich > > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzende des Aufsichtsrats: MinDirig'in Baerbel Brumme-Bothe > Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), > Dr. Ulrich Krafft (stellv. Vorsitzender), Dr. Sebastian M. Schmidt > ------------------------------------------------------------------- > ------------------------------------------------------------------- > _______________________________________________ > 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 > > -- View this message in context: http://www.nabble.com/Re%3A-Problem-with-vtkDelauney3D-tp14380828p14396168.html Sent from the VTK - Users mailing list archive at Nabble.com. From sentinel5831 at yahoo.gr Tue Dec 18 08:40:56 2007 From: sentinel5831 at yahoo.gr (Ioannis Pechlivanidis) Date: Tue, 18 Dec 2007 13:40:56 +0000 (GMT) Subject: [vtkusers] canot generate the vtkdll.dll file Message-ID: <61847.26688.qm@web26005.mail.ukl.yahoo.com> Hi, I'm interested in using an executable file which requires the file vtkdll.dll I have found some instructions in the internet which refer to an old version of vtk (e.g. v 2.1) and to how to generate the vtkdll.dll file with pcmaker.exe So I would like to somebody to send me the old version of vtk (2.x) and the file vtkdll.dll Thanx a lot... --------------------------------- ?????????????? Yahoo! ?????????? ?? ?????????? ???? ???? (spam); ?? Yahoo! Mail ???????? ??? ???????? ?????? ????????? ???? ??? ??????????? ????????? http://login.yahoo.com/config/mail?.intl=gr -------------- next part -------------- An HTML attachment was scrubbed... URL: From bensch at bwh.harvard.edu Tue Dec 18 10:11:23 2007 From: bensch at bwh.harvard.edu (Benjamin Grauer) Date: Tue, 18 Dec 2007 10:11:23 -0500 Subject: [vtkusers] Cuda based volume rendering integration into VTK and Slicer3 Message-ID: <4767E31B.4090306@bwh.harvard.edu> Greetings, I am working on the integration of a Cuda based volume rendering technique into VTK and as being new to VTK, I am overwhelmed by the huge amount of possibilities the API supports. Currently the code that is independent of VTK is pretty slim and you can take a look at it here: http://svn.orxonox.net/subprojects/volrenSample/ I also tried to integrate the code into VTK and Slicer3. You may find that code in my Slicer3 branche here: http://www.na-mic.org/svn/Slicer3/branches/cuda/Modules/VolumeRenderingCuda Here is the headers for the Cuda rendering algorithm out of CUDA_renderAlgo.h that I want to integrate into a VTK wrapper class: // initialize the size void CUDArenderAlgo_init(int sizeX, int sizeY, int sizeZ, int dsizeX, int dsizeY); // Load the data to the Cuda Device void CUDArenderAlgo_loadData(unsigned char* sourceData, int sizeX, int sizeY, int sizeZ); // Renders the Image and produces a 2D array of the output void CUDArenderAlgo_doRender(float* rotationMatrix, float* color, float* minmax, float* lightVec, int sizeX, int sizeY, int sizeZ, int dsizeX, int dsizeY, float dispX, float dispY, float dispZ, float voxelSizeX, float voxelSizeY, float voxelSizeZ, int minThreshold, int maxThreshold, int sliceDistance); // retrieves the rendered result in RAW data as Unsigned chars void CUDArenderAlgo_getResult(unsigned char** resultImagePointer, int dsizeX, int dsizeY); // frees all memory void CUDArenderAlgo_delete(); (from now on I will refer to the function names leaving the 'CUDArenderAlgo' away for instance _init) As I understand it from a VTK point of view, I need the following: 1. An imageDataReader to read Volume data as any kind of Volume Data 2. A Filter converting from the reader output to a cuda-able DataSet 3. A new vtkDataSet call it vtkCudaDataSet, where I will put my Volume Data used by the _init(), _loadData() and _delete() functions 4. A new vtkVolumeMapper that renders the scene using the lighting model, a prepared Z buffer, a camera position and the before mentioned DataSet to produce a image using the _doRender() function and the _getResult() function to acquire the produced data. * A vtkTexture and a Plane to render the result to 5. An actor that places the volume into the scene 5. Chain this pipeline together and attach it to a rendering window. Now, it would be very helpful for me, to know what classes I have derive from to get the above described behaviour. Also these points are not really clear to me: 1. How do I get the camera position of a rendering window? 2. How do I get the Lightning Information for the scene? 3. How do I display the texture planar to the viewing direction at the correct place in space? 4. Is there a simple way to test everything I am doing using VTK and one render window? I understand that these are a lot of questions, but any help is appreciated. Best Regards, Benjamin Grauer, Surgical Planing Laboratory , Brigham and Women's Hospital -------------- next part -------------- An HTML attachment was scrubbed... URL: From PeterMethfessel at gmx.de Tue Dec 18 12:13:06 2007 From: PeterMethfessel at gmx.de (PeterM) Date: Tue, 18 Dec 2007 18:13:06 +0100 Subject: [vtkusers] ParaView edit Data Array Message-ID: <004201c84199$420b07c0$0b01a8c0@joker> Hi, i just want to delete some data arrays but how? With the caculator i can creat new array, but how to delete the old, do anyone know the answere? Thx -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddarkzero at hotmail.com Tue Dec 18 12:49:43 2007 From: daviddarkzero at hotmail.com (Jose David Pfuturi Huisa) Date: Tue, 18 Dec 2007 18:49:43 +0100 Subject: FW: [vtkusers] vtkImageData python In-Reply-To: <475C7E10.4050908@sci.monash.edu.au> References: <475C7E10.4050908@sci.monash.edu.au> Message-ID: Hello Shakes I was very busy these days and i just tried to run the testing code but i couldn't run it. i got this mistake: File "F:\MisejemplosPython\miVtkImageData3.py", line 24, in ? blankImage.SetScalarComponentFromFloat(0,1, 1,0, 1.2)AttributeError: SetScalarComponentFromFloat this is the code: dim=256blankImage=vtkImageData()blankImage.SetScalarTypeToFloat()blankImage.SetDimensions(dim ,dim, 1)blankImage.SetOrigin(0,0,0)blankImage.AllocateScalars()print "Components",blankImage.GetNumberOfScalarComponents()blankImage.SetScalarComponentFromFloat(0,1, 1,0, 1.2) but when a i changed ScalarType and NumberOfScalar: blankImage.SetScalarTypeToUnsignedChar()blankImage.SetNumberOfScalarComponents(4) i saw this: http://img160.imageshack.us/my.php?image=proof1yo5.jpg http://img155.imageshack.us/my.php?image=proof2sd3.jpg With blanking=blankImage.GetPointData().GetScalars() blanking.SetComponent(i, 0, 1) i can paint each cell but only with black and white. I want to paint using RGB i am not expert and i need a example please. thanks in advance. Jose > Date: Mon, 10 Dec 2007 10:45:20 +1100> From: Shekhar.Chandra at sci.monash.edu.au> Subject: Re: [vtkusers] vtkImageData python> To: daviddarkzero at hotmail.com> CC: vtkusers at vtk.org> > Hi Jose,> > For the C++ API Docs:> > virtual float GetScalarComponentAsFloat (int x, int y, int z, int > component)> virtual void SetScalarComponentFromFloat (int x, int y, int z, int > component, float v)> virtual double GetScalarComponentAsDouble (int x, int y, int z, int > component)> virtual void SetScalarComponentFromDouble (int x, int y, int z, int > component, double v)> > Those will do what u want. U can also set the number of scalar > components and their type. Just check out the Doxygen API Doc. Hope that > helps.> > Cheers> Shakes> > Jose David Pfuturi Huisa wrote:> > Hello everybody> > I want to create an image with vtkImagedata, i saw an example using C++ > > code as follows:> > int x,y;> > vtkImageData *image;> > image=vtkImageData::New();> > image->SetDimensions(256,256,1);> > image->SetScalarTypeToFloat();> > image->AllocateScalars();> > float *ptr=static_cast(image->GetScalarPointer());> > for(y=0;y<256;++y)> > { for(x=0;x<256;++x)> > {*ptr++=10.0*sin(0.1*x)*sin(0.1*y);> > }> > }> > vtkImageViewer *viewer=vtkImageViewer::New();> > viewer->SetInput(image);> > viewer->SetColorWindow(20);> > viewer->SetColorLevel(0);> > viewer->Render();> > > > How could i do it using Python? i tried to do it but GetScalarPointer() > > returns a pointer and in c++ this pointer stores the scalar value each > > position but on Python i dont know how i can do it.> > image=vtkImageData()> > image.SetDimensions(256,256,1)> > image.SetOrigin(0,0,0)> > image.SetScalarTypeToUnsignedChar ()> > image.AllocateScalars ()> > ptr=data.GetScalarPointer()> > for y in range(0,256):> > for x in range(0,256):> > #?> > viewer=vtkImageViewer();> > viewer.SetInput(image);> > viewer.SetColorWindow(20);> > viewer.SetColorLevel(0);> > > > In *ptr++=10.0*sin(0.1*x)*sin(0.1*y) i suppose that it changes the pixel > > value, true?> > if not then, an image has pixels, and this pixels has a RGB value, How > > could i get this value (each pixel)?> > > > thanks a lot> > > > Jos?> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------> > Tecnolog?a, moda, motor, viajes,?suscr?bete a nuestros boletines para > > estar a la ?ltima MSN Newsletters > > > > > > > > ------------------------------------------------------------------------> > > > _______________________________________________> > 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> _________________________________________________________________ La vida de los famosos al desnudo en MSN Entretenimiento http://entretenimiento.es.msn.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Dec 18 13:19:05 2007 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 18 Dec 2007 13:19:05 -0500 Subject: [vtkusers] Setting global point IDs from Python In-Reply-To: <1863FFC2-C9C3-4C2F-9575-764F28F275AB@cs.duke.edu> References: <953FB10D-55DA-442B-9FBC-12F74869055F@cs.duke.edu> <1863FFC2-C9C3-4C2F-9575-764F28F275AB@cs.duke.edu> Message-ID: The vtkAssignAttribute class should let you do this. cheers Dave DeMarle On 12/13/07, Eric Monson wrote: > Hello, > > I'm using Python to build a vtkUnstructuredGrid and I need to manually > set the global point IDs (for some later plotting in ParaView). > > It doesn't seem to me, though, that the SetGlobalIds() method (for > vtkPointData or vtkDataSetAttributes) is directly accessible through > the VTK Python wrappers. > > Does anyone know how to set the global Id attribute on point data from > Python? (Maybe I'm just missing something obvious, but I'm pretty new > to both Python and VTK.) > > Thanks, > -Eric > > ----------------------------------------------------- > Eric E. Monson > Duke Visualization Technology Group > > > > _______________________________________________ > 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 > From lester at arctica1.wanadoo.co.uk Wed Dec 19 04:13:55 2007 From: lester at arctica1.wanadoo.co.uk (lester anderson) Date: Wed, 19 Dec 2007 10:13:55 +0100 (CET) Subject: [vtkusers] File format - netCDF to/from VTK Message-ID: <7019441.890421198055635466.JavaMail.www@wwinf3107> Hello I was wondering if it is possible to convert to or from netCDF format to VTK? The netCDF format is a fundamental part of Generic Mapping Tools (GMT) (http://gmt.soest.hawaii.edu/) and widely used in geophysics, so it would be useful to be able to load up single or multiple netCDF grids into VTK for use in volume rendering and generation of isosurfaces. Hopefully there are some ideas on this aspect. Thanks Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: From junyixia at ufl.edu Wed Dec 19 09:42:41 2007 From: junyixia at ufl.edu (Junyi Xia) Date: Wed, 19 Dec 2007 09:42:41 -0500 Subject: [vtkusers] How to do 3D surface reconstruction using 2D planar contours Message-ID: <47692DE1.50703@ufl.edu> Hi all, Is there any way to do a 3D surface reconstruction using several layers of 2D planar contours in VTK? Thanks. Junyi From nkwmailinglists at gmail.com Wed Dec 19 11:49:13 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Wed, 19 Dec 2007 10:49:13 -0600 Subject: [vtkusers] How to do 3D surface reconstruction using 2D planar contours In-Reply-To: <47692DE1.50703@ufl.edu> References: <47692DE1.50703@ufl.edu> Message-ID: <44f773f50712190849u2a5f6920v950f8a6f763ea042@mail.gmail.com> Hah. My next question! On Dec 19, 2007 8:42 AM, Junyi Xia wrote: > Hi all, > Is there any way to do a 3D surface reconstruction using several > layers of 2D planar contours in VTK? > > Thanks. > Junyi > _______________________________________________ > 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 > From msh at cmrl.wustl.edu Wed Dec 19 13:38:54 2007 From: msh at cmrl.wustl.edu (Hughes, Mike) Date: Wed, 19 Dec 2007 12:38:54 -0600 Subject: [vtkusers] newbie compile question Message-ID: I've just downloaded VTK and I'm trying to compile some of the example VTK code found in: ../VTK/VTK/Examples/GUI/Qt I cd to the directory above. It has the contents: CMakeCache.txt cmake_install.cmake Events Makefile CMakeFiles CMakeLists.txt ImageViewer SimpleView I type: ccmake . but I am not able to correctly set the vairable: DESIRED_QT_VERSION I have both have a standard Ubuntu "Gutsy" installation (which seems to have both qt 3 and 4 installed by default?) I've tried the following values for DESIRED_QT_VERSION: qt4, qt 4, Qt 4, Qt 4.0, Qt4, Qt4.0, 4, 4.0, 4.3.2 (afer looking in /usr/lib) I always get the same error when I try to configure: CMake was unable to find desired QT version: 4.3.2. Set advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE. Qt GUI library not found. Qt CORE library not found. CMake was unable to find desired QT version: 4.3.2. Set advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE. Qt GUI library not found. Qt CORE library not found. CMake Error: Error in cmake code at /home/msh/Documents/Research/SourceFiles/VTKStuff/VTK/VTK/Examples/GUI/Qt/Sim pleView/CMakeLists.txt:37: Unknown CMake command "QT4_WRAP_UI". I've looked in CMakeLists.txt, its contents are: SUBDIRS(ImageViewer SimpleView Events) which doesn't seem to tell me much. How do I correctly set this variable (I've also tried the values: qt3, qt 3, Qt 3, Qt 3.0, Qt3, Qt3.0, 3, 3.0)? -------------- next part -------------- An HTML attachment was scrubbed... URL: From imikejackson at gmail.com Wed Dec 19 14:28:15 2007 From: imikejackson at gmail.com (Mike Jackson) Date: Wed, 19 Dec 2007 14:28:15 -0500 Subject: [vtkusers] newbie compile question In-Reply-To: References: Message-ID: <0532206C-5308-46F4-96E2-DC0DB8A2B7FF@gmail.com> Ok.. Here is a better way to do this. Delete the CMakeCache.txt from your build directory. (The directory that you are trying to build the Qt related stuff in. NOW, in your .bash_profile (or equivalent) set the 'QTDIR' environment variable to the root of the Qt4 installation, so that if you were to use ${QTDIR}/bin/qmake , qmake would actually execute. Source the new .bash_profile. Now run ccmake and see if the proper Qt is picked up. -- Mike Jackson Senior Research Engineer Innovative Management & Technology Services On Dec 19, 2007, at 2:22 PM, Hughes, Mike wrote: > Thanks for the help. I tried both qmake and qmake-qt4 (I'm also a > QT newbie) in the QT_QMAKE_EXECUTABLE variable > I now get the error: > Multiple versions of QT found please set DESIRED_QT_VERSION > Multiple versions of QT found please set DESIRED_QT_VERSION > Multiple versions of QT found please set DESIRED_QT_VERSION > CMake Error: This project requires some variables to be set, > and cmake can not find them. > Please set the following variables: > QT_QT_LIBRARY (ADVANCED) > By the way here is what ccmake looks like for me (with > QT_QMAKE_EXECUTABLE set to qmake-qt4): > > > Page 1 of 1 > CMAKE_BACKWARDS_COMPATIBILITY 2.4 > CMAKE_BUILD_TYPE > CMAKE_INSTALL_PREFIX /usr/local > DESIRED_QT_VERSION > EXECUTABLE_OUTPUT_PATH > LIBRARY_OUTPUT_PATH > QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4 > VTK_DIR /usr/sbin/../lib/vtk-5.0 > > (I'm new to this list, so I'm not sure whether I should reply > directly to you, or the vtkuser list) > > > > > > CMAKE_BACKWARDS_COMPATIBILITY: For backwards compatibility, what > version of CMake commands and syntax should this version of CMake > allow. > Press [enter] to edit option CMake Version 2.4 - patch 7 > Press [c] to configure > Press [h] for help Press [q] to quit without generating > Press [t] to toggle advanced mode (Currently Off) > > > > From: Mike Jackson [mailto:imikejackson at gmail.com] > Sent: Wednesday, December 19, 2007 12:43 PM > To: Hughes, Mike > Subject: Re: [vtkusers] newbie compile question > > I would suggest using ccmake and finding the QT_QMAKE_EXECUTBLE > variable and setting that. Once that is set to the qmake > executable, then "configure" again and cmake should be able to find > everything that it needs. > > > -- > Mike Jackson Senior Research Engineer > Innovative Management & Technology Services > > > > On Dec 19, 2007, at 1:38 PM, Hughes, Mike wrote: > > I've just downloaded VTK and I'm trying to compile some of the > example VTK code found in: > > ../VTK/VTK/Examples/GUI/Qt > > I cd to the directory above. It has the contents: > CMakeCache.txt cmake_install.cmake Events Makefile > CMakeFiles CMakeLists.txt ImageViewer SimpleView > > I type: > ccmake . > > but I am not able to correctly set the vairable: > > DESIRED_QT_VERSION > > I have both have a standard Ubuntu "Gutsy" installation (which > seems to have both qt 3 and 4 installed by default?) > I've tried the following values for DESIRED_QT_VERSION: qt4, qt 4, > Qt 4, Qt 4.0, Qt4, Qt4.0, 4, 4.0, 4.3.2 (afer looking in /usr/lib) > > I always get the same error when I try to configure: > CMake was unable to find desired QT version: 4.3.2. Set > advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE. > Qt GUI library not found. > Qt CORE library not found. > CMake was unable to find desired QT version: 4.3.2. Set > advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE. > Qt GUI library not found. > Qt CORE library not found. > CMake Error: Error in cmake code at > /home/msh/Documents/Research/SourceFiles/VTKStuff/VTK/VTK/ > Examples/GUI/Qt/SimpleView/CMakeLists.txt:37: > Unknown CMake command "QT4_WRAP_UI". > > I've looked in CMakeLists.txt, its contents are: > > SUBDIRS(ImageViewer SimpleView Events) > > which doesn't seem to tell me much. > > How do I correctly set this variable (I've also tried the values: > qt3, qt 3, Qt 3, Qt 3.0, Qt3, Qt3.0, 3, 3.0)? > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tracy.hu at yahoo.com Wed Dec 19 15:19:50 2007 From: tracy.hu at yahoo.com (Tracy Hu) Date: Wed, 19 Dec 2007 12:19:50 -0800 (PST) Subject: [vtkusers] any way to paste to a single actor with pictures from multiple files? Message-ID: <911271.62716.qm@web45110.mail.sp1.yahoo.com> I have two jpeg files, I want to paste each of them onto different parts of a single actor. Is there a way to achieve this? Thanks a lot Tracy --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search. -------------- next part -------------- An HTML attachment was scrubbed... URL: From msh at cmrl.wustl.edu Wed Dec 19 16:38:57 2007 From: msh at cmrl.wustl.edu (Hughes, Mike) Date: Wed, 19 Dec 2007 15:38:57 -0600 Subject: [vtkusers] RE: newbie compile question -- SOLVED Message-ID: Thanks to Mike Jackson, for the suggestion that I check the values of qmake, moc, uis, and uic (and set them to the correct values if the fields are blank) On my system (Ubuntu "Gutsy") the correct values are: /usr/bin/moc /usr/bin/qmake /usr/bin/uic /usr/bin/uis Once these are set within ccmake, it generates a working Makefile that produces working executables for the QT examples. >I've just downloaded VTK and I'm trying to compile some of the example VTK code found in: > > ../VTK/VTK/Examples/GUI/Qt > >I cd to the directory above. It has the contents: > CMakeCache.txt cmake_install.cmake Events Makefile > CMakeFiles CMakeLists.txt ImageViewer SimpleView > >I type: > ccmake . > >but I am not able to correctly set the vairable: > > DESIRED_QT_VERSION > >I have both have a standard Ubuntu "Gutsy" installation (which seems to have both qt 3 and 4 installed by default?) >I've tried the following values for DESIRED_QT_VERSION: qt4, qt 4, Qt 4, Qt 4.0, Qt4, Qt4.0, 4, 4.0, 4.3.2 (afer looking in /usr/lib) > >I always get the same error when I try to configure: > CMake was unable to find desired QT version: 4.3.2. Set advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE. > Qt GUI library not found. > Qt CORE library not found. > CMake was unable to find desired QT version: 4.3.2. Set advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE. > Qt GUI library not found. > Qt CORE library not found. > CMake Error: Error in cmake code at > /home/msh/Documents/Research/SourceFiles/VTKStuff/VTK/VTK/Examples/GUI/Qt/Sim pleView/CMakeLists.txt:37: > Unknown CMake command "QT4_WRAP_UI". > >I've looked in CMakeLists.txt, its contents are: > > SUBDIRS(ImageViewer SimpleView Events) > >which doesn't seem to tell me much. > >How do I correctly set this variable (I've also tried the values: qt3, qt 3, Qt 3, Qt 3.0, Qt3, Qt3.0, 3, 3.0)? -------------- next part -------------- An HTML attachment was scrubbed... URL: From emonson at cs.duke.edu Wed Dec 19 17:23:34 2007 From: emonson at cs.duke.edu (Eric E. Monson) Date: Wed, 19 Dec 2007 17:23:34 -0500 Subject: [vtkusers] Setting global point IDs from Python In-Reply-To: References: <953FB10D-55DA-442B-9FBC-12F74869055F@cs.duke.edu> <1863FFC2-C9C3-4C2F-9575-764F28F275AB@cs.duke.edu> Message-ID: <2D0442F3-EEFA-48C7-BE3B-D5D45B26C274@cs.duke.edu> Hey Dave, Thanks for the reply. In trying to figure out how to take your advice I realized what my original problem had been: My installed version of VTK was 5.0.3, but I'd been looking at the documentation for the cvs 5.1.0 when I saw references to the SetGlobalIds() method in vtkPointData and vtkDataSetAttributes. It looks like 5.0.3 didn't have those methods defined, which is why I couldn't make them work in my program -- go figure! :) I appreciate the help. -Eric On Dec 18, 2007, at 1:19 PM, David E DeMarle wrote: > The vtkAssignAttribute class should let you do this. > cheers > Dave DeMarle > > > On 12/13/07, Eric Monson wrote: >> Hello, >> >> I'm using Python to build a vtkUnstructuredGrid and I need to >> manually >> set the global point IDs (for some later plotting in ParaView). >> >> It doesn't seem to me, though, that the SetGlobalIds() method (for >> vtkPointData or vtkDataSetAttributes) is directly accessible through >> the VTK Python wrappers. >> >> Does anyone know how to set the global Id attribute on point data >> from >> Python? (Maybe I'm just missing something obvious, but I'm pretty new >> to both Python and VTK.) >> >> Thanks, >> -Eric >> >> ----------------------------------------------------- >> Eric E. Monson >> Duke Visualization Technology Group >> >> >> >> _______________________________________________ >> 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 >> From gcubed.developer at yahoo.com Wed Dec 19 17:57:27 2007 From: gcubed.developer at yahoo.com (gcubed.developer at yahoo.com) Date: Wed, 19 Dec 2007 14:57:27 -0800 (PST) Subject: [vtkusers] File format - netCDF to/from VTK Message-ID: <275443.56171.qm@web63803.mail.re1.yahoo.com> Just such an open source application exists and has been in use by the ocean modeling community for years. Take a look at http://oceans11.lanl.gov/trac/GGG/wiki You may also go directly to the software site http://climate.lanl.gov/Software/ggg The EEE (a.k.a. e3) visual editor at the heart of GGG (a.k.a. g3) displays netCDF grids in 3D. Other tools in the g3 package generate and convert various formats. The latest version is available from the svn repository. It is current with VTK 5 and netCDF 3.6.1. g3 has been tested on SuSE Linux 10.0. People at Boulder have ported earlier versions to Mac. A researcher in Beijing has not yet reported total Mac success with the latest g3 version , but he did get all the tools to compile and run. I am responsible for the source code that you may be interested in. Please feel free to email any questions to the list, or to me personally. John Davis ----- Original Message ---- From: lester anderson To: vtkusers at vtk.org Sent: Wednesday, December 19, 2007 1:13:55 AM Subject: [vtkusers] File format - netCDF to/from VTK Hello I was wondering if it is possible to convert to or from netCDF format to VTK? The netCDF format is a fundamental part of Generic Mapping Tools (GMT) (http://gmt.soest.hawaii.edu/) and widely used in geophysics, so it would be useful to be able to load up single or multiple netCDF grids into VTK for use in volume rendering and generation of isosurfaces. Hopefully there are some ideas on this aspect. Thanks Lester -----Inline Attachment Follows----- _______________________________________________ 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 ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivyforgood at 126.com Wed Dec 19 21:48:22 2007 From: ivyforgood at 126.com (ivyforgood) Date: Thu, 20 Dec 2007 10:48:22 +0800 (CST) Subject: [vtkusers] label text's orientation Message-ID: <21547787.887911198118903000.JavaMail.coremail@bj126app37.126.com> Hi all, I'm working on labeling contours with vtk class vtkLabeledDataMapper, expecting one label enjoys one orientation according to the contour line trend, but it doesn't work. I'm looking forword to your good ideas. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lester at arctica1.wanadoo.co.uk Thu Dec 20 04:39:02 2007 From: lester at arctica1.wanadoo.co.uk (lester anderson) Date: Thu, 20 Dec 2007 10:39:02 +0100 (CET) Subject: [vtkusers] Re: File format - netCDF to/from VTK Message-ID: <9441408.446431198143542254.JavaMail.www@wwinf3003> Hi John Thanks for the info about e3/g3 - sounds useful. Unfortunately I work on windows and the code looks to be unix - is there a windows version of the software? If there was a way to port the netcdf-to-VTK /VTK-to-netcdf as a stand-alone converter, that would be great not sure how complicated that would be. Thanks Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: From anka at bic.mni.mcgill.ca Thu Dec 20 08:49:56 2007 From: anka at bic.mni.mcgill.ca (Anka Kochanowska) Date: Thu, 20 Dec 2007 08:49:56 -0500 Subject: [vtkusers] Error compiling VTK Examples/GUI/Qt In-Reply-To: References: Message-ID: <476A7304.8000506@bic.mni.mcgill.ca> Hi! Which patch of cmake version 2.4 are you using? I had similar problem starting from 2.4.5 I believe. Maybe this is your problem? It was caused by statements: IF(QT_WRAP_UI) QT_WRAP_UI( ... ) ENDIF(QT_WRAP_UI) QT_WRAP_UI is set by FindQt3.cmake (in cmake Modules directory). On all systems in our lab it fails, although uic is found so, we removed the condition. I sent a mail to cmake list, got one answer that it cannot be reproduced. Sorry if it is not helpful. Anka Ken Urish wrote: > Hey > > Having trouble getting vtk/qt examples to compile. I am getting a > number of error messages mostly along the lines of: > 1. "....GUI\Qt\SimpleView\uiSimpleView3.ui(233): error C2501: 'Index' > : missing storage-class or type specifiers" > 2. "....GUI\Qt\SimpleView\uiSimpleView3.ui(41): error C2332: 'class' : > missing tag name" > In general the *.ui file is making the compiler very angry. > > For the GUI\Qt\Events, I am getting a number of errors based around > not knowing what "Form1" is: > 1. "....GUI\Qt\Events\main.cxx(36): error C2065: 'Form1' : undeclared > identifier" > > Any thoughts? I really appreciate the help. > > CMake 2.4 QT 3.2 VTK 5.0 MSVS 7 > >------------------------------------------------------------------------ > >_______________________________________________ >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 > > From mueller.wu at gmail.com Thu Dec 20 09:14:25 2007 From: mueller.wu at gmail.com (www www) Date: Thu, 20 Dec 2007 15:14:25 +0100 Subject: [vtkusers] How to judge that in which triangle facet a point falls? Message-ID: <9ab88b530712200614w3d077fa1h5f1859296e4d209a@mail.gmail.com> Hi every, i have a problem: here is a stl file, measured from a surface, and another point( not in stl file) of the surface. How can i judge that in which triangle facet this point will fall? thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From massimo.ivani at mlsw.com Thu Dec 20 11:48:23 2007 From: massimo.ivani at mlsw.com (Massimo Ivani - Media Lab Ltd) Date: Thu, 20 Dec 2007 17:48:23 +0100 Subject: [vtkusers] 3D Filling Message-ID: <6herdu$fc2ina@ibs01.interbusiness.it> Dear Vtk Users, I'm not new in Vtk. I need to implement this functionality: I have medical images and I have to fill air region with 3D structures. For example if I have a CT scan of a head I want to fill nasal sinus (air) with a 3D structure (Polydata). Can you help me and show me the pipeline of filter to obtain that? Thank you in advance. Dr. Massimo Ivani Media Lab srl Ph. (+39) 0187517775 Fax (+39) 0187511833 massimo.ivani @mlsw.com www.mlsw.com www.implant3d.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Thu Dec 20 13:02:47 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Thu, 20 Dec 2007 12:02:47 -0600 Subject: [vtkusers] question about vtkPolygon -- what happens with degenerate polygons? Message-ID: <44f773f50712201002x545cc305u4926fe005e28c7d4@mail.gmail.com> According to the VTK Doxygen web page for vtkPolygon: "vtkPolygon is a concrete implementation of vtkCell to represent a 2D n-sided polygon. The polygons cannot have any internal holes, and cannot self-intersect. Define the polygon with n-points ordered in the counter- clockwise direction; do not repeat the last point." I understand some of the restrictions -- define your polygon backwards point order (clockwise) your polygon's normal faces the wrong way. vtkPolygon doesn't give you a way to add holes to a polygon. But the 'cannot self-intersect' rule -- this isn't actually enforced is it? If an application allows users (who obviously can't be trusted) a way to draw polygons, it's up to the application to check for self-intersecting polygons? Is there any code in VTK that can do this test? From gcubed.developer at yahoo.com Thu Dec 20 13:15:26 2007 From: gcubed.developer at yahoo.com (gcubed.developer at yahoo.com) Date: Thu, 20 Dec 2007 10:15:26 -0800 (PST) Subject: [vtkusers] Re: File format - netCDF to/from VTK Message-ID: <894592.65661.qm@web63815.mail.re1.yahoo.com> Before retiring in 2004, I also maintained this code on Windows with Visual Studio 6. There was nothing particularly unix-y about the code, just the details of the make system. The conversion procedures are straight-forward and easily extracted. However, they are not generalized for just any netCDF data you happen to have lying around. Also, they were not written to the VTK developer standards. I believe someone has begun to add netCDF routines to VTK, at least with the old netCDF interface. If you decide to go further with this, take a look at Kitware's free CMake for Windows. I'll be happy to answer questions about my source code. John ----- Original Message ---- From: lester anderson To: vtkusers at vtk.org Sent: Thursday, December 20, 2007 1:39:02 AM Subject: [vtkusers] Re: File format - netCDF to/from VTK Hi John Thanks for the info about e3/g3 - sounds useful. Unfortunately I work on windows and the code looks to be unix - is there a windows version of the software? If there was a way to port the netcdf-to-VTK /VTK-to-netcdf as a stand-alone converter, that would be great not sure how complicated that would be. Thanks Lester -----Inline Attachment Follows----- _______________________________________________ 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 ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Dec 21 08:43:32 2007 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 21 Dec 2007 08:43:32 -0500 Subject: [vtkusers] How to do 3D surface reconstruction using 2D planar contours In-Reply-To: <44f773f50712190849u2a5f6920v950f8a6f763ea042@mail.gmail.com> References: <47692DE1.50703@ufl.edu> <44f773f50712190849u2a5f6920v950f8a6f763ea042@mail.gmail.com> Message-ID: <4db4735c0712210543ld1d5b03j5c996db08b8ef490@mail.gmail.com> Junyi and Kent, Try, Graphics/vtkVoxelContoursToSurfaceFIlter http://www.vtk.org/doc/nightly/html/classvtkVoxelContoursToSurfaceFilter.html Bill On Dec 19, 2007 11:49 AM, kent williams wrote: > Hah. My next question! > > On Dec 19, 2007 8:42 AM, Junyi Xia wrote: > > Hi all, > > Is there any way to do a 3D surface reconstruction using several > > layers of 2D planar contours in VTK? > > > > Thanks. > > Junyi > > _______________________________________________ > > 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 > > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From karthik.krishnan at kitware.com Fri Dec 21 08:46:42 2007 From: karthik.krishnan at kitware.com (Karthik Krishnan) Date: Fri, 21 Dec 2007 08:46:42 -0500 Subject: [vtkusers] How to do 3D surface reconstruction using 2D planar contours In-Reply-To: <4db4735c0712210543ld1d5b03j5c996db08b8ef490@mail.gmail.com> References: <47692DE1.50703@ufl.edu> <44f773f50712190849u2a5f6920v950f8a6f763ea042@mail.gmail.com> <4db4735c0712210543ld1d5b03j5c996db08b8ef490@mail.gmail.com> Message-ID: <9ddb27260712210546l1b76e49dub2acbef122c32a0e@mail.gmail.com> Junyi/Kent: Have you tried checked if the vtkRuledSurfaceFilter applies to your needs. We've used to reconstruct surfaces from stacks of 2D contours drawn on a sequence of slices.... bye -- karthik On 12/21/07, Bill Lorensen wrote: > > Junyi and Kent, > > Try, > Graphics/vtkVoxelContoursToSurfaceFIlter > > http://www.vtk.org/doc/nightly/html/classvtkVoxelContoursToSurfaceFilter.html > > Bill > > On Dec 19, 2007 11:49 AM, kent williams wrote: > > > Hah. My next question! > > > > On Dec 19, 2007 8:42 AM, Junyi Xia wrote: > > > Hi all, > > > Is there any way to do a 3D surface reconstruction using > > several > > > layers of 2D planar contours in VTK? > > > > > > Thanks. > > > Junyi > > > _______________________________________________ > > > 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 > > > > > _______________________________________________ > > 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 > > > > > _______________________________________________ > 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 > > -- Karthik Krishnan R&D Engineer, Kitware Inc. Ph: 518 371 3971 x119 518 698 3045 (cell) Fax: 518 371 3971 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nkwmailinglists at gmail.com Fri Dec 21 09:53:08 2007 From: nkwmailinglists at gmail.com (kent williams) Date: Fri, 21 Dec 2007 08:53:08 -0600 Subject: [vtkusers] How to do 3D surface reconstruction using 2D planar contours In-Reply-To: <9ddb27260712210546l1b76e49dub2acbef122c32a0e@mail.gmail.com> References: <47692DE1.50703@ufl.edu> <44f773f50712190849u2a5f6920v950f8a6f763ea042@mail.gmail.com> <4db4735c0712210543ld1d5b03j5c996db08b8ef490@mail.gmail.com> <9ddb27260712210546l1b76e49dub2acbef122c32a0e@mail.gmail.com> Message-ID: <44f773f50712210653vf5e063cg92e3526b3d6134b6@mail.gmail.com> Thanks a lot for the suggestions. Since VTK is constantly changing and is fairly oceanic in the variety of tools and techniques, it can be a bit overwhelming to tease out the particular solution you need. The willingness of the core developers to pitch in on questions like this is something I HIGHLY value, and is one of the things that makes this model of open development workable. Imagine asking Microsoft these questions ;-) From jcplatt at dsl.pipex.com Fri Dec 21 10:23:28 2007 From: jcplatt at dsl.pipex.com (John Platt) Date: Fri, 21 Dec 2007 15:23:28 -0000 Subject: [vtkusers] vtkAxesActor - axis labels not shown unless interact with scene Message-ID: <001501c843e5$7097afa0$0100a8c0@pacsys4> Hi, I wondered if anyone has the problem of the axis text on vtkAxesActor not being displayed until some interaction with the render window occurs. I am running VTK 5.0.3, Qt 4.3.1, Win XP. Many thanks, John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hengha1999 at 163.com Sat Dec 22 01:11:00 2007 From: hengha1999 at 163.com (hengha1999) Date: Sat, 22 Dec 2007 14:11:00 +0800 (CST) Subject: [vtkusers] axial question, paraview-like small axial on the left-bottom Message-ID: <749295552.761151198303860649.JavaMail.coremail@bj163app93.163.com> hi,everybody, you must have seen the small axial on the left bottom cornor of the view, I wonder how to achieve this effect. Please tell me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hebrev at gmail.com Sat Dec 22 02:40:30 2007 From: hebrev at gmail.com (Brian Gee Chacko) Date: Sat, 22 Dec 2007 13:10:30 +0530 Subject: [vtkusers] Debug error Message-ID: <27ca73ef0712212340i74dbdfffo57ab9ab3da47b68@mail.gmail.com> Hi guys, i have come across this error while executing a simple project file through VTK. The source code consists of the same as in VTK 5.0\Examples\Tutorials\Step1\Cxx\Cone.cxx Though the exe file gets generated this is the following error message i am getting "Debug error ! Program... Module: File:i386\chkesp.c Line: 42 The value of the ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention" Could someone help me out with this error message? Regards Brian Gee Chacko -------------- next part -------------- An HTML attachment was scrubbed... URL: From subhas_vtk at yahoo.com Sat Dec 22 05:47:47 2007 From: subhas_vtk at yahoo.com (Subhas Hati) Date: Sat, 22 Dec 2007 02:47:47 -0800 (PST) Subject: [vtkusers] Store a BMP image in a uchar array Message-ID: <691967.19197.qm@web45911.mail.sp1.yahoo.com> Hi I am a novice to VTK. I am able to read a VTK File and able to display through imageActor. May I know how to store the bmp image content in a uchar array. Please find below my code. Regards Subhas vtkBMPReader *bmpReader = vtkBMPReader::New(); bmpReader->SetFileName("/home/subhas/software/VTK/MyExamples/masonry.bmp"); bmpReader->Update(); vtkImageActor *imageActor = vtkImageActor::New(); imageActor->SetInput( bmpReader->GetOutput() ); vtkImageData *imageData = imageActor->GetInput(); vtkUnsignedCharArray *array = vtkUnsignedCharArray::New(); ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping From david.cole at kitware.com Sat Dec 22 09:58:12 2007 From: david.cole at kitware.com (David Cole) Date: Sat, 22 Dec 2007 09:58:12 -0500 Subject: [vtkusers] Debug error In-Reply-To: <27ca73ef0712212340i74dbdfffo57ab9ab3da47b68@mail.gmail.com> References: <27ca73ef0712212340i74dbdfffo57ab9ab3da47b68@mail.gmail.com> Message-ID: You probably have another version of VTK dlls in your PATH and they are being loaded instead of the ones you think are being loaded... (At least, incorrect versions/builds of dlls is what usually cause this error in my experience...) HTH, David On 12/22/07, Brian Gee Chacko wrote: > > Hi guys, > i have come across this error while executing a simple project file > through VTK. The source code consists of the same as in > VTK 5.0\Examples\Tutorials\Step1\Cxx\Cone.cxx > > Though the exe file gets generated this is the following error message i > am getting > "Debug error ! > Program... > Module: > File:i386\chkesp.c > Line: 42 > The value of the ESP was not properly saved across a function call. This > is usually a result of calling a function declared with one calling > convention with a function pointer declared with a different calling > convention" > > Could someone help me out with this error message? > > Regards > Brian Gee Chacko > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From master at iaas.msu.ru Wed Dec 26 03:31:36 2007 From: master at iaas.msu.ru (Michail Vidiassov) Date: Wed, 26 Dec 2007 11:31:36 +0300 (MSK) Subject: [vtkusers] vtkVectorText beyond ASCII Message-ID: Dear All, are there anywhere around any patches to VTK to get more characters in vtkVectorText (say Cyrillic)? On the other hand, is there any demand for fixing and extending vector text support in vtk? May be I miss something and vtkVectorText is in its present sore state only because it is superseded by something superior? On the other hand, VTK uses FTGL intenally to render bitmap fonts on the screen. But FTGL can make polygon fonts too. It must be easy enough to hack FTGL to make a polygon set for VTK, instead of feeding triangles to OpenGL directly. But again - why was not it done aleady? Sincerely, Michail From mailsgetlost at web.de Wed Dec 26 06:21:11 2007 From: mailsgetlost at web.de (Martin Baumann) Date: Wed, 26 Dec 2007 12:21:11 +0100 Subject: [vtkusers] Zoom a vtkActor2d object Message-ID: <47723927.7090707@web.de> Hi, I am creating a xy-plot using vtkXYPlotActor. I would like the plot to fit just into the render window. But by default the plot is way too small and a lot of image space is lost. To this end I tried to change properties in the active camera didn't change a thing. So my question: How can I get the plot to fit into the render window? Regards, Martin From domi at vision.ee.ethz.ch Wed Dec 26 07:22:18 2007 From: domi at vision.ee.ethz.ch (Dominik Szczerba) Date: Wed, 26 Dec 2007 13:22:18 +0100 Subject: [vtkusers] Filling a polygon in ImageData In-Reply-To: <44f773f50712141446w457bae5fs63c38f68d195fb5e@mail.gmail.com> References: <44f773f50712141446w457bae5fs63c38f68d195fb5e@mail.gmail.com> Message-ID: <200712261322.23799.domi@vision.ee.ethz.ch> You need to extract a polygon by vtkContourFilter and test all the points in a plane for inside or outside. You could BTW do it right away in 3D (by extracting a polygonal surface) -- Dominik On Friday 14 December 2007 23.46:02 kent williams wrote: > I need to go from a collection of closed polygons each associate with > a slice of an image volume, to an image volume defining a mask. > > In other words, for each slice in a volume, I want to set pixels to 1 > if they're inside a polygon in the collection, and set them to zero if > they're not. > > Suggestions? > _______________________________________________ > 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 -- Dominik Szczerba, Ph.D. Computer Vision Lab CH-8092 Zurich http://www.vision.ee.ethz.ch/~domi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: From florysf at gmail.com Wed Dec 26 07:26:39 2007 From: florysf at gmail.com (flory) Date: Wed, 26 Dec 2007 04:26:39 -0800 (PST) Subject: [vtkusers] Modify and save scenes in VTK Message-ID: <14501566.post@talk.nabble.com> Hello, I am new to VTK. I want to use it in Java for visualizing some scenes (.obj, .3ds,...), modifying and saving them. I was able to import the scenes(using readers and importers), to visualize and to interact with them(using vtkRender and vtkRenderWindow) . But I have problems with modifying and saving the scenes. Has someone tried this? If so I would appreciate if you could give me some help. -- View this message in context: http://www.nabble.com/Modify-and-save-scenes-in-VTK-tp14501566p14501566.html Sent from the VTK - Users mailing list archive at Nabble.com. From tavares at fe.up.pt Wed Dec 26 09:38:16 2007 From: tavares at fe.up.pt (=?iso-8859-1?Q?Jo=E3o_Manuel_R._S._Tavares?=) Date: Wed, 26 Dec 2007 14:38:16 -0000 Subject: [vtkusers] EUROMEDIA 2008, April 9-11, 2008, FEUP-University of Porto, Portugal, 2nd Call for Papers Message-ID: <061f01c847cc$f37bb390$da731ab0$@up.pt> ------------------------------------------------------------------------ ------------------------ (Apologies for cross-posting) EUROMEDIA 2008, APRIL 9-11, 2008, FEUP-UNIVERSITY OF PORTO, PORTUGAL http://www.eurosis.org/cms/?q=taxonomy/term/100 We would appreciate if you could distribute this information by your colleagues and co-workers. ------------------------------------------------------------------------ ------------------------ 2ND Call for Papers EUROMEDIA 2008 14TH ANNUAL MULTIMEDIA CONFERENCE WEBSITE http://www.eurosis.org/cms/?q=taxonomy/term/100 UNIVERSITY OF PORTO PORTUGAL APRIL 9-11, 2008 Organized by ETI Sponsored by EUROSIS Delft University of Technology Belgacom TTVI Ghent University DG-INFSO Dear Colleague, this is a reminder that the abstract submission deadline for EUROMEDIA 2008 is next January 20. As a reminder also please find enclosed the list of the conference topics: [] WEBTEC * Internet Viewers and Programs * Visual Programming Languages * 3D Web Programs * Video and Audio Streaming on the Web * AI on the Web * Software for Web-based Business Applications [] MEDIATEC * Multimedia Techniques and Telecom * Multimedia Authoring Tools and Software * Multimedia Building Blocks [] COMTEC * Telecommunications Technologies * Networks * Network Security * Mobile Communications * TV Technology * QoS [] APTEC * Telematics Consumer Applications * Cooperative Consumer Application * Tele-Education * Integrated Enterprise Software and Groupware * Telemedicine * Ubiquitous Computing Applications * Embedded Systems and Future Product Market Combinations * Multimodal communication [] ETEC * Tele-X and E-Commerce * Knowledge Management and E-Mobility Special Tracks: [] Knowledge Management and e-Mobility [] In-Car Applications [] Facial Recognition or Non Verbal Communication [] Virtual Reality 2.0 Applications Special Workshops: [] Medical Imaging Systems In recent years, extensive research has been performed to develop more and more efficient and powerful medical imaging systems. Such systems are crucial for medical specialists, allowing a deeper analysis and to understand what is going inside the human body, and therefore they play an essential role for adequate medical diagnosis and treatments. To accomplish efficient and powerful medical imaging systems, many research works have being done in many domains, like the ones related with medical image devices, signal processing, image processing and analysis, biomechanical simulation and data visualization. The main goal of the Workshop ?Medical Imaging Systems? is to bring together researchers involved in the related domains, in order to set the major lines of development for the near future. Therefore, the proposed Workshop will consist of researchers representing various fields related to Medical Devices, Signal Processing, Computational Vision, Computer Graphics, Computational Mechanics, Scientific Visualization, Mathematics and Medical Imaging. The Workshop endeavors to contribute to obtain better solutions for more efficient and powerful medical imaging systems, and attempts to establish a bridge between clinicians and researchers from these diverse fields. The proposed Workshop will cover topics related with medical imaging systems, such as: ? image acquisition ? signal processing ? image processing and analysis ? modelling and simulation ? computer aided diagnosis ? surgery, therapy, and treatment ? computational bioimaging and visualization ? software development ? virtual reality ? telemedicine systems and their applications [] D-TV Scope: In contrast to traditional TV DTV is a telecommunication system for broadcasting and receiving moving pictures and sound by means of digital signals. It uses digitally compressed modulation data, which requires decoding by a specially designed television set or a standard receiver (set-top box) as well as via PC-TV based on ADLS (VDSL). Digital Television has several advantages regarding technically as well as content and programme related aspects. One of the most significant is the use of a smaller channel bandwidth. This frees up space for more digital channels, other non-television services such as pay-multimedia services and the generation of new revenue models based on interactive advertisement and marketing features. Furthermore there are special services such as multicasting (more than one programme on the same channel), electronic programme guides and interactivity providing a wider range of application. Accordingly within the last year a growing up of specialised digital TV channels (Special Interest Channels) has to be observed European wide. This new growing up stream is mainly characterised by the phenomena of merging television (TV) and information technology (IT) know how, methods and techniques. In this context the workshop targets to show up the development in both directions: the technically aspects as well as the content and programme issues. It provides a presentation and discussion platform for exchanging experiences made within the establishment as well as the maintenance of digital special interest channels. Main focus will be to point out the interdependencies and the mutual influences of technically streams and content respectively service related issues. Topics: * Broadband Television * Interactive Television * IPTV - Web-TV * DVB-H, DVB-T, DVB-S, DVB-C * MHP & Interactive Television * Set-Top-Boxes * Full Digital Production Chain Management * Digital-Video-Journalism * DMB (Digital Multimedia Broadcasting) * FreeTV & PayTV * Interactive Video * Interactive Advertising Formats * Event Oriented Interview Formats * Event Driven Program Schemes & Formats * Mobile Content * Cross-Format Content & Knowledge Pooling * Cross-Media Content Production & Distribution * Indexing and Retrieval of Digital Content * Semantically Enrichment of Digital Content * Security & Digital Rights Management (DRM) * Watermarking & Copyrights & Protection * Cross-platform productions on TV Media-Convergence * Peer-to-peer Grid TV Applications For more information on the workshops see: http://www.eurosis.org/cms/index.php?q=node/476 Conference Committee General Conference Chair Jo?o Manuel R. S. Tavares, FEUP, University of Porto, Porto, Portugal Renato Natal Jorge, FEUP, University of Porto, Porto, Portugal WEBTEC Programme Committee Sameh Abdel-Naby, University of Trento, Trento, Italy Dr. Paul Dowland, University of Plymouth, Plymouth, United Kingdom Dipl.-Inf. Steffen Harneit, CUTEC-Institute GmbH, Clausthal-Zellerfeld, Germany Ass. Prof. Qingping Lin, Nanyang Technological University, Singapore Prof. Dr. J?rn Loviscach, Hochschule Bremen, University of Applied Sciences, Bremen, Germany Assoc. Prof. Wenji Mao, Institute of Automation, Chinese Academy of Sciences, Beijing, P.R. China Lorenzo Motta, Ansaldo Segnalamento Ferroviaro s.p.a. Genova, Italy Dr. H. Joachim Nern, Aspasia Knowledge Systems, Dusseldorf, Germany Dr. Carlos E. Palau, Universidad Politecnica de Valencia, Valencia, Spain Prof. Paola Salomoni, Universita di Bologna, Bologna, Italy Dr. Elpida Tzafestas, National Technical University of Athens, Athens, Greece Dr. Matthew Warren, Deakin University Geelong, Victoria, Australia MEDIATEC Programme Committee Assoc. Prof. Vincent Charvillat, IRIT-ENSEEIHT, Toulouse cedex, France Dr. Fernando Boronat Segui, Universidad Politecnica de Valencia, Gran de Gandia, Spain Ignazio Infantino, ICAR-CNR, Palermo (PA), Italy PhD. Jens Mueller-Iden, University of M?nster, M?nster, Germany Dr. Ana Pajares, Universidad Politecnica de Valencia, Valencia, Spain Jehan Francois Paris, University of Houston, Houston, USA Prof. Marco Roccetti, Universita' di Bologna, Bologna, Italy Dr. Leon Rothkrantz, Delft University of Technology, Delft, The Netherlands Dr. Leonid Smalov, Coventry University, Coventry, United Kingdom Prof. Rik Van de Walle, Ghent University, Ghent, Belgium COMTEC Programme Committee Prof. Dr. Marwan Al-Akaidi, De Montfort University, Leicester, United Kingdom Boguslaw Butrylo, Bialystok Technical University, Bialystok, Poland Dr. Nathan Clarke, University of Plymouth, Plymouth, United Kingdom Dr. Steven Furnell, University of Plymouth, Plymouth, United Kingdom Prof. Chris Guy, The University of Reading, Reading, United Kingdom PhD Mohammad Riaz Moghal, Ali Ahmad Shah-University College of Engineering and Technology, Mirpur, Pakistan PhD Roberto Montemanni, IDSIA, Manno-Lugano, Switzerland Maria Papadaki, University of Plymouth, Plymouth, United Kingdom Ph. D. Oryal Tanir, Bell Canada, Montreal, Canada Ass. Prof. Vassilis Triantafillou, ?echnological Educational Institution of Messolonghi Applied, Greece APTEC Programme Committee Prof. Dr. J. Broeckhove, RUCA-UA, Antwerp, Belgium Dr. Juan Carlos Guerri Cebollada, Universidad Politecnica de Valencia, Valencia, Spain Hatice Gunes, University of Technology, Sydney (UTS), NSW Australia Carsten Magerkurth, SAP RESEARCH, St. Gallen, Switzerland Dr.ir. Johan Opsommer, Belgacom - BUS, Brussels, Belgium Prof. Matthias Rauterberg, Eindhoven University of Technology, Eindhoven, The Netherlands. Francisco Reinaldo, FEUP, University of Porto, Porto, Portugal Zasriati Azla Sabot, University College Jubail, Jubail Industrial City, Saudi Arabia Prof. Jeanne Schreurs. Hasselt University, Diepenbeek, Belgium Ass. Prof. Ramiro Vel?zquez, Universidad Panamericana, Aguascalientes, Mexico Dr. Charles van der Mast, Delft University of Technology, Delft, The Netherlands E-TEC Programme Committee Dr.Steven Furnell, University of Plymouth, Plymouth, United Kingdom Dr. Paul Dowland, University of Plymouth, Plymouth, United Kingdom Knowledge Management and E-Mobility Prof. Ricardo Chalmeta, Universidad Jaume I, Castellon, Spain Prof. Dr.-Ing. Stephan Kassel, University of Applied Sciences Zwickau, Germany Workshops Medical Imaging Systems General Chair Jo?o Manuel R. S. Tavares, FEUP, University of Porto, Porto, Portugal General Co-Chair Renato Natal Jorge, FEUP, University of Porto, Porto, Portugal International Programme Committee Alberto De Santis, Universit? degli Studi di Roma "La Sapienza", Italy Arrate Mu?oz Barrutia, University of Navarra, Spain Behnam Heidari, University College Dublin, Ireland Bernard Gosselin, Faculte Polytechnique de Mons, Belgium Chandrajit Bajaj, University of Texas, USA Christos E. Constantinou, Stanford University School of Medicine, USA Daniela Iacoviello, Universit? degli Studi di Roma "La Sapienza", Italy Dinggang Shen, University of Pennsylvania, USA Djemel Ziou, University of Sherbrooke, Canada Gerald Schaefer Aston University, United Kingdom Jo?o Krug Noronha, Dr. Krug Noronha Clinic, Portugal Jo?o Manuel R. S. Tavares, Faculty of Engineering of University of Porto, Portugal Jo?o Paulo Costeira, Instituto Superior T?cnico, Portugal Jorge M. G. Barbosa, Faculty of Engineering of University of Porto, Portugal Lyuba Alboul, Sheffield Hallam University, United Kingdom Manuel Gonz?lez Hidalgo, Balearic Islands University, Spain Maria Elizete Kunkel, Universit?t Ulm, Germany M?rio Forjaz Secca, Universidade Nova de Lisboa, Portugal Miguel Angel L?pez, Faculty University of Ciego de Avila, Cuba Miguel Velhote Correia, Faculty of Engineering of University of Porto, Portugal Patrick Dubois, Institut de Technologie M?dicale, France Reneta Barneva, State University of New York, USA Renato M. Natal Jorge, Faculty of Engineering of University of Porto, Portugal Sabina Tangaro, University of Bari, Italy Valentin Brimkov, State University of New York, USA Yongjie Zhan, Carnegie Mellon University, USA D-TV Workshop Dr. Hans-Joachim Nern, TTVI, Germany CORRESPONDENCE ADDRESS Philippe Geril Ghent University Faculty of Engineering Dept. of Industrial Management Technologiepark 803 B-9062 Ghent-Zwijnaarde, Belgium Tel: +32 9 2645509 Fax: + 32 9 2645824 Email: philippe.geril at eurosis.org -- Philippe Geril Tel: +32.9.264.55.09 EUROSIS -ETI Fax: +32.9.264.58.25 Ghent University E-mail: philippe.geril at eurosis.org Dept.of Industrial Mgmt. E-mail: pgeril at yahoo.co.uk Technologiepark 903 URL: http://www.eurosis.org Campus Ardoyen B-9052 Ghent-Zwijnaarde Belgium ********************************************************************* * Your Scientific information site on * * Computer Simulation - Concurrent Engineering - Multimedia- Games * * WWW.EUROSIS.ORG * ********************************************************************* From Ron.Chapman at rwdi.com Wed Dec 26 12:03:20 2007 From: Ron.Chapman at rwdi.com (Ron Chapman) Date: Wed, 26 Dec 2007 12:03:20 -0500 Subject: [vtkusers] Re: vtkusers Digest, Vol 44, Issue 24 (Out of Office) Message-ID: I have received your email but am currently out of the office until Jan 3. I will reply upon my return. ______________________________________________________________ Celebrating Excellence Since 1972. For more information, please visit www.rwdi.com/35th_anniversary/. Reputation Resources Results http://www.rwdi.com ______________________________________________________________ This communication is intended for the sole use of the party to whom it is addressed and may contain information that is privileged and/or confidential. Any other distribution, copying or disclosure is strictly prohibited. If you have received this e-mail in error, please notify us immediately by telephone and delete the message without retaining any hard or electronic copies of same. RWDI scans outgoing emails for viruses, but makes no warranty as to their absence in this email or attachments. From daviddarkzero at hotmail.com Wed Dec 26 13:00:23 2007 From: daviddarkzero at hotmail.com (Jose David Pfuturi Huisa) Date: Wed, 26 Dec 2007 19:00:23 +0100 Subject: [vtkusers] Store a BMP image in a uchar array In-Reply-To: <691967.19197.qm@web45911.mail.sp1.yahoo.com> References: <691967.19197.qm@web45911.mail.sp1.yahoo.com> Message-ID: Hello this example in python can likely help you: vtkUnsignedCharArray *array = vtkUnsignedCharArray::New(); array->SetVoidArray( data, size[0]*size[1]*size[2],1); imageData = vtklmageData::New(); imageData->GetPointData()->SetScalars(array) ; imageData->SetDimensions(size) ; imageData->SetScalarType(VTK_UNSIGNED_CHAR) ; imageData->SetSpacing(l.0, 1.0, 1.0 ); imageData->SetOrigin(0.0, 0.0, 0.0 ); > Date: Sat, 22 Dec 2007 02:47:47 -0800> From: subhas_vtk at yahoo.com> To: vtkusers at vtk.org> Subject: [vtkusers] Store a BMP image in a uchar array> > Hi> I am a novice to VTK. I am able to read a VTK> File and able to display through imageActor. May I> know how to store the bmp image content in a uchar> array.> Please find below my code. > > Regards> Subhas > > vtkBMPReader *bmpReader = vtkBMPReader::New();> bmpReader->SetFileName("/home/subhas/software/VTK/MyExamples/masonry.bmp");> bmpReader->Update();> > > > > > > vtkImageActor *imageActor = vtkImageActor::New();> imageActor->SetInput( bmpReader->GetOutput() );> > > vtkImageData *imageData = imageActor->GetInput();> > vtkUnsignedCharArray > *array = vtkUnsignedCharArray::New();> > > > > ____________________________________________________________________________________> Looking for last minute shopping deals? > Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping> > _______________________________________________> 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 _________________________________________________________________ Tecnolog?a, moda, motor, viajes,?suscr?bete a nuestros boletines para estar siempre a la ?ltima Guapos y guapas, clips musicales y estrenos de cine. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jake_wang1013 at 163.com Thu Dec 27 02:02:42 2007 From: jake_wang1013 at 163.com (wells) Date: Thu, 27 Dec 2007 15:02:42 +0800 Subject: [vtkusers] vtkMPEG2Encode Message-ID: HI I turn on VTK_USE_MPEG2_ENCODER , and how to configure vtkMPEG2Encode_INCLUDE_PATH and vtkMPEG2Encode_LIBRARIES. Thanks wells -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Thu Dec 27 08:05:50 2007 From: david.cole at kitware.com (David Cole) Date: Thu, 27 Dec 2007 08:05:50 -0500 Subject: [vtkusers] vtkMPEG2Encode In-Reply-To: References: Message-ID: >From the comments near VTK_USE_MPEG2_ENCODER in VTK/CMakeLists.txt : #----------------------------------------------------------------------------- # MPEG2 # # Portions of the mpeg2 library are patented. VTK does not enable linking to # this library by default so VTK can remain "patent free". Users who wish to # link in mpeg2 functionality must build that library separately and then # turn on VTK_USE_MPEG2_ENCODER when configuring VTK. After turning on # VTK_USE_MPEG2_ENCODER, you must also set the CMake variables # vtkMPEG2Encode_INCLUDE_PATH and vtkMPEG2Encode_LIBRARIES. # # To use the patented mpeg2 library, first build it, then set the following # CMake variables during the VTK configure step: # VTK_USE_MPEG2_ENCODER = ON # vtkMPEG2Encode_INCLUDE_PATH = /path/to/vtkmpeg2encode;/path/to/vtkmpeg2encode-bin # vtkMPEG2Encode_LIBRARIES = /path/to/vtkmpeg2encode-bin/vtkMPEG2Encode.lib # # Or using -D args on the cmake/ccmake command line: # -DVTK_USE_MPEG2_ENCODER:BOOL=ON # "-DvtkMPEG2Encode_INCLUDE_PATH:PATH=/path/to/vtkmpeg2encode;/path/to/vtkmpeg2encode-bin" # "-DvtkMPEG2Encode_LIBRARIES:STRING=/path/to/vtkmpeg2encode-bin/vtkMPEG2Encode.lib" # # You are solely responsible for any legal issues associated with using # patented code in your software. # HTH, David On 12/27/07, wells wrote: > > HI > I turn on VTK_USE_MPEG2_ENCODER , and how to configure > vtkMPEG2Encode_INCLUDE_PATH and vtkMPEG2Encode_LIBRARIES. Thanks > > wells > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cole at kitware.com Thu Dec 27 08:17:44 2007 From: david.cole at kitware.com (David Cole) Date: Thu, 27 Dec 2007 08:17:44 -0500 Subject: [vtkusers] vtkMPEG2Encode In-Reply-To: References: Message-ID: You can download the source tree for the MPEG2 library from this web page: http://www.vtk.org/get-software.php#addons Please keep any further discussion on the list so that all vtkusers may participate in and benefit from the discussion. HTH, David On 12/27/07, wells wrote: > > hi > vtkMPEG2Encode_LIBRARIES = /path/to/vtkmpeg2encode-bin/vtkMPEG2Encode.lib > How to build vtkMPEG2Encode.lib? When I turn on VTK_USE_MPEG2_ENCODER > ,there is something wrong with tests.The focus is vtkMPEG2Encode.lib > > Wells > > On 07-12-27 ??9:05, "David Cole" wrote: > > vtkMPEG2Encode_LIBRARIES = /path/to/vtkmpeg2encode-bin/vtkMPEG2Encode.lib > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlding at gmail.com Fri Dec 28 02:02:17 2007 From: carlding at gmail.com (Feng Ding) Date: Fri, 28 Dec 2007 15:02:17 +0800 Subject: [vtkusers] Insert new vertices into a mesh Message-ID: Dear list, I need to insert some new vertices into a polygonal mesh (vtkPolyData), which will lead to removing some old faces and adding new edges and faces to the original mesh. Are there any "standard" procedures I can follow to do this? Thanks! Best regards, DING Feng From vincent.gratsac at irisa.fr Fri Dec 28 06:18:19 2007 From: vincent.gratsac at irisa.fr (Vincent Gratsac) Date: Fri, 28 Dec 2007 12:18:19 +0100 Subject: [vtkusers] Display different views of same object In-Reply-To: References: Message-ID: <4774DB7B.4040102@irisa.fr> Hi vtk users, As Taro Trabish, I would like to link multiple views interactions, in order to move/zoom/rotate all views when interacting with one of them. I did not find answer to Taro's question... Did anyone find a good method to do something like this ? Have a nice day, Vincent -- Vincent Gratsac ---------------------------------------------------- Unit?/Projet VisAGeS U746 INSERM/INRIA/CNRS/U. de Rennes I IRISA Campus de Beaulieu, 35042 Rennes Cedex, France Ph: +33 (0) 2 23 23 49 20/ Fax: +33/0 2 99 84 71 71 email: Vincent.Gratsac at irisa.fr http://www.irisa.fr/visages/ ----------------------------------------------------- Taro Trabish a ?crit : > > Hi All, > I would like to view 4 views of the same object (e.g at different > angles) and would like all of them to update when I interact > (rotate/zoom/move) with any of them. e.g. if I rotate one of them, > I'd like the other 3 to rotate as well in their orientation. I > currently have the 4 views setup using the split container in .NET. I > have a renderer for each window..and I'm able to display the object in > all windows but the interactions in each window happen > independently... the other 3 windows don't update when I interact with > one of them. Is there some trick or best known method to do something > like this? > > Thanks > Taro > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From markww at gmail.com Fri Dec 28 09:49:46 2007 From: markww at gmail.com (Mark Wyszomierski) Date: Fri, 28 Dec 2007 09:49:46 -0500 Subject: [vtkusers] Display different views of same object In-Reply-To: <4774DB7B.4040102@irisa.fr> References: <4774DB7B.4040102@irisa.fr> Message-ID: Hi Vincent, I have an example of doing something similar here: http://devsample.org/index.php?option=com_content&task=view&id=36&Itemid=1 It sounds like that's what you want if I understand you correctly, Mark On Dec 28, 2007 6:18 AM, Vincent Gratsac wrote: > Hi vtk users, > > As Taro Trabish, I would like to link multiple views interactions, in order > to move/zoom/rotate all views when interacting with one of them. > > I did not find answer to Taro's question... > Did anyone find a good method to do something like this ? > > Have a nice day, > > Vincent > > -- > Vincent > Gratsac > ---------------------------------------------------- > Unit?/Projet > VisAGeS U746 > INSERM/INRIA/CNRS/U. de Rennes I > IRISA > Campus de Beaulieu, > 35042 Rennes Cedex, France > > Ph: +33 (0) 2 23 23 49 20/ Fax: +33/0 2 99 84 71 > 71 > email: > Vincent.Gratsac at irisa.fr > http://www.irisa.fr/visages/ > ----------------------------------------------------- > > Taro Trabish a ?crit : > > Hi All, > I would like to view 4 views of the same object (e.g at different angles) > and would like all of them to update when I interact (rotate/zoom/move) with > any of them. e.g. if I rotate one of them, I'd like the other 3 to rotate > as well in their orientation. I currently have the 4 views setup using the > split container in .NET. I have a renderer for each window..and I'm able to > display the object in all windows but the interactions in each window happen > independently... the other 3 windows don't update when I interact with one > of them. Is there some trick or best known method to do something like > this? > > Thanks > Taro > ________________________________ > > _______________________________________________ > 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 > > > > _______________________________________________ > 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 > > From tracy.hu at yahoo.com Fri Dec 28 20:28:37 2007 From: tracy.hu at yahoo.com (Tracy Hu) Date: Fri, 28 Dec 2007 17:28:37 -0800 (PST) Subject: [vtkusers] Point array with 3 components, only has 0 tuples but there are 4 points Message-ID: <25212.84287.qm@web45107.mail.sp1.yahoo.com> Hello, I'm trying to write a image filter, but I got this error: ERROR: In \vwdev\PC\Libraries\vtk44\src\Common\vtkDataSet.cxx, line 376 vtkImageData (02476728): Point array color array with 3 components, only has 0 tuples but there are 4 points do you have any idea? Below are my code: //------------main.cpp------------------- #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkInteractorStyleTrackballCamera.h" #include "vtkPoints.h" #include "vtkDataSetMapper.h" #include "vtkImageData.h" #include "vtkPointData.h" #include "CImageMerger.h" int main( int argc, char *argv[] ) { CImageMerger *reader = CImageMerger::New(); reader->Update(); cout <<"main: # of tuples in color array: " << reader->GetOutput()->GetPointData()->GetArray(0)->GetNumberOfTuples() <SetInput(reader->GetOutput()); vtkActor *actor = vtkActor::New(); actor->SetMapper(mapper); vtkRenderer* ren = vtkRenderer::New(); ren->AddActor(actor); ren->SetBackground(1, 1, 1); vtkRenderWindow* renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtkInteractorStyleTrackballCamera *style = vtkInteractorStyleTrackballCamera::New(); iren->SetInteractorStyle(style); renWin->SetSize(600,600); renWin->Render(); iren->Start(); style->Delete(); iren->Delete(); ren->Delete(); renWin->Delete(); actor->Delete(); mapper->Delete(); reader->Delete(); return 0; } //-------------CImageMerger.cpp-------------- #include "vtkFloatArray.h" #include "vtkPointData.h" #include "vtkObjectFactory.h" #include #include "vtkUnsignedCharArray.h" #include "vtkImageData.h" #include "CImageMerger.h" vtkCxxRevisionMacro(CImageMerger, "$Revision: 1.30 $"); vtkStandardNewMacro(CImageMerger); CImageMerger::CImageMerger():vtkImageSource() {} CImageMerger::~CImageMerger() {} void CImageMerger::ExecuteData(vtkDataObject*) { this->GetOutput()->SetDimensions(2, 2, 1); this->GetOutput()->SetSpacing(1.0,1.0,1.0); this->GetOutput()->SetOrigin(0.0,0.0,0.0); this->GetOutput()->SetScalarType(VTK_UNSIGNED_CHAR); vtkUnsignedCharArray *colorArray = vtkUnsignedCharArray::New(); colorArray->SetNumberOfComponents(3); colorArray->SetNumberOfTuples(4); colorArray->InsertNextTuple3(0,0,0); colorArray->InsertNextTuple3(0,0,0); colorArray->InsertNextTuple3(0,0,0); colorArray->InsertNextTuple3(0,0,0); colorArray->SetName("color array"); this->GetOutput()->GetPointData()->SetScalars(colorArray); } void CImageMerger::ExecuteInformation() { } void CImageMerger::PrintSelf(ostream& os, vtkIndent indent) { } //--------CImageMerger.h------------------- #include "vtkImageSource.h" class CImageMerger : public vtkImageSource { public: vtkTypeRevisionMacro(CImageMerger, vtkImageSource); void PrintSelf(ostream& os, vtkIndent indent); static CImageMerger *New(); CImageMerger(); ~CImageMerger(); protected: void ExecuteInformation(); void ExecuteData(vtkDataObject*); private: CImageMerger(const CImageMerger&); // Not implemented. void operator=(const CImageMerger&); // Not implemented. }; thanks tracy --------------------------------- Never miss a thing. Make Yahoo your homepage. -------------- next part -------------- An HTML attachment was scrubbed... URL: From master at iaas.msu.ru Sat Dec 29 02:49:22 2007 From: master at iaas.msu.ru (Michail Vidiassov) Date: Sat, 29 Dec 2007 10:49:22 +0300 (MSK) Subject: [vtkusers] vtkVectorText beyond ASCII - solution In-Reply-To: References: Message-ID: Dear All, I have enquired on this list (vtkusers) about the sore state of non-ASCII text support in VTK and got no reaction: > are there anywhere around any patches to VTK to get more characters in > vtkVectorText (say Cyrillic)? Thus I did some coding myself and got a vtkVectorText "on steroids", that can display Cyryllic, Greek and some math (a STIX font was used). You can see the results at http://www.iaas.msu.ru/tmp/NewVectorText.pdf http://www.iaas.msu.ru/tmp/NewVectorText.wrl If anyone is interested I will put the code in minimal-decency state and post it here/put it there too. As of now I did not change API or logic in any way, font was converted offline and the text to show is just assumed to be in UTF-8. > On the other hand, VTK uses FTGL intenally to render bitmap fonts on the > screen. But FTGL can make polygon fonts too. > It must be easy enough to hack FTGL to make a polygon set > for VTK, instead of feeding triangles to OpenGL directly. And I have done that easy part. But now I lack both motivation and expertise to go any deeper into VTK to try on-the-fly rendering. My search over archives suggests that text handling is some untouchable mess and I was plain lucky that vtkVectorText was left neglected by developers, making enhancing it a one-step process. Sincerely, Michail From bill.lorensen at gmail.com Sun Dec 30 00:26:21 2007 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 30 Dec 2007 00:26:21 -0500 Subject: [vtkusers] Point array with 3 components, only has 0 tuples but there are 4 points In-Reply-To: <25212.84287.qm@web45107.mail.sp1.yahoo.com> References: <25212.84287.qm@web45107.mail.sp1.yahoo.com> Message-ID: <4db4735c0712292126u202faccel40e7e17eb0a9ebcf@mail.gmail.com> Tracy, You should be using: colorArray->InsertTuple3(0,0,0,0); colorArray->InsertTuple3(1,0,0,0); colorArray->InsertTuple3(2,0,0,0); colorArray->InsertTuple3(3,0,0,0); InsertNextTuple3 will add to the already allocated colorArray. This does not explain the error message you get however. Bill On Dec 28, 2007 8:28 PM, Tracy Hu wrote: > Hello, > > I'm trying to write a image filter, but I got this error: > > ERROR: In \vwdev\PC\Libraries\vtk44\src\Common\vtkDataSet.cxx, line 376 > vtkImageData (02476728): Point array color array with 3 components, only > has 0 > tuples but there are 4 points > > do you have any idea? > > Below are my code: > > //------------main.cpp------------------- > #include "vtkRenderer.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkInteractorStyleTrackballCamera.h" > #include "vtkPoints.h" > #include "vtkDataSetMapper.h" > #include "vtkImageData.h" > #include "vtkPointData.h" > #include "CImageMerger.h" > > int main( int argc, char *argv[] ) > { > CImageMerger *reader = CImageMerger::New(); > reader->Update(); > cout <<"main: # of tuples in color array: " << > reader->GetOutput()->GetPointData()->GetArray(0)->GetNumberOfTuples() > < > vtkDataSetMapper *mapper = vtkDataSetMapper::New(); > mapper->SetInput(reader->GetOutput()); > > vtkActor *actor = vtkActor::New(); > actor->SetMapper(mapper); > > vtkRenderer* ren = vtkRenderer::New(); > ren->AddActor(actor); > ren->SetBackground(1, 1, 1); > > vtkRenderWindow* renWin = vtkRenderWindow::New(); > renWin->AddRenderer(ren); > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > vtkInteractorStyleTrackballCamera *style = > vtkInteractorStyleTrackballCamera::New(); > iren->SetInteractorStyle(style); > renWin->SetSize(600,600); > renWin->Render(); > iren->Start(); > > style->Delete(); > iren->Delete(); > ren->Delete(); > renWin->Delete(); > actor->Delete(); > mapper->Delete(); > reader->Delete(); > return 0; > > } > > > //-------------CImageMerger.cpp-------------- > #include "vtkFloatArray.h" > #include "vtkPointData.h" > #include "vtkObjectFactory.h" > #include > #include "vtkUnsignedCharArray.h" > #include "vtkImageData.h" > #include "CImageMerger.h" > > vtkCxxRevisionMacro(CImageMerger, "$Revision: 1.30 $"); > vtkStandardNewMacro(CImageMerger); > > CImageMerger::CImageMerger():vtkImageSource() > {} > CImageMerger::~CImageMerger() > {} > > void CImageMerger::ExecuteData(vtkDataObject*) > { > this->GetOutput()->SetDimensions(2, 2, 1); > this->GetOutput()->SetSpacing(1.0,1.0,1.0); > this->GetOutput()->SetOrigin(0.0,0.0,0.0); > this->GetOutput()->SetScalarType(VTK_UNSIGNED_CHAR); > vtkUnsignedCharArray *colorArray = vtkUnsignedCharArray::New(); > colorArray->SetNumberOfComponents(3); > colorArray->SetNumberOfTuples(4); > colorArray->InsertNextTuple3(0,0,0); > colorArray->InsertNextTuple3(0,0,0); > colorArray->InsertNextTuple3(0,0,0); > colorArray->InsertNextTuple3(0,0,0); > colorArray->SetName("color array"); > this->GetOutput()->GetPointData()->SetScalars(colorArray); > } > > void CImageMerger::ExecuteInformation() > { > } > > void CImageMerger::PrintSelf(ostream& os, vtkIndent indent) > { > } > > //--------CImageMerger.h------------------- > #include "vtkImageSource.h" > > class CImageMerger : public vtkImageSource > { > public: > vtkTypeRevisionMacro(CImageMerger, vtkImageSource); > void PrintSelf(ostream& os, vtkIndent indent); > static CImageMerger *New(); > > CImageMerger(); > ~CImageMerger(); > > protected: > void ExecuteInformation(); > void ExecuteData(vtkDataObject*); > > private: > CImageMerger(const CImageMerger&); // Not implemented. > void operator=(const CImageMerger&); // Not implemented. > > > }; > > > thanks > > tracy > > > > ------------------------------ > Never miss a thing. Make Yahoo your homepage. > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From haloul02 at yahoo.co.uk Mon Dec 31 07:27:18 2007 From: haloul02 at yahoo.co.uk (Hala ALBakour) Date: Mon, 31 Dec 2007 12:27:18 +0000 (GMT) Subject: [vtkusers] Please Help: How to convert vtkPolyData into vtkImageData? Message-ID: <522826.30711.qm@web25411.mail.ukl.yahoo.com> Dear all, I am strugling to convert poly data in vtk into image/volume data using the vtkProbeFilter class, the reason I want to do this is to apply slicing on the output image to extract x,y values for every 2D slice, I don't know the most sensible way of doing it as I am very new to this area, but this my piece of code which is not working, the extracted output image I get is always empty, I am trying to apply the filter here on a simple cube polydata, am I doing something wrong here, should I use something else in addition to the probe filter, I could not find enough materials and examples illustrating the usage of the ProbeFilter, please advise, Hala int i; float x[8][3]={{0,0,0}, {1,0,0}, {1,1,0}, {0,1,0}, {0,0,1}, {1,0,1}, {1,1,1}, {0,1,1}}; vtkIdType pts[6][4]={{0,1,2,3}, {4,5,6,7}, {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7}}; vtkPolyData *cube = vtkPolyData::New(); vtkPoints *points = vtkPoints::New(); vtkCellArray *polys = vtkCellArray::New(); vtkIntArray *scalars = vtkIntArray::New(); // Load the point, cell, and data attributes. for (i=0; i<8; i++) points->InsertPoint(i,x[i]); for (i=0; i<6; i++) polys->InsertNextCell(4,pts[i]); for (i=0; i<8; i++) scalars->InsertTuple1(i,i); // We now assign the pieces to the vtkPolyData. cube->SetPoints(points); points->Delete(); cube->SetPolys(polys); polys->Delete(); cube->GetPointData()->SetScalars(scalars); scalars->Delete(); vtkImageData* m_currentImageData = vtkImageData::New(); m_currentImageData->SetDimensions(26,26,26); vtkImageData* samplingArray = vtkImageData::New(); samplingArray->SetNumberOfScalarComponents(1); samplingArray->SetScalarTypeToInt(); samplingArray->SetSpacing(1,1,1); samplingArray->SetDimensions(26,26,26); samplingArray->SetOrigin( 0,0,0 ); samplingArray->Update(); vtkProbeFilter* filter = vtkProbeFilter::New(); filter->SetInput(samplingArray); filter->SetSource(cube); m_currentImageData->DeepCopy(filter->GetImageDataOutput()); __________________________________________________________ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com