[vtkusers] vtkusers Digest, Vol 66, Issue 21

Zheng,Guang guangz at u.washington.edu
Sat Oct 17 20:47:32 EDT 2009


Hi, all:

I have a problem with reading the txt file whose size is around 200M in
order to visualize it, the error message I get is as follows:


First-chance exception at 0x7d4e237e in 2.exe: Microsoft C++ exception:
std::bad_alloc at memory location 0x016dfc54..

Unhandled exception at 0x7d4e237e in 2.exe: Microsoft C++ exception:
std::bad_alloc at memory location 0x016dfc54..

I do can read a 30M txt file successfully, actually the physical memory is
not a problem I think (since I run the program on a 64-bit winXP with 4G
memory and 8CPUs), as you see above I still get the problem wtih memory
allocation, I also checked the physical memory usage right before the error
message poped up, it consumed only around 2G physical memory, could anyone
help me figure this out?
Thanks a lot!

Guang

On Sat, Oct 17, 2009 at 9:00 AM, <vtkusers-request at vtk.org> wrote:

> Send vtkusers mailing list submissions to
>        vtkusers at vtk.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://www.vtk.org/mailman/listinfo/vtkusers
> or, via email, send a message with subject or body 'help' to
>        vtkusers-request at vtk.org
>
> You can reach the person managing the list at
>        vtkusers-owner at vtk.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of vtkusers digest..."
>
>
> Today's Topics:
>
>   1. Re: vtk and cmake (Andreas Br?ning)
>   2. VTK in a MultiTouch Environment (Christopher Denter)
>   3. reading/writing only selected attributes (Dominik Szczerba)
>   4. Simple way to plot deformation fields in VTK (itkvtk123 at gmx.net)
>   5. Re: VTK in a MultiTouch Environment (David Gobbi)
>   6. Re: vtkStreamTracer does not fill area (Berk Geveci)
>   7. Interaction Simultaneous for multiple renderers in one    render
>      window (Yang, Jinzhong)
>   8. Re: matrix output VERY hard to read (Yang, Jinzhong)
>   9. texturing on unstructured grid (Grzegorz Pytel)
>  10. Sudden VTK error after recent Windows Update KB958869
>      (Thomas Zhang)
>  11. Re: about PyQt4 and vtk (Lic. Jos? M. Rodriguez Bacallao)
>  12.  vtkvolume to vtkpolydata (InfoSeekerr)
>  13. Re: vtkContourfilter produces uncomplete surface when cutting
>      hex mesh (Hans Gruendel)
>  14. Re: VTK in a MultiTouch Environment (Berk Geveci)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 16 Oct 2009 18:09:50 +0200
> From: Andreas Br?ning <mail-andi at web.de>
> Subject: Re: [vtkusers] vtk and cmake
> To: vtkusers at vtk.org
> Message-ID: <776136750 at web.de>
> Content-Type: text/plain; charset=iso-8859-15
>
> thanks for this fast answer!
>
> I solved the problem already. It was because of this two versions of VS. I
> run the "vcvarsall.bat" (which is located in the VS 2009 folder) in a
> separat console and right after that cmake also in that console.
>
> Now it works again ;)
>
>
>
> Von: "Rocco Gasteiger" <post at rocco-gasteiger.de>
> Gesendet: 16.10.09 17:42:47
> An: <vtkusers at vtk.org>
> Betreff: Re: [vtkusers] vtk and cmake
>
> Hello Andi,
>
> Do you have deleted you old cache in CMake and all old compiled files of
> VTK
> in you folder?
>
> Best regards,
> Rocco Gasteiger
>
>
> --------------------------------------------------
> Dipl.-Ing. Rocco Gasteiger
> Otto-von-Guericke University
> Faculty of Computer Science
> Department of Simulation and Graphics
> Universit?tsplatz 2, 39106 Magdeburg, Germany
>
> Office:  G29-223
> Phone:   +49 391 67 127 59
> Fax:??   +49 391 67 111 64
> Website: http://wwwisg.cs.uni-magdeburg.de/cvcms/
> --------------------------------------------------
>
>
>
>
> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
> Of Andreas Br?ning
> Sent: Friday, October 16, 2009 4:29 PM
> To: vtkusers at vtk.org
> Subject: [vtkusers] vtk and cmake
>
> Dear vtk-user,
>
> i have a problem while building the vtk project with cmake. I downloadet
> the
> vtk sources monthes ago, it was version 5.2.0. That time i uses
> VisualStudio
> 2005 and everything worked fine. I built the project with cmake2.4.
>
> Now i got Visual Studio 2008 and i have to built the vtk project again. but
> it doesnt work. When i press configure in Cmake i get the following error
> message:
>
> CMake Error at C:/Programme/CMake
> 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
>  The C compiler "cl" is not able to compile a simple test program.
>  It fails with the following output:
>
>   Change Dir: C:/andi/test_vtk_VS2008/CMakeFiles/CMakeTmp
>
>  Run Build Command:C:\PROGRA~1\MICROS~2\Common7\IDE\devenv.com
>  CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec
>
>  Microsoft (R) Visual Studio Version 8.0.50727.762.
>  Copyright (C) Microsoft Corp 1984-2005.  All rights reserved.
>
>  The selected file is a solution file, but was created by a newer version
> of
>  this application and cannot be opened.
>
>  The operation could not be completed.  Unbekannter Fehler
>
>  CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>  CMakeLists.txt:9 (PROJECT)
>
>
> Configuring incomplete, errors occurred!
>
> I tried the same with the latest version of Cmake (2.6.4) but the same
> error
> occured. I also checked out the latest version of VTk via CVS and it is the
> same.
>
> Does anybody know what is wrong? Is it because i have Visual Studio 2008
> and
> also VisualStudio 2005 installed?
>
> Thanks in advance
> Andi
>
> _______________________________________________________________
> Neu: WEB.DE <http://web.de/> DSL bis 50.000 kBit/s und 200,- Euro
> Startguthaben!
> http://produkte.web.de/go/02/
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
> _______________________________________________________________
> Neu: WEB.DE <http://web.de/> DSL bis 50.000 kBit/s und 200,- Euro
> Startguthaben!
> http://produkte.web.de/go/02/
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 16 Oct 2009 18:06:55 +0200
> From: Christopher Denter <dennda at the-space-station.com>
> Subject: [vtkusers] VTK in a MultiTouch Environment
> To: vtkusers at vtk.org
> Message-ID:
>        <2D21383E-E55B-4789-B660-9C86380B347A at the-space-station.com>
> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
>
> Hello,
>
> my name is Christopher and I'm a CS student currently searching for a
> topic for my bachelor's thesis. One topic that I'd find particularly
> interesting is an application that visualizes rendered volumes and
> allows the user(s) to explore the set of data by using multitouch
> gestures.
> For an example of how this may look in practice, please see this
> remarkable video: http://www.vimeo.com/6866296
>
> For the rendering part, I would like to use VTK so I don't need to
> write the volume rendering myself.
> The actual GUI and interaction would be made with PyMT [0], a python
> library that allows you to write multitouch applications with ease.
>
> There are two main problems here that I already see:
>        a) Is it possible to take the rendered volume and use it in my PyMT
> application (which has an OpenGL context itself)? Of course, this
> needs to be fast enough to allow for actual interaction with the user.
> If yes, how would I do that?
>        b) What do I need to do in order to translate finger gestures into
> VTK commands like 'rotate the volume' or 'show everything up to that
> particular slice'? Is that even possible properly?
>
> I understand that (as chapter 13 of the user's guide explains) you can
> subclass vtkRenderWindowInteractor and friends, but those seem a bit
> mouse and keyboard centric (because you need to override methods such
> as onMiddleButtonDown()). However, both mouse and keyboard is
> something you do not usually have in a multitouch environment (as you
> can clearly see in the above video).
>
> I would be really happy if it would be possible to realize the
> application sketched above. Thoughts on achievability are also very
> happily accepted. Keep in mind that this will be a bachelor's thesis
> with 3-6 months (of non-exclusive working time spent) and not a
> doctoral thesis.
>
> In the hope that my questions can be answered and with best regards,
> Christopher
>
> [0] http://pymt.txzone.net
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 16 Oct 2009 18:16:11 +0200
> From: Dominik Szczerba <dominik at itis.ethz.ch>
> Subject: [vtkusers] reading/writing only selected attributes
> To: VTK users group <vtkusers at vtk.org>
> Message-ID: <4AD89C4B.9040809 at itis.ethz.ch>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Is there a way to read or write only explicitly selected attributes via
> the XML readers/writers?
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 16 Oct 2009 20:14:37 +0200
> From: itkvtk123 at gmx.net
> Subject: [vtkusers] Simple way to plot deformation fields in VTK
> To: vtkusers at vtk.org
> Message-ID: <20091016181437.223580 at gmx.net>
> Content-Type: text/plain; charset="us-ascii"
>
> What is the simplest way to plot the output of the
> itk::DemonsRegistrationFilter in VTK?
>
> I simply want to show the registered image with the deformation field as
> overlay (as you can do in paraview).
>
> Since I want to write a standalone application I do *not* want to use
> paraview and I do *not* want to save the deformation field on disk and then
> read it with the vtk readers.
>
> I simply want to directly apply the deformation field information to e.g. a
> vtk::Glyph3D.
>
> Greets
>
>
>
>
> --
> Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5
> -
> sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
>
>
> ------------------------------
>
> Message: 5
> Date: Fri, 16 Oct 2009 12:25:41 -0600
> From: David Gobbi <david.gobbi at gmail.com>
> Subject: Re: [vtkusers] VTK in a MultiTouch Environment
> To: Christopher Denter <dennda at the-space-station.com>
> Cc: vtkusers at vtk.org
> Message-ID:
>        <48a17b780910161125i67c7267ch2a03e8898dab443a at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Christopher,
>
> VTK should be able to draw into the OpenGL context that is provided by
> your python library.  You just have to call vtkRenderWindow::WindowInfo()
> and vtkRenderWindow::SetSize() so that VTK will use your context instead
> of creating its own.
>
> For example, I do the following to get VTK to draw into a PyQt window:
>
>    def polish(self):
>          self._RenderWindow.SetSize(size.width(),size.height())
>          self._RenderWindow.SetWindowInfo(str(int(self.winId()))
>
> This works because Qt calls the "polish()" method on my qtRenderWidget
> before the Qt window is mapped to the screen.  When that happens,
> I get the size and window ID from the Qt window, and use those to
> set up the RenderWindow.
>
> So if PyMT can give you the window Id of the window that it uses for
> OpenGL, then getting VTK to use that window should be easy.
>
> With respect to the interactors, it might be easiest not to use them at
> all.  You can write your own code that takes the multi-touch information
> from PyMT, and then use the vtkPicker yourself and directly modify
> the Prop3D and clipping plane as necessary.  By all means take a look
> at the vtkInteractors, just realize that you don't necessarily have to use
> them.
>
>    David
>
>
> On Fri, Oct 16, 2009 at 10:06 AM, Christopher Denter
> <dennda at the-space-station.com> wrote:
> > Hello,
> >
> > my name is Christopher and I'm a CS student currently searching for a
> topic
> > for my bachelor's thesis. One topic that I'd find particularly
> interesting
> > is an application that visualizes rendered volumes and allows the user(s)
> to
> > explore the set of data by using multitouch gestures.
> > For an example of how this may look in practice, please see this
> remarkable
> > video: http://www.vimeo.com/6866296
> >
> > For the rendering part, I would like to use VTK so I don't need to write
> the
> > volume rendering myself.
> > The actual GUI and interaction would be made with PyMT [0], a python
> library
> > that allows you to write multitouch applications with ease.
> >
> > There are two main problems here that I already see:
> > ? ? ? ?a) Is it possible to take the rendered volume and use it in my
> PyMT
> > application (which has an OpenGL context itself)? Of course, this needs
> to
> > be fast enough to allow for actual interaction with the user. If yes, how
> > would I do that?
> > ? ? ? ?b) What do I need to do in order to translate finger gestures into
> > VTK commands like 'rotate the volume' or 'show everything up to that
> > particular slice'? Is that even possible properly?
> >
> > I understand that (as chapter 13 of the user's guide explains) you can
> > subclass vtkRenderWindowInteractor and friends, but those seem a bit
> mouse
> > and keyboard centric (because you need to override methods such as
> > onMiddleButtonDown()). However, both mouse and keyboard is something you
> do
> > not usually have in a multitouch environment (as you can clearly see in
> the
> > above video).
> >
> > I would be really happy if it would be possible to realize the
> application
> > sketched above. Thoughts on achievability are also very happily accepted.
> > Keep in mind that this will be a bachelor's thesis with 3-6 months (of
> > non-exclusive working time spent) and not a doctoral thesis.
> >
> > In the hope that my questions can be answered and with best regards,
> > Christopher
> >
> > [0] http://pymt.txzone.net
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
>
> ------------------------------
>
> Message: 6
> Date: Fri, 16 Oct 2009 14:56:32 -0400
> From: Berk Geveci <berk.geveci at kitware.com>
> Subject: Re: [vtkusers] vtkStreamTracer does not fill area
> To: Jim Shain <jimshain at hotmail.com>
> Cc: vtk mailing list <vtkusers at vtk.org>
> Message-ID:
>        <45d654b0910161156k2121a62at5c1662a8b9d91958 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I meant the input dataset. Whatever pdata_[i] is producing.
>
> On Fri, Oct 16, 2009 at 10:19 AM, Jim Shain <jimshain at hotmail.com> wrote:
> >
> > I've enclosed?an image.
> >
> > The SampleRate is?? igrid->SetSampleRate(4, 1, 4);
> >
> > A smaller SampleRate?has more Streamlines but the skip over the pieces is
> > still there (it's just a bit harder to see).? Larger SampleRates
> obviously
> > have fewer lines but the skip is still there.
> >
> > I do not see how to get the dataset out of?vtkStreamTracer (which is
> > streamer down below).?? PrintSelf?? Print?? I have tried several
> different
> > ways and could not get that to work.? How can I do that?
> >
> > Thanks!
> >
> > Jim
> >
> >
> >
> >
> >> Date: Fri, 16 Oct 2009 08:52:41 -0400
> >> Subject: Re: [vtkusers] vtkStreamTracer does not fill area
> >> From: berk.geveci at kitware.com
> >> To: jimshain at hotmail.com
> >> CC: vtkusers at vtk.org
> >>
> >> Can you post an example dataset and an image? (or e-mail them to me
> >> directly)
> >>
> >> 2009/10/15 Jim Shain <jimshain at hotmail.com>:
> >> >
> >> > Hi,
> >> >
> >> > When I try to use? vtkStreamTracer the Streamlines do not go all the
> way
> >> > to
> >> > the edge of the object.? It stops a bit short, giving the impression
> >> > that
> >> > there?are no Streamlines there.?? I get the streamer from an
> >> > vtkExtractGrid
> >> > (igrid below).? After the Streamline I use a vtkPolyDataMapper
> (mapper,
> >> > below) and a vtkActor (called actor down below).? The pp_ below has a
> >> > list
> >> > of processor data.
> >> >
> >> > ?I have looked around quite a bit and cannot find a solution.
> >> >
> >> >
> >> > vtkSmartPointer<vtkExtractGrid> igrid;
> >> > igrid.TakeReference(vtkExtractGrid::New());
> >> >
> >> > igrid->SetInputConnection(pdata_[i]->GetOutputPort());
> >> > igrid->SetSampleRate(skip+1, 1, skip+1);
> >> > igrid->IncludeBoundaryOn();
> >> >
> >> > // streamer
> >> > vtkSmartPointer<vtkStreamTracer> streamer;
> >> > streamer.TakeReference(vtkStreamTracer::New());
> >> > streamer->SetInputConnection(pdata_[i]->GetOutputPort());
> >> > streamer->SetSource(igrid->GetOutput());
> >> > streamer->SetMaximumPropagation(2,pp_->nj(i));
> >> >
> >> > streamer->SetMinimumIntegrationStep(2,0.1);
> >> > streamer->SetMaximumIntegrationStep(2,1.0);
> >> > streamer->SetInitialIntegrationStep(2, 0.5);
> >> >
> >> > streamer->SetIntegratorTypeToRungeKutta45();
> >> > streamer->SetMaximumError(1.0e-8);
> >> > streamer->SetIntegrationDirectionToBoth();
> >> > streamer->ComputeVorticityOff();
> >> >
> >> > // mapper
> >> > vtkSmartPointer<vtkPolyDataMapper> mapper;
> >> > mapper.TakeReference(vtkPolyDataMapper::New());
> >> > mapper->SetInputConnection(streamer->GetOutputPort());
> >> > mapper->ScalarVisibilityOn();
> >> > mapper->ImmediateModeRenderingOn();
> >> > mappers_.push_back(mapper);
> >> > streamline_mappers_.push_back(mapper);
> >> >
> >> >
> >> > // add actor
> >> > for(int rot=rot_beg;rot<rot_end;++rot)
> >> > {
> >> > ?? double rotate = rot*360.0/nblades;
> >> >??? vtkSmartPointer<vtkActor> actor;
> >> > ?? if(!rot)
> >> > ?? {
> >> >?????? actor.TakeReference(vtkActor::New());
> >> > ????? actor->SetMapper(mapper);
> >> > ????? actor->RotateZ(rotate);
> >> > ????? actor->SetVisibility(0);
> >> >?????? ren_->AddActor(actor);
> >> > ???}
> >> >??? streamlines_.push_back(actor);
> >> > }
> >> >
> >> >
> >> > Thanks!
> >> >
> >> > Jim Shain
> >> >
> >> >
> >> > ________________________________
> >> > Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up
> >> > now.
> >> > _______________________________________________
> >> > Powered by www.kitware.com
> >> >
> >> > Visit other Kitware open-source projects at
> >> > http://www.kitware.com/opensource/opensource.html
> >> >
> >> > Please keep messages on-topic and check the VTK FAQ at:
> >> > http://www.vtk.org/Wiki/VTK_FAQ
> >> >
> >> > Follow this link to subscribe/unsubscribe:
> >> > http://www.vtk.org/mailman/listinfo/vtkusers
> >> >
> >> >
> >
> > ________________________________
> > Hotmail: Free, trusted and rich email service. Get it now.
>
>
> ------------------------------
>
> Message: 7
> Date: Fri, 16 Oct 2009 15:58:54 -0500
> From: "Yang, Jinzhong" <jinzhong76 at gmail.com>
> Subject: [vtkusers] Interaction Simultaneous for multiple renderers in
>        one     render window
> To: "'VTK users group'" <vtkusers at vtk.org>
> Message-ID: <003f01ca4ea3$796c7ff0$6c457fd0$@com>
> Content-Type: text/plain;       charset="us-ascii"
>
> Hi All,
>
> I have a question on the interaction on the rendered window. Here is a
> snippet of my code:
>
>  vtkRenderer* renderer1 = vtkRenderer::New();
>  vtkRenderer* renderer2 = vtkRenderer::New();
>
>  vtkRenderWindow* renWin = vtkRenderWindow::New();
>
>  renWin->AddRenderer(renderer1);
>  renWin->AddRenderer(renderer2);
>
>  renderer1->SetViewport(0.0, 0.0, 0.5, 1.0);
>  renderer2->SetViewport(0.5, 0.0, 1.0, 1.0);
>
>  vtkRenderWindowInteractor* inter = vtkRenderWindowInteractor::New();
>  inter->SetRenderWindow(renWin);
>
>  ... (Add mapping data to renderer1 and renderer2)
>
>  // add axes
>  vtkAxesActor* axes = vtkAxesActor::New();
>  vtkPropAssembly* assembly = vtkPropAssembly::New();
>  assembly->AddPart(axes);
>
>  vtkOrientationMarkerWidget* widget1 = vtkOrientationMarkerWidget::New();
>  widget1->SetOrientationMarker( assembly );
>  widget1->SetInteractor(inter);
>  widget1->SetViewport( 0.0, 0.0, 0.2, 0.2 );
>  widget1->SetEnabled(1);
>  widget1->InteractiveOff();
>
>  renWin->Render();
>  inter->Start();
>
> With this code, the object interactions in renderer1 and renderer2 are not
> correlated. Here, I would like the interactor (inter) acts simultaneously
> for objects in renderer1 and renderer2. For example, when I rotate or zoom
> in/out the object in renderer1, the object in renderer2 should change the
> same way as object in renderer1 does. Further, with this code, the axis
> orientation will change along the object orientation in renderer1, but not
> the one in renderer2. However, if I switch the Viewports of renderer1 and
> renderer2, the axis orientation will change along the object orientation in
> renderer2, but not the one in renderer1. Can anyone give me some hints to
> resolve this problem?
>
> Thank you!
> -Jinzhong
>
>
>
>
> ------------------------------
>
> Message: 8
> Date: Fri, 16 Oct 2009 16:24:10 -0500
> From: "Yang, Jinzhong" <jinzhong76 at gmail.com>
> Subject: Re: [vtkusers] matrix output VERY hard to read
> To: "'David Doria'" <daviddoria+vtk at gmail.com <daviddoria%2Bvtk at gmail.com>>,
> "'Jeff Baumes'"
>        <jeff.baumes at kitware.com>
> Cc: vtkusers at vtk.org
> Message-ID: <005501ca4ea7$01603e30$0420ba90$@com>
> Content-Type: text/plain; charset="us-ascii"
>
> The same problem is with the ascii *.vtk data file. It looks in a mess for
> those point coordinate outputs. When output data to streams, fix the width
> for each output element and specify the output precision should solve the
> problem easily.
>
>
>
> -Jinzhong
>
>
>
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
> Of David Doria
> Sent: Thursday, October 15, 2009 6:55 AM
> To: Jeff Baumes
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] matrix output VERY hard to read
>
>
>
> On Tue, Oct 13, 2009 at 9:34 AM, Jeff Baumes <jeff.baumes at kitware.com>
> wrote:
>
> I agree that this would likely be a good change. Could you add a
> little more clarity to this? What class(es)/method(s) are you
> proposing to change?
>
> Jeff
>
>
> Jeff,
>
> I think just vtkMatrix4x4::PrintSelf would need to be changed? Maybe
> something more like this:
> http://www.rpi.edu/~doriad/VTK_List/MatrixOutput/
>
> It's tough to get the formatting VERY nice because of variable width
> character fonts, but there is still quite an improvement (in my opinion).
> Here are two examples:
>
> Existing method, hard matrix:
>    1 -4.12726e-10 3.91703e-10 5.2556e-12
>    4.12726e-10 1 7.75407e-10 -7.62694e-10
>    -3.91703e-10 -7.75407e-10 1 7.57439e-10
>    0 0 0 1
>
> Proposed method, hard matrix:
>   1.000  -0.000   0.000   0.000
>   0.000   1.000   0.000  -0.000
>  -0.000  -0.000   1.000   0.000
>   0.000   0.000   0.000   1.000
>
>
> Existing method, easy matrix:
>    1 2 3 4
>    5 6 7 8
>    9 10 11 12
>    13 14 15 16
>
> Proposed method, easy matrix:
>   1.000   2.000   3.000   4.000
>   5.000   6.000   7.000   8.000
>   9.000  10.000  11.000  12.000
>  13.000  14.000  15.000  16.000
>
> As you can see there is a HUGE difference in the hard case, while the easy
> case remains ok. The precision of the decimal outputs is clearly a user
> preference sort of thing - maybe we could even make some options for the
> formatting? That may be hard to do in the PrintSelf sort of framework
> though..
>
> Thoughts?
>
> Thanks,
>
> David
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://www.vtk.org/pipermail/vtkusers/attachments/20091016/548eb0ba/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 9
> Date: Fri, 16 Oct 2009 23:51:14 +0200
> From: Grzegorz Pytel <bioinfguy at gmail.com>
> Subject: [vtkusers] texturing on unstructured grid
> To: vtkusers at vtk.org
> Message-ID:
>        <867c8430910161451v1e0d8759jcb5d577c77ba6566 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> How can I perform texturing on vtkUnstructuredGrid??
> Regards,
> Gregory
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://www.vtk.org/pipermail/vtkusers/attachments/20091016/b3f5e501/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 10
> Date: Sat, 17 Oct 2009 00:16:41 -0700
> From: Thomas Zhang <tzhang at xradia.com>
> Subject: [vtkusers] Sudden VTK error after recent Windows Update
>        KB958869
> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Message-ID:
>        <7E67C38B63AA454BBF9001BE32C40EF31F0B745143 at xchange1.xradia.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello: I posted a similar question some time ago and got no response.
>  Since then I have found a workaround to solve my problem.
>
> But on Oct 13, 2009, Microsoft pushed a Windows update for KB958869.  All
> the sudden my workaround failed to work.  The MS update changed the Windows
> GdiPlus.dll file to prevent centain buffer overrun issues.
>
> Can anyone please help?
>
> Here is the code that gives the problem.  It is 2D image rotating with
> vtkImageReslice and vtkTransform.
>
> If you try the code, it works just fine!  The problem is, we are using the
> code in the same application that uses a 3rd party library utilizing DirectX
> hardware acceleration.  After we initialize the DirectX based library, the
> code below would fail with nDim[0]==1.  Once we comment the 3rd party
> library, the code would work perfect as expected.
>
> vtkImageData *pvtkImageData1;
> pvtkImageData1= vtkImageData::New();
> pvtkImageData1->SetDimensions(nOriginalWidth,nOriginalHeight,1);
> pvtkImageData1->SetScalarTypeToFloat();
> pvtkImageData1->SetNumberOfScalarComponents(1);
> //here, need to put image data in pvtkImageData1.  Size is
> //nOriginalWidthXnOriginalHeight
>
> vtkTransform *pTransForm = vtkTransform::New();
> pTransForm->Identity();
> pTransForm->RotateZ(fAngle);
>
> vtkImageReslice  *pImageReslice = vtkImageReslice::New();
> pImageReslice->SetOutputDimensionality(2);
> pImageReslice->SetResliceAxesDirectionCosines(1,0,0,0,1,0,0,0,1);
> pImageReslice->SetResliceTransform(pTransForm);
> pImageReslice->SetInput(pvtkImageData1);
>
> vtkImageChangeInformation* centering =vtkImageChangeInformation::New();
> centering->SetInput(pvtkImageData1);
> centering->CenterImageOn();
> pImageReslice->SetInput(centering->GetOutput());
>
> pImageReslice->SetResliceAxesOrigin(0,0,0);
> pImageReslice->SetOutputExtentToDefault();
> pImageReslice->GetOutput()->SetUpdateExtentToWholeExtent();
> pImageReslice->Update();
> pImageReslice->GetOutput()->Update();
>
> vtkImageData *pvtkOutImageData = pImageReslice->GetOutput();
> int nDim[3];
> pvtkOutImageData->GetDimensions(nDim);
>
> //===================Error===========================
> //at this point the nDim[0] return 1, which is wrong.
> //nDim[0] should be at least nOriginalWidth.
>
> Thanks!
> Thomas
>
>  The information in this email, including any attachments, is confidential
> and intended only for the recipient(s) listed.  Any use of this email for
> any other purpose is prohibited.  If you have received this email in error,
> please notify me immediately by reply email, delete this email, and do not
> disclose its contents to anyone.
>
>
> ------------------------------
>
> Message: 11
> Date: Sat, 17 Oct 2009 08:43:56 -0400
> From: Lic. Jos? M. Rodriguez Bacallao <jmrbcu at gmail.com>
> Subject: Re: [vtkusers] about PyQt4 and vtk
> To: Clinton Stimpson <clinton at elemtech.com>
> Cc: VTK Users <vtkusers at vtk.org>
> Message-ID:
>        <4b2db6160910170543h75640d0fl78c4535a3ceb884d at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> I realize that after a night of sleeplessness, thanks very much for
> your help. Here is another question: I have made my
> QVTKRenderWindowInteractor parent of QWidget and put the QWidget as a
> the Widget of my MDI windows, but, when I change the active MDI
> windows, I get some flicker and a little ghost image of my previous
> window.
>
> PS: I am visualizing DICOM images in each MDI window
>
> On 10/15/09, Clinton Stimpson <clinton at elemtech.com> wrote:
> >
> > That's probably because reparenting is not implemented for
> > QVTKRenderWindowInteractor.
> > You could probably get around it by making an intermediate QWidget that
> > is the parent and put that in the mdi area.
> >
> > Clint
> >
> > On 10/15/2009 03:08 PM, Lic. Jos? M. Rodriguez Bacallao wrote:
> >> hi folks, I'm trying to embed an QVTKRenderWindowInteractor in a mdi
> >> subwindow of a PyQt4 application but it raise a lot of BadWindows
> >> errors and Seg Faults like this:
> >>
> >> X Error: BadWindow (invalid Window parameter) 3
> >>    Major opcode: 2 (X_ChangeWindowAttributes)
> >>    Resource id:  0x340004b
> >> X Error: BadWindow (invalid Window parameter) 3
> >>    Major opcode: 3 (X_GetWindowAttributes)
> >>    Resource id:  0x340004b
> >>
> >> this is an example code:
> >>
> >> import sys
> >>
> >> from vtk.qt4.QVTKRenderWindowInteractor import
> QVTKRenderWindowInteractor
> >> from PyQt4 import QtGui
> >>
> >>
> >> class Window(QtGui.QMainWindow):
> >>
> >>      def __init__(self, title):
> >>          super(Window, self).__init__()
> >>
> >>          self.setWindowTitle(title)
> >>
> >>          file_menu = self.menuBar().addMenu('&File')
> >>          file_menu.addAction('&New Scene', self.new_scene)
> >>
> >>
> >>          self.mdi = QtGui.QMdiArea(self)
> >>          self.setCentralWidget(self.mdi)
> >>          self.interactors = []
> >>
> >>      def new_scene(self):
> >>          rwi = QVTKRenderWindowInteractor(self)
> >>          self.interactors.append(rwi)
> >>          scene = self.mdi.addSubWindow(rwi)
> >>          scene.show()
> >>
> >>
> >> app = QtGui.QApplication(sys.argv)
> >> window = Window('Test')
> >> window.showMaximized()
> >> app.exec_()
> >>
> >>
> >
> >
>
>
> --
> Lic. Jos? M. Rodriguez Bacallao
> Centro de Biofisica Medica
> -----------------------------------------------------------------
> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
> mismo.
>
> Recuerda: El arca de Noe fue construida por aficionados, el titanic
> por profesionales
> -----------------------------------------------------------------
>
>
> ------------------------------
>
> Message: 12
> Date: Sat, 17 Oct 2009 05:59:22 -0700 (PDT)
> From: InfoSeekerr <ali.mahmoud.habib at gmail.com>
> Subject: [vtkusers]  vtkvolume to vtkpolydata
> To: vtkusers at vtk.org
> Message-ID: <25938078.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hi All,
>
> How to convert vtkvolume to vtkpolydata to be used in vtk stripper filter
>
> Looking forward to your answer
> Best regards
> --
> View this message in context:
> http://www.nabble.com/vtkvolume-to-vtkpolydata-tp25938078p25938078.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 13
> Date: Sat, 17 Oct 2009 17:38:21 +0200
> From: Hans Gruendel <hans.gruendel at web.de>
> Subject: Re: [vtkusers] vtkContourfilter produces uncomplete surface
>        when cutting hex mesh
> To: Bill Lorensen <bill.lorensen at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID: <4AD9E4ED.2020403 at web.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Bill,
>
> thanks for your answer. You gave me an important hint: Result of the
> contour filter is always a set of triangles. Very good to know.
>
> I will check the rectangle with regards to planarity (right word?).
> Greetings Hans
>
> Bill Lorensen schrieb:
> > A rectangle might not be planar which may give some renderers trouble.
> > The contour filter always produces triangles.
> >
> >
> > On Wed, Oct 14, 2009 at 3:09 PM, Hans Gruendel <hans.gruendel at web.de>
> wrote:
> >
> >> Hi All,
> >>
> >> this is my first email here.
> >>
> >> I use the vtkContourFilter on an unstructured 3D Grid.
> >> Case 1: Cells are Tetraeder (Type 10) --> everything is fine.
> >> Case 2. Cells are Hexaeder (Type 12) --> the resulting surface is not
> >> complete. Each cutted face is divided into 4 triangles. An rectangle
> would
> >> fill the whole.
> >>
> >> My question: Is there any method to produce a complete surface from a
> >> Hexaeder mesh using the contour filter without any wholes?
> >>
> >> Looking forward to your help
> >>
> >> Best regards
> >>
> >> Hans
> >>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Please keep messages on-topic and check the VTK FAQ at:
> >> http://www.vtk.org/Wiki/VTK_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.vtk.org/mailman/listinfo/vtkusers
> >>
> >>
> >
> >
>
>
>
> ------------------------------
>
> Message: 14
> Date: Sat, 17 Oct 2009 11:56:53 -0400
> From: Berk Geveci <berk.geveci at kitware.com>
> Subject: Re: [vtkusers] VTK in a MultiTouch Environment
> To: Christopher Denter <dennda at the-space-station.com>
> Cc: vtkusers at vtk.org
> Message-ID:
>        <45d654b0910170856s4529f30drbe13a72d2dcc25d8 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Christopher,
>
> Please keep us in the loop as you make progress in this work. It would
> be great to publish it somewhere.
>
> -berk
>
> On Fri, Oct 16, 2009 at 12:06 PM, Christopher Denter
> <dennda at the-space-station.com> wrote:
> > Hello,
> >
> > my name is Christopher and I'm a CS student currently searching for a
> topic
> > for my bachelor's thesis. One topic that I'd find particularly
> interesting
> > is an application that visualizes rendered volumes and allows the user(s)
> to
> > explore the set of data by using multitouch gestures.
> > For an example of how this may look in practice, please see this
> remarkable
> > video: http://www.vimeo.com/6866296
> >
> > For the rendering part, I would like to use VTK so I don't need to write
> the
> > volume rendering myself.
> > The actual GUI and interaction would be made with PyMT [0], a python
> library
> > that allows you to write multitouch applications with ease.
> >
> > There are two main problems here that I already see:
> > ? ? ? ?a) Is it possible to take the rendered volume and use it in my
> PyMT
> > application (which has an OpenGL context itself)? Of course, this needs
> to
> > be fast enough to allow for actual interaction with the user. If yes, how
> > would I do that?
> > ? ? ? ?b) What do I need to do in order to translate finger gestures into
> > VTK commands like 'rotate the volume' or 'show everything up to that
> > particular slice'? Is that even possible properly?
> >
> > I understand that (as chapter 13 of the user's guide explains) you can
> > subclass vtkRenderWindowInteractor and friends, but those seem a bit
> mouse
> > and keyboard centric (because you need to override methods such as
> > onMiddleButtonDown()). However, both mouse and keyboard is something you
> do
> > not usually have in a multitouch environment (as you can clearly see in
> the
> > above video).
> >
> > I would be really happy if it would be possible to realize the
> application
> > sketched above. Thoughts on achievability are also very happily accepted.
> > Keep in mind that this will be a bachelor's thesis with 3-6 months (of
> > non-exclusive working time spent) and not a doctoral thesis.
> >
> > In the hope that my questions can be answered and with best regards,
> > Christopher
> >
> > [0] http://pymt.txzone.net
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
>
> ------------------------------
>
> _______________________________________________
> vtkusers mailing list
> vtkusers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
> End of vtkusers Digest, Vol 66, Issue 21
> ****************************************
>



-- 
Guang Zheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091017/498d9d3b/attachment.htm>


More information about the vtkusers mailing list