[vtkusers] Re: vtkusers Digest, Vol 36, Issue 4

Nachiket Gokhale gokhalen at gmail.com
Wed Apr 4 16:50:07 EDT 2007


Is there a way to convert TecPlot ASCII data to VTK format?. Google
doesn't seem to bring up anything useful. If this is a FAQ, please
pardon the question and please direct me to the FAQ.

-Nachiket

On 4/4/07, vtkusers-request at vtk.org <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: vtkWindowToImageFilter (Mark Wyszomierski)
>    2. calculate the averaging over a neighbor vertices of       vertex p
>       (HASSOUN Mohamad)
>    3. Re: vtkWindowToImageFilter (Dominik Szczerba)
>    4. Re: vtkWindowToImageFilter (Mark Wyszomierski)
>    5. Re: vtkWindowToImageFilter (Dominik Szczerba)
>    6. Re: vtkWindowToImageFilter (Mark Wyszomierski)
>    7. Re: vtkWindowToImageFilter (Mark Wyszomierski)
>    8. Re: vtkWindowToImageFilter (Dominik Szczerba)
>    9. Re: vtkCaptionActor2D text orientation (Philip Schuchardt)
>   10. drawing a simple volumetric cube (Vladislav Petyuk)
>   11. RE: vtkWindowToImageFilter (Lasso, Andras (GE Healthcare))
>   12. coordinates problem (Sergi Dote)
>   13. vtk 5.1 and Visual Studio Intellisense (Allan Della Libera)
>   14. writing several scalars in one file (py and C)... (fred)
>   15. marching cube (medamine)
>   16. R: [vtkusers] atan2 domain error and distance widget error
>       (Lazzarato Dr. Gianni)
>   17. Symposium "Computational Methods in Image Analysis"       within
>       the USNCCM IX Congress - Announce & Call for Papers
>       ( Jo?o Manuel R. S. Tavares )
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 3 Apr 2007 13:40:24 -0400
> From: "Mark Wyszomierski" <markww at gmail.com>
> Subject: Re: [vtkusers] vtkWindowToImageFilter
> To: "Dominik Szczerba" <domi at vision.ee.ethz.ch>
> Cc: vtkusers at vtk.org
> Message-ID:
>         <dfdfe01e0704031040m3592ea49r4a8d6c0dd3afd177 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi,
>
> I'm using the source from the example page. Looks like:
>
> void CSomeClass::Screenshot(vtkRenderWindow* pRenWin)
> {
>     vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
>     vtkBMPWriter* writer = vtkBMPWriter::New();
>     w2i->SetInput(pRenWin);
>     w2i->Update();
>     writer->SetInputConnection(w2i->GetOutputPort());
>     writer->SetFileName("C:\\test.bmp");
>     pRenWin->Render();
>     writer->Write();
> }
>
> if the render window was doing offscreen rendering, the resulting
> image will be just black. If doing on screen rendering, the filter
> will just capture any other windows 'on top of' the render window. I
> thought this filter used to capture exactly what was in the renderer,
> regardless of what other windows were on top of it, or if it was doing
> offscreen rendering. I know if I revert back to the VTK release
> version the same code above works fine with offscreen rendering,
> probably with onscreen rendering and overlapping windows?
>
> Thanks,
> Mark
>
>
>
>
> On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > I once had a similar problem (empty screen) and if I recall properly the
> > solution was to call Modified() somewhere.
> > Dominik
> >
> > On Tuesday 03 April 2007 15:19, Mark Wyszomierski wrote:
> > > Hi,
> > >
> > > Has anyone tried using the CVS version of vtkWindowToImageFilter? It
> > > seems to produce an empty image when used. Reverting back to the
> > > 'release' version 5x of VTK, the same code that uses it produces
> > > correct results. Just wondering if anyone experienced the same thing
> > > or any ways around it,
> > >
> > > Thanks,
> > > Mark
> > > _______________________________________________
> > > 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, PhD
> > 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
> >
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 3 Apr 2007 19:42:27 +0200
> From: "HASSOUN Mohamad" <hassoun at creatis.insa-lyon.fr>
> Subject: [vtkusers] calculate the averaging over a neighbor vertices
>         of      vertex p
> To: "Amy Squillacote" <amy.squillacote at kitware.com>
> Cc: VTK Users <vtkusers at vtk.org>
> Message-ID: <003101c77617$753b62a0$4f6cdcc3 at creatis.insalyon.fr>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>         reply-type=response
>
> hello
> I brand new to VTK, and i am in training for the master II, i have a problem
> to calculate the average of the vertex neighbor to the principal vertex p.
> an example:
> i have a mesh for each edge i have to points p and q, i can separate the
> normal vertices at the feature vertices by  W, if( W!=1) than i have a
> feature vertices. The calculation of W have been done.
> i need to preserve the sharp edges, at each feature vertex p, by averaging
> over those neighbor vertices that are feature vertices as well. the goal of
> this calculation is to smooth the function f, by way f is a table 2
> dimensions that he contain a constant value.
> TableFunction[p][0]=....
> TableFunction[p][1]=....
> TableFunction[p][2]=....
> how can i doing that??????
> thanks a lot for youre help.
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 3 Apr 2007 21:11:24 +0200
> From: Dominik Szczerba <domi at vision.ee.ethz.ch>
> Subject: Re: [vtkusers] vtkWindowToImageFilter
> To: vtkusers at vtk.org
> Message-ID: <200704032111.25027.domi at vision.ee.ethz.ch>
> Content-Type: text/plain;  charset="iso-8859-1"
>
> I have w2i->Modified() after write, else doesnt work.
> --ds
>
> On Tuesday 03 April 2007 19:40, you wrote:
> > Hi,
> >
> > I'm using the source from the example page. Looks like:
> >
> > void CSomeClass::Screenshot(vtkRenderWindow* pRenWin)
> > {
> >     vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
> >     vtkBMPWriter* writer = vtkBMPWriter::New();
> >     w2i->SetInput(pRenWin);
> >     w2i->Update();
> >     writer->SetInputConnection(w2i->GetOutputPort());
> >     writer->SetFileName("C:\\test.bmp");
> >     pRenWin->Render();
> >     writer->Write();
> > }
> >
> > if the render window was doing offscreen rendering, the resulting
> > image will be just black. If doing on screen rendering, the filter
> > will just capture any other windows 'on top of' the render window. I
> > thought this filter used to capture exactly what was in the renderer,
> > regardless of what other windows were on top of it, or if it was doing
> > offscreen rendering. I know if I revert back to the VTK release
> > version the same code above works fine with offscreen rendering,
> > probably with onscreen rendering and overlapping windows?
> >
> > Thanks,
> > Mark
> >
> > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > I once had a similar problem (empty screen) and if I recall properly the
> > > solution was to call Modified() somewhere.
> > > Dominik
> > >
> > > On Tuesday 03 April 2007 15:19, Mark Wyszomierski wrote:
> > > > Hi,
> > > >
> > > > Has anyone tried using the CVS version of vtkWindowToImageFilter? It
> > > > seems to produce an empty image when used. Reverting back to the
> > > > 'release' version 5x of VTK, the same code that uses it produces
> > > > correct results. Just wondering if anyone experienced the same thing
> > > > or any ways around it,
> > > >
> > > > Thanks,
> > > > Mark
> > > > _______________________________________________
> > > > 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, PhD
> > > 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
>
> --
> Dominik Szczerba, PhD
> Computer Vision Lab CH-8092 Zurich
> http://www.vision.ee.ethz.ch/~domi
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 3 Apr 2007 15:21:51 -0400
> From: "Mark Wyszomierski" <markww at gmail.com>
> Subject: Re: [vtkusers] vtkWindowToImageFilter
> To: "Dominik Szczerba" <domi at vision.ee.ethz.ch>,
>         francois.bertel at kitware.com
> Cc: vtkusers at vtk.org
> Message-ID:
>         <dfdfe01e0704031221t712a46c9r62618a77f001abb at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Dominik,
>
> That didn't seem to have any effect for me, because the bitmap is
> already written out at the time writer->Write() is called.
>
> Can I ask you though, what happens if you drag your render window
> partially off your desktop screen so it gets clipped by the edges - do
> you still get the entire render window contents captured? Nothing I do
> seems to get around this problem. I've traced into the render window
> class and it does seem to be reading the pixels from the back buffer:
>
>     glReadBuffer(static_cast<GLenum>(this->GetBackLeftBuffer()));
>
> still I get artifacts of overlapping windows in my screenshot!
>
> Thanks,
> Mark
>
> On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > I have w2i->Modified() after write, else doesnt work.
> > --ds
> >
> > On Tuesday 03 April 2007 19:40, you wrote:
> > > Hi,
> > >
> > > I'm using the source from the example page. Looks like:
> > >
> > > void CSomeClass::Screenshot(vtkRenderWindow* pRenWin)
> > > {
> > >     vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
> > >     vtkBMPWriter* writer = vtkBMPWriter::New();
> > >     w2i->SetInput(pRenWin);
> > >     w2i->Update();
> > >     writer->SetInputConnection(w2i->GetOutputPort());
> > >     writer->SetFileName("C:\\test.bmp");
> > >     pRenWin->Render();
> > >     writer->Write();
> > > }
> > >
> > > if the render window was doing offscreen rendering, the resulting
> > > image will be just black. If doing on screen rendering, the filter
> > > will just capture any other windows 'on top of' the render window. I
> > > thought this filter used to capture exactly what was in the renderer,
> > > regardless of what other windows were on top of it, or if it was doing
> > > offscreen rendering. I know if I revert back to the VTK release
> > > version the same code above works fine with offscreen rendering,
> > > probably with onscreen rendering and overlapping windows?
> > >
> > > Thanks,
> > > Mark
> > >
> > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > I once had a similar problem (empty screen) and if I recall properly the
> > > > solution was to call Modified() somewhere.
> > > > Dominik
> > > >
> > > > On Tuesday 03 April 2007 15:19, Mark Wyszomierski wrote:
> > > > > Hi,
> > > > >
> > > > > Has anyone tried using the CVS version of vtkWindowToImageFilter? It
> > > > > seems to produce an empty image when used. Reverting back to the
> > > > > 'release' version 5x of VTK, the same code that uses it produces
> > > > > correct results. Just wondering if anyone experienced the same thing
> > > > > or any ways around it,
> > > > >
> > > > > Thanks,
> > > > > Mark
> > > > > _______________________________________________
> > > > > 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, PhD
> > > > 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
> >
> > --
> > Dominik Szczerba, PhD
> > 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
> >
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 3 Apr 2007 22:05:21 +0200
> From: Dominik Szczerba <domi at vision.ee.ethz.ch>
> Subject: Re: [vtkusers] vtkWindowToImageFilter
> To: vtkusers at vtk.org
> Message-ID: <200704032205.21711.domi at vision.ee.ethz.ch>
> Content-Type: text/plain;  charset="iso-8859-1"
>
> With a png file the covered of off-desktop part will be empty.My code:
>
>                 vtkSmartPointer<vtkPNGWriter> writer = vtkSmartPointer<vtkPNGWriter>::New();
>                 w2i->Update();
>                 writer->SetInputConnection(w2i->GetOutputPort());
>                 writer->SetFileName((curr_fname+".png").c_str());
>                 renWin->Render();
>                 writer->Write();
>                 w2i->Modified(); //w2i is a global
>
> BTW. The effect of vtkGL2PSExporter will always be OK.
> Dominik
>
> On Tuesday 03 April 2007 21:21, Mark Wyszomierski wrote:
> > Hi Dominik,
> >
> > That didn't seem to have any effect for me, because the bitmap is
> > already written out at the time writer->Write() is called.
> >
> > Can I ask you though, what happens if you drag your render window
> > partially off your desktop screen so it gets clipped by the edges - do
> > you still get the entire render window contents captured? Nothing I do
> > seems to get around this problem. I've traced into the render window
> > class and it does seem to be reading the pixels from the back buffer:
> >
> >     glReadBuffer(static_cast<GLenum>(this->GetBackLeftBuffer()));
> >
> > still I get artifacts of overlapping windows in my screenshot!
> >
> > Thanks,
> > Mark
> >
> > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > I have w2i->Modified() after write, else doesnt work.
> > > --ds
> > >
> > > On Tuesday 03 April 2007 19:40, you wrote:
> > > > Hi,
> > > >
> > > > I'm using the source from the example page. Looks like:
> > > >
> > > > void CSomeClass::Screenshot(vtkRenderWindow* pRenWin)
> > > > {
> > > >     vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
> > > >     vtkBMPWriter* writer = vtkBMPWriter::New();
> > > >     w2i->SetInput(pRenWin);
> > > >     w2i->Update();
> > > >     writer->SetInputConnection(w2i->GetOutputPort());
> > > >     writer->SetFileName("C:\\test.bmp");
> > > >     pRenWin->Render();
> > > >     writer->Write();
> > > > }
> > > >
> > > > if the render window was doing offscreen rendering, the resulting
> > > > image will be just black. If doing on screen rendering, the filter
> > > > will just capture any other windows 'on top of' the render window. I
> > > > thought this filter used to capture exactly what was in the renderer,
> > > > regardless of what other windows were on top of it, or if it was doing
> > > > offscreen rendering. I know if I revert back to the VTK release
> > > > version the same code above works fine with offscreen rendering,
> > > > probably with onscreen rendering and overlapping windows?
> > > >
> > > > Thanks,
> > > > Mark
> > > >
> > > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > > I once had a similar problem (empty screen) and if I recall properly
> > > > > the solution was to call Modified() somewhere.
> > > > > Dominik
> > > > >
> > > > > On Tuesday 03 April 2007 15:19, Mark Wyszomierski wrote:
> > > > > > Hi,
> > > > > >
> > > > > > Has anyone tried using the CVS version of vtkWindowToImageFilter?
> > > > > > It seems to produce an empty image when used. Reverting back to the
> > > > > > 'release' version 5x of VTK, the same code that uses it produces
> > > > > > correct results. Just wondering if anyone experienced the same
> > > > > > thing or any ways around it,
> > > > > >
> > > > > > Thanks,
> > > > > > Mark
> > > > > > _______________________________________________
> > > > > > 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, PhD
> > > > > 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
> > >
> > > --
> > > Dominik Szczerba, PhD
> > > 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
>
> --
> Dominik Szczerba, PhD
> Computer Vision Lab CH-8092 Zurich
> http://www.vision.ee.ethz.ch/~domi
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 3 Apr 2007 16:23:50 -0400
> From: "Mark Wyszomierski" <markww at gmail.com>
> Subject: Re: [vtkusers] vtkWindowToImageFilter
> To: "Dominik Szczerba" <domi at vision.ee.ethz.ch>,
>         francois.bertel at kitware.com
> Cc: vtkusers at vtk.org
> Message-ID:
>         <dfdfe01e0704031323i7daba2f6x97d914a8472ae039 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Dominik,
>
> That's the problem - if any part of the render window is overlapped,
> or just off screen rendering is on, I'll get an incorrect image.
>
> As far as I can tell, there is no way to do this at the moment. How
> are other people doing this? I could try using vtkGL2PSExporter as you
> suggested but it might be too slow to do quick screen captures.
>
> Thanks,
> Mark
>
> On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > With a png file the covered of off-desktop part will be empty.My code:
> >
> >                vtkSmartPointer<vtkPNGWriter> writer = vtkSmartPointer<vtkPNGWriter>::New();
> >                w2i->Update();
> >                writer->SetInputConnection(w2i->GetOutputPort());
> >                writer->SetFileName((curr_fname+".png").c_str());
> >                renWin->Render();
> >                writer->Write();
> >                w2i->Modified(); //w2i is a global
> >
> > BTW. The effect of vtkGL2PSExporter will always be OK.
> > Dominik
> >
> > On Tuesday 03 April 2007 21:21, Mark Wyszomierski wrote:
> > > Hi Dominik,
> > >
> > > That didn't seem to have any effect for me, because the bitmap is
> > > already written out at the time writer->Write() is called.
> > >
> > > Can I ask you though, what happens if you drag your render window
> > > partially off your desktop screen so it gets clipped by the edges - do
> > > you still get the entire render window contents captured? Nothing I do
> > > seems to get around this problem. I've traced into the render window
> > > class and it does seem to be reading the pixels from the back buffer:
> > >
> > >     glReadBuffer(static_cast<GLenum>(this->GetBackLeftBuffer()));
> > >
> > > still I get artifacts of overlapping windows in my screenshot!
> > >
> > > Thanks,
> > > Mark
> > >
> > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > I have w2i->Modified() after write, else doesnt work.
> > > > --ds
> > > >
> > > > On Tuesday 03 April 2007 19:40, you wrote:
> > > > > Hi,
> > > > >
> > > > > I'm using the source from the example page. Looks like:
> > > > >
> > > > > void CSomeClass::Screenshot(vtkRenderWindow* pRenWin)
> > > > > {
> > > > >     vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
> > > > >     vtkBMPWriter* writer = vtkBMPWriter::New();
> > > > >     w2i->SetInput(pRenWin);
> > > > >     w2i->Update();
> > > > >     writer->SetInputConnection(w2i->GetOutputPort());
> > > > >     writer->SetFileName("C:\\test.bmp");
> > > > >     pRenWin->Render();
> > > > >     writer->Write();
> > > > > }
> > > > >
> > > > > if the render window was doing offscreen rendering, the resulting
> > > > > image will be just black. If doing on screen rendering, the filter
> > > > > will just capture any other windows 'on top of' the render window. I
> > > > > thought this filter used to capture exactly what was in the renderer,
> > > > > regardless of what other windows were on top of it, or if it was doing
> > > > > offscreen rendering. I know if I revert back to the VTK release
> > > > > version the same code above works fine with offscreen rendering,
> > > > > probably with onscreen rendering and overlapping windows?
> > > > >
> > > > > Thanks,
> > > > > Mark
> > > > >
> > > > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > > > I once had a similar problem (empty screen) and if I recall properly
> > > > > > the solution was to call Modified() somewhere.
> > > > > > Dominik
> > > > > >
> > > > > > On Tuesday 03 April 2007 15:19, Mark Wyszomierski wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > Has anyone tried using the CVS version of vtkWindowToImageFilter?
> > > > > > > It seems to produce an empty image when used. Reverting back to the
> > > > > > > 'release' version 5x of VTK, the same code that uses it produces
> > > > > > > correct results. Just wondering if anyone experienced the same
> > > > > > > thing or any ways around it,
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Mark
> > > > > > > _______________________________________________
> > > > > > > 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, PhD
> > > > > > 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
> > > >
> > > > --
> > > > Dominik Szczerba, PhD
> > > > 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
> >
> > --
> > Dominik Szczerba, PhD
> > 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
> >
>
>
> ------------------------------
>
> Message: 7
> Date: Tue, 3 Apr 2007 16:35:01 -0400
> From: "Mark Wyszomierski" <markww at gmail.com>
> Subject: Re: [vtkusers] vtkWindowToImageFilter
> To: "Dominik Szczerba" <domi at vision.ee.ethz.ch>,
>         francois.bertel at kitware.com
> Cc: vtkusers at vtk.org
> Message-ID:
>         <dfdfe01e0704031335m31784dfar859f438f13639b82 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> This seems to work:
>
> void CSomeClass::MakeScreenshot(vtkRenderWindow* pRenWin)
> {
>     pRenWin->OffScreenRenderingOn();
>     pRenWin->Modified();
>     pRenWin->Render();
>
>     // You can use the pointer to write the renderer buffer contents
> to file now.
>     // It is at least the real image without any artifacts etc.
>     const unsigned char *pPix = pRenWin->GetRGBACharPixelData(0, 0,
> cx-1, cy-1, 0);
>
>      // ...
>
>      pRenWin->OffScreenRenderingOff();
> }
>
> I had to turn offscreen rendering on then off. I haven't tried it with
> the window to image filter but it should work. It looks to be ok with
> just the raw buffer pointer.
>
> Thanks for your help!
> Mark
>
>
>
> On 4/3/07, Mark Wyszomierski <markww at gmail.com> wrote:
> > Hi Dominik,
> >
> > That's the problem - if any part of the render window is overlapped,
> > or just off screen rendering is on, I'll get an incorrect image.
> >
> > As far as I can tell, there is no way to do this at the moment. How
> > are other people doing this? I could try using vtkGL2PSExporter as you
> > suggested but it might be too slow to do quick screen captures.
> >
> > Thanks,
> > Mark
> >
> > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > With a png file the covered of off-desktop part will be empty.My code:
> > >
> > >                vtkSmartPointer<vtkPNGWriter> writer = vtkSmartPointer<vtkPNGWriter>::New();
> > >                w2i->Update();
> > >                writer->SetInputConnection(w2i->GetOutputPort());
> > >                writer->SetFileName((curr_fname+".png").c_str());
> > >                renWin->Render();
> > >                writer->Write();
> > >                w2i->Modified(); //w2i is a global
> > >
> > > BTW. The effect of vtkGL2PSExporter will always be OK.
> > > Dominik
> > >
> > > On Tuesday 03 April 2007 21:21, Mark Wyszomierski wrote:
> > > > Hi Dominik,
> > > >
> > > > That didn't seem to have any effect for me, because the bitmap is
> > > > already written out at the time writer->Write() is called.
> > > >
> > > > Can I ask you though, what happens if you drag your render window
> > > > partially off your desktop screen so it gets clipped by the edges - do
> > > > you still get the entire render window contents captured? Nothing I do
> > > > seems to get around this problem. I've traced into the render window
> > > > class and it does seem to be reading the pixels from the back buffer:
> > > >
> > > >     glReadBuffer(static_cast<GLenum>(this->GetBackLeftBuffer()));
> > > >
> > > > still I get artifacts of overlapping windows in my screenshot!
> > > >
> > > > Thanks,
> > > > Mark
> > > >
> > > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > > I have w2i->Modified() after write, else doesnt work.
> > > > > --ds
> > > > >
> > > > > On Tuesday 03 April 2007 19:40, you wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I'm using the source from the example page. Looks like:
> > > > > >
> > > > > > void CSomeClass::Screenshot(vtkRenderWindow* pRenWin)
> > > > > > {
> > > > > >     vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
> > > > > >     vtkBMPWriter* writer = vtkBMPWriter::New();
> > > > > >     w2i->SetInput(pRenWin);
> > > > > >     w2i->Update();
> > > > > >     writer->SetInputConnection(w2i->GetOutputPort());
> > > > > >     writer->SetFileName("C:\\test.bmp");
> > > > > >     pRenWin->Render();
> > > > > >     writer->Write();
> > > > > > }
> > > > > >
> > > > > > if the render window was doing offscreen rendering, the resulting
> > > > > > image will be just black. If doing on screen rendering, the filter
> > > > > > will just capture any other windows 'on top of' the render window. I
> > > > > > thought this filter used to capture exactly what was in the renderer,
> > > > > > regardless of what other windows were on top of it, or if it was doing
> > > > > > offscreen rendering. I know if I revert back to the VTK release
> > > > > > version the same code above works fine with offscreen rendering,
> > > > > > probably with onscreen rendering and overlapping windows?
> > > > > >
> > > > > > Thanks,
> > > > > > Mark
> > > > > >
> > > > > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > > > > I once had a similar problem (empty screen) and if I recall properly
> > > > > > > the solution was to call Modified() somewhere.
> > > > > > > Dominik
> > > > > > >
> > > > > > > On Tuesday 03 April 2007 15:19, Mark Wyszomierski wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > Has anyone tried using the CVS version of vtkWindowToImageFilter?
> > > > > > > > It seems to produce an empty image when used. Reverting back to the
> > > > > > > > 'release' version 5x of VTK, the same code that uses it produces
> > > > > > > > correct results. Just wondering if anyone experienced the same
> > > > > > > > thing or any ways around it,
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Mark
> > > > > > > > _______________________________________________
> > > > > > > > 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, PhD
> > > > > > > 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
> > > > >
> > > > > --
> > > > > Dominik Szczerba, PhD
> > > > > 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
> > >
> > > --
> > > Dominik Szczerba, PhD
> > > 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
> > >
> >
>
>
> ------------------------------
>
> Message: 8
> Date: Tue, 3 Apr 2007 22:36:09 +0200
> From: Dominik Szczerba <domi at vision.ee.ethz.ch>
> Subject: Re: [vtkusers] vtkWindowToImageFilter
> To: vtkusers at vtk.org
> Message-ID: <200704032236.09769.domi at vision.ee.ethz.ch>
> Content-Type: text/plain;  charset="iso-8859-1"
>
> I am not sure if this has really anything to do with VTK. I have a commercial
> program that does the same thing when taking screenshots. I recall now that
> disabling DRI removed this effect indicating problems with the driver. I
> would disable DRI in your case just for a test.
> bye
> Dominik
>
> On Tuesday 03 April 2007 22:23, you wrote:
> > Hi Dominik,
> >
> > That's the problem - if any part of the render window is overlapped,
> > or just off screen rendering is on, I'll get an incorrect image.
> >
> > As far as I can tell, there is no way to do this at the moment. How
> > are other people doing this? I could try using vtkGL2PSExporter as you
> > suggested but it might be too slow to do quick screen captures.
> >
> > Thanks,
> > Mark
> >
> > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > With a png file the covered of off-desktop part will be empty.My code:
> > >
> > >                vtkSmartPointer<vtkPNGWriter> writer =
> > > vtkSmartPointer<vtkPNGWriter>::New(); w2i->Update();
> > >                writer->SetInputConnection(w2i->GetOutputPort());
> > >                writer->SetFileName((curr_fname+".png").c_str());
> > >                renWin->Render();
> > >                writer->Write();
> > >                w2i->Modified(); //w2i is a global
> > >
> > > BTW. The effect of vtkGL2PSExporter will always be OK.
> > > Dominik
> > >
> > > On Tuesday 03 April 2007 21:21, Mark Wyszomierski wrote:
> > > > Hi Dominik,
> > > >
> > > > That didn't seem to have any effect for me, because the bitmap is
> > > > already written out at the time writer->Write() is called.
> > > >
> > > > Can I ask you though, what happens if you drag your render window
> > > > partially off your desktop screen so it gets clipped by the edges - do
> > > > you still get the entire render window contents captured? Nothing I do
> > > > seems to get around this problem. I've traced into the render window
> > > > class and it does seem to be reading the pixels from the back buffer:
> > > >
> > > >     glReadBuffer(static_cast<GLenum>(this->GetBackLeftBuffer()));
> > > >
> > > > still I get artifacts of overlapping windows in my screenshot!
> > > >
> > > > Thanks,
> > > > Mark
> > > >
> > > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > > I have w2i->Modified() after write, else doesnt work.
> > > > > --ds
> > > > >
> > > > > On Tuesday 03 April 2007 19:40, you wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I'm using the source from the example page. Looks like:
> > > > > >
> > > > > > void CSomeClass::Screenshot(vtkRenderWindow* pRenWin)
> > > > > > {
> > > > > >     vtkWindowToImageFilter* w2i = vtkWindowToImageFilter::New();
> > > > > >     vtkBMPWriter* writer = vtkBMPWriter::New();
> > > > > >     w2i->SetInput(pRenWin);
> > > > > >     w2i->Update();
> > > > > >     writer->SetInputConnection(w2i->GetOutputPort());
> > > > > >     writer->SetFileName("C:\\test.bmp");
> > > > > >     pRenWin->Render();
> > > > > >     writer->Write();
> > > > > > }
> > > > > >
> > > > > > if the render window was doing offscreen rendering, the resulting
> > > > > > image will be just black. If doing on screen rendering, the filter
> > > > > > will just capture any other windows 'on top of' the render window.
> > > > > > I thought this filter used to capture exactly what was in the
> > > > > > renderer, regardless of what other windows were on top of it, or if
> > > > > > it was doing offscreen rendering. I know if I revert back to the
> > > > > > VTK release version the same code above works fine with offscreen
> > > > > > rendering, probably with onscreen rendering and overlapping
> > > > > > windows?
> > > > > >
> > > > > > Thanks,
> > > > > > Mark
> > > > > >
> > > > > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > > > > I once had a similar problem (empty screen) and if I recall
> > > > > > > properly the solution was to call Modified() somewhere.
> > > > > > > Dominik
> > > > > > >
> > > > > > > On Tuesday 03 April 2007 15:19, Mark Wyszomierski wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > Has anyone tried using the CVS version of
> > > > > > > > vtkWindowToImageFilter? It seems to produce an empty image when
> > > > > > > > used. Reverting back to the 'release' version 5x of VTK, the
> > > > > > > > same code that uses it produces correct results. Just wondering
> > > > > > > > if anyone experienced the same thing or any ways around it,
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Mark
> > > > > > > > _______________________________________________
> > > > > > > > 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, PhD
> > > > > > > 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
> > > > >
> > > > > --
> > > > > Dominik Szczerba, PhD
> > > > > 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
> > >
> > > --
> > > Dominik Szczerba, PhD
> > > 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
>
> --
> Dominik Szczerba, PhD
> Computer Vision Lab CH-8092 Zurich
> http://www.vision.ee.ethz.ch/~domi
>
>
> ------------------------------
>
> Message: 9
> Date: Tue, 3 Apr 2007 18:28:34 -0400
> From: Philip Schuchardt <ohc at vt.edu>
> Subject: Re: [vtkusers] vtkCaptionActor2D text orientation
> To: Jes?s Sp??nola <jspinola at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID: <200704031828.34542.ohc at vt.edu>
> Content-Type: text/plain;  charset="iso-8859-1"
>
> You could do this if vtk supported transformation of 2D actors but I don't
> think is support it.  Probably your best option(but most painful) is to write
> your own text actor class.
>
> On Monday 02 April 2007 10:32 am, you wrote:
> > I agree with your opinion Phillip, but your reply doesn't answer my
> > question... I was not asking for performance, I'm using 2D text actors and
> > I want to change their orientation... I want to know if this is possible
> >
> > On 3/30/07, Philip Schuchardt <ohc at vt.edu> wrote:
> > > My experience with the caption actors that is that they fairly limited
> > > and annoying because the text changes size with different lengths.  I
> > > feel that
> > > the vtkTextActor's are fairly slow because of anti-aliasing(In 5.0 you
> > > can't
> > > turn anti-aliasing off :( ).  If you try to add lots of text actors,
> > > preformace will drop considerably.
> > >
> > > Philip Schuchardt
> > >
> > > On Thursday 29 March 2007 7:36 am, Jes�s Sp�nola wrote:
> > > > Hi,
> > > >
> > > > I'm using vtkCaptionActor2D to make annotations over images with
> > > > vtkImageViewer2. Sometimes is needed to make this annotations with a
> > > > different orientation rather than the usual "Left to Right" way, for
> > > > example upside-down in right to left way, or vertically in bottom to up
> > >
> > > way
> > >
> > > > or viceversa.
> > > >
> > > > I figured this can be done getting the vtkTextProperty and then setting
> > >
> > > the
> > >
> > > > orientation with the SetOrientation method. The fact is the text is
> > >
> > > always
> > >
> > > > displayed in the usual left-to-right way. I've tried with 0, 90, 180
> > > > and 270 degrees and it always displays with the same orientation.
> > > >
> > > > Do I have to take into account another parameters to show the text in
> > >
> > > the
> > >
> > > > desired orientation? How can I achieve this?
> > > >
> > > > Thanks in advance!
> > >
> > > _______________________________________________
> > > 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
>
>
> ------------------------------
>
> Message: 10
> Date: Tue, 3 Apr 2007 15:54:23 -0700
> From: "Vladislav Petyuk" <petyuk at gmail.com>
> Subject: [vtkusers] drawing a simple volumetric cube
> To: vtkusers at vtk.org
> Message-ID:
>         <b0cd65410704031554t649225bex3e93aef1f2fdf5f9 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I have a very basic question: what is the right way to create a volumetric
> cube or voxel with a certain scalar value associated with it. The way I've
> done it so far is show below with Python code. It just seems a little bit
> awkward to me, that I have to define quite a bit of points instead of just 8
> to draw a cube with vtkVolumeRayCastCompositeFunction. If I use N = 2 (that
> is 8 points) it does not looks like a cube any more. It looks like a cube
> again if I switch to vtkVolumeRayCastIsosurfaceFunction or
> vtkVolumeRayCastMIPFunction, but transparency and color function do not work
> in the first case and shade in the second. I'm not sure if I'm drawing a
> cube in a right way.
>
>
>
> So my question is: how one should draw a volumetric cube or voxel by
> defining just 8 points, so the transparency and color can be set according
> to a scalar value, and with shades?
>
>
>
> I'm planning to use those cubes/voxels for a 3D object reconstruction (with
> non-hexahedral shape), which was cut into bunch of cubes. Scalar values
> associated with those cubes represent the intensities of a certain measured
> parameter.
>
>
>
> Thank you for any advice,
>
> Vlad
>
>
>
>
>
>
>
> import vtk
>
>
>
> ren = vtk.vtkRenderer()
>
> renWin = vtk.vtkRenderWindow()
>
> renWin.AddRenderer(ren)
>
> iren = vtk.vtkRenderWindowInteractor()
>
> iren.SetRenderWindow(renWin)
>
>
>
> N = 10 #number of points along a dimension.
>
> #cube looks awkward if N < 4
>
> imData = vtk.vtkImageData()
>
> imData.SetDimensions(N,N,N)
>
>
>
> scalars = vtk.vtkUnsignedShortArray()
>
> scalars.SetNumberOfValues(N**3)
>
>
>
> value = 100 #some fixed value to assign
>
> for x in range(N**3):
>
>             scalars.SetValue(x,value)
>
>
>
> imData.GetPointData().SetScalars(scalars)
>
>
>
> opacityTransferFunction = vtk.vtkPiecewiseFunction()
>
> opacityTransferFunction.AddPoint(0.0, 0.3)
>
> opacityTransferFunction.AddPoint(255.0, 0.3)
>
>
>
> colorTransferFunction = vtk.vtkColorTransferFunction()
>
> colorTransferFunction.AddRGBPoint(0.0, 1,0,0)
>
> colorTransferFunction.AddRGBPoint(127.0, 0,1,0)
>
> colorTransferFunction.AddRGBPoint(255.0, 0,0,1)
>
>
>
> volumeProperty = vtk.vtkVolumeProperty()
>
> volumeProperty.SetScalarOpacity(opacityTransferFunction)
>
> volumeProperty.SetColor(colorTransferFunction)
>
> volumeProperty.ShadeOn()
>
> volumeProperty.SetInterpolationTypeToNearest()
>
>
>
> rayCastFunction = vtk.vtkVolumeRayCastCompositeFunction()
>
> ##rayCastFunction = vtk.vtkVolumeRayCastMIPFunction()
>
> ##rayCastFunction = vtk.vtkVolumeRayCastIsosurfaceFunction()
>
> volumeMapper = vtk.vtkVolumeRayCastMapper()
>
> volumeMapper.SetVolumeRayCastFunction(rayCastFunction)
>
> volumeMapper.SetInput(imData)
>
>
>
> volume = vtk.vtkVolume()
>
> volume.SetMapper(volumeMapper)
>
> volume.SetProperty(volumeProperty)
>
>
>
> ren.AddVolume(volume)
>
> ren.SetBackground(0.5,0.5,0.5)
>
> renWin.SetSize(600,600)
>
> iren.Initialize()
>
> renWin.Render()
>
> iren.Start()
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://public.kitware.com/pipermail/vtkusers/attachments/20070403/17b5c99d/attachment.html
>
> ------------------------------
>
> Message: 11
> Date: Wed, 4 Apr 2007 11:04:10 +0200
> From: "Lasso, Andras (GE Healthcare)" <Andras.Lasso at med.ge.com>
> Subject: RE: [vtkusers] vtkWindowToImageFilter
> To: <vtkusers at vtk.org>
> Message-ID:
>         <ADC090407FAA3046938E4AED619DFBF8E5BB61 at BUDMLVEM05.e2k.ad.ge.com>
> Content-Type: text/plain;       charset="us-ascii"
>
> Mark,
>
> We use vtkWindowToImageFilter to perform off-screen rendering.
>
> In windows it works correctly with default settings (no rendering window
> is displayed, rendered image is correct and complete).
>
> In linux we had the same problem as you (a rendering window was popped
> up, the captured image contained the pixels in the screen buffer at the
> location of the rendering window, so if any window overlapped the area
> then the captured image was corrupted).
>
> The solution for us was to compile VTK with the MESA libraries (instead
> of the default OpenGL):
> OPENGL_INCLUDE_DIR:PATH=/export/home1/app1/Mesa-6.5.2/include
> OPENGL_gl_LIBRARY:FILEPATH=/export/home1/app1/Mesa-6.5.2/lib/libGL.so
> OPENGL_glu_LIBRARY:FILEPATH=/export/home1/app1/Mesa-6.5.2/lib/libGLU.so
> OPENGL_xmesa_INCLUDE_DIR:PATH=/export/home1/app1/Mesa-6.5.2/include
> OSMESA_INCLUDE_DIR:PATH=/export/home1/app1/Mesa-6.5.2/include
> OSMESA_LIBRARY:FILEPATH=/export/home1/app1/Mesa-6.5.2/lib/libOSMesa.so
> VTK_OPENGL_HAS_OSMESA:BOOL=ON
> VTK_USE_MANGLED_MESA:BOOL=OFF
> vtkRendering_LIB_DEPENDS:STATIC=vtkGraphics;vtkImaging;vtkIO;vtkftgl;vtk
> freetype;/export/home1/app1/Mesa-6.5.2/lib/libGL.so;/export/home1/app1/M
> esa-6.5.2/lib/libOSMesa.so;-lXt;-lSM;-lICE;-lSM;-lICE;/usr/X11R6/lib/lib
> X11.so;/usr/X11R6/lib/libXext.so;/usr/X11R6/lib/libX11.so;/usr/X11R6/lib
> /libXext.so;
>
> There may be drivers for MESA with that you can get hardware
> acceleration (you need one that supports PBuffer rendering, otherwise
> you'll have the same problem as with the OpenGL implementation).
>
> If you would like to use OpenGL for on-screen rendering and MESA for
> off-screen rendering then you have to compile VTK with mangled MESA (as
> I understood from previous posts you may have to do some modifications
> in VTK or MESA to make it work with the latest library versions).
>
> Andras
>
>
> -----Original Message-----
> From: vtkusers-bounces+andras.lasso=med.ge.com at vtk.org
> [mailto:vtkusers-bounces+andras.lasso=med.ge.com at vtk.org] On Behalf Of
> Dominik Szczerba
> Sent: Tuesday, April 03, 2007 10:36 PM
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] vtkWindowToImageFilter
>
> I am not sure if this has really anything to do with VTK. I have a
> commercial program that does the same thing when taking screenshots. I
> recall now that disabling DRI removed this effect indicating problems
> with the driver. I would disable DRI in your case just for a test.
> bye
> Dominik
>
> On Tuesday 03 April 2007 22:23, you wrote:
> > Hi Dominik,
> >
> > That's the problem - if any part of the render window is overlapped,
> > or just off screen rendering is on, I'll get an incorrect image.
> >
> > As far as I can tell, there is no way to do this at the moment. How
> > are other people doing this? I could try using vtkGL2PSExporter as you
>
> > suggested but it might be too slow to do quick screen captures.
> >
> > Thanks,
> > Mark
> >
> > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > With a png file the covered of off-desktop part will be empty.My
> code:
> > >
> > >                vtkSmartPointer<vtkPNGWriter> writer =
> > > vtkSmartPointer<vtkPNGWriter>::New(); w2i->Update();
> > >                writer->SetInputConnection(w2i->GetOutputPort());
> > >                writer->SetFileName((curr_fname+".png").c_str());
> > >                renWin->Render();
> > >                writer->Write();
> > >                w2i->Modified(); //w2i is a global
> > >
> > > BTW. The effect of vtkGL2PSExporter will always be OK.
> > > Dominik
> > >
> > > On Tuesday 03 April 2007 21:21, Mark Wyszomierski wrote:
> > > > Hi Dominik,
> > > >
> > > > That didn't seem to have any effect for me, because the bitmap is
> > > > already written out at the time writer->Write() is called.
> > > >
> > > > Can I ask you though, what happens if you drag your render window
> > > > partially off your desktop screen so it gets clipped by the edges
> > > > - do you still get the entire render window contents captured?
> > > > Nothing I do seems to get around this problem. I've traced into
> > > > the render window class and it does seem to be reading the pixels
> from the back buffer:
> > > >
> > > >     glReadBuffer(static_cast<GLenum>(this->GetBackLeftBuffer()));
> > > >
> > > > still I get artifacts of overlapping windows in my screenshot!
> > > >
> > > > Thanks,
> > > > Mark
> > > >
> > > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > > I have w2i->Modified() after write, else doesnt work.
> > > > > --ds
> > > > >
> > > > > On Tuesday 03 April 2007 19:40, you wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I'm using the source from the example page. Looks like:
> > > > > >
> > > > > > void CSomeClass::Screenshot(vtkRenderWindow* pRenWin) {
> > > > > >     vtkWindowToImageFilter* w2i =
> vtkWindowToImageFilter::New();
> > > > > >     vtkBMPWriter* writer = vtkBMPWriter::New();
> > > > > >     w2i->SetInput(pRenWin);
> > > > > >     w2i->Update();
> > > > > >     writer->SetInputConnection(w2i->GetOutputPort());
> > > > > >     writer->SetFileName("C:\\test.bmp");
> > > > > >     pRenWin->Render();
> > > > > >     writer->Write();
> > > > > > }
> > > > > >
> > > > > > if the render window was doing offscreen rendering, the
> > > > > > resulting image will be just black. If doing on screen
> > > > > > rendering, the filter will just capture any other windows 'on
> top of' the render window.
> > > > > > I thought this filter used to capture exactly what was in the
> > > > > > renderer, regardless of what other windows were on top of it,
> > > > > > or if it was doing offscreen rendering. I know if I revert
> > > > > > back to the VTK release version the same code above works fine
>
> > > > > > with offscreen rendering, probably with onscreen rendering and
>
> > > > > > overlapping windows?
> > > > > >
> > > > > > Thanks,
> > > > > > Mark
> > > > > >
> > > > > > On 4/3/07, Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
> > > > > > > I once had a similar problem (empty screen) and if I recall
> > > > > > > properly the solution was to call Modified() somewhere.
> > > > > > > Dominik
> > > > > > >
> > > > > > > On Tuesday 03 April 2007 15:19, Mark Wyszomierski wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > Has anyone tried using the CVS version of
> > > > > > > > vtkWindowToImageFilter? It seems to produce an empty image
>
> > > > > > > > when used. Reverting back to the 'release' version 5x of
> > > > > > > > VTK, the same code that uses it produces correct results.
> > > > > > > > Just wondering if anyone experienced the same thing or any
>
> > > > > > > > ways around it,
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Mark
> > > > > > > > _______________________________________________
> > > > > > > > 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, PhD
> > > > > > > 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
> > > > >
> > > > > --
> > > > > Dominik Szczerba, PhD
> > > > > 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
> > >
> > > --
> > > Dominik Szczerba, PhD
> > > 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
>
> --
> Dominik Szczerba, PhD
> 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
>
>
> ------------------------------
>
> Message: 12
> Date: Wed, 4 Apr 2007 11:08:40 +0200
> From: "Sergi Dote" <sergidt at gmail.com>
> Subject: [vtkusers] coordinates problem
> To: vtkusers at vtk.org
> Message-ID:
>         <24c6a4c30704040208i569ef6a5gdb79a026912090e3 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello vtkusers, I need your Knowledge, because I have a problem:
>
> I am developing a tool for to calculate distances on a vtkImageData. Each
> distance is represented with a vtkLineSource, and a mapper2D and actor2D.
> this mapper2D uses a world system coordinates. I work with 2D because my
> framework use this system. Up to this point  all that I have implemented run
> correctly. My problem appears when I want to draw the ends on a distance. I
> represent them with a vtkDiskSource, a mapper2D and a actor2D, each end of
> distance. Each mapper2D of the vtkDiskSources works like my distance system
> coordinate, this is with world system coordinate. Before to render each
> disk, I show what is his position and is equal to end of the distance, I
> want to say that the position of each disk is correct, I ask too what is the
> system coordinate of the distance and of each disk, and they are the same
> coordinate system. Though I am insure  of the use of the same coordinate
> system and same position, the disks do not appear in supposed and correct
> position for that I wait.
> Somebody knows what is the problem?
>
> if you want that I post my code, say me it.
>
> Thaks a lot.
>
>
> --
> .: Sergi Dote Teixidor :.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://public.kitware.com/pipermail/vtkusers/attachments/20070404/1f8528ff/attachment-0001.htm
>
> ------------------------------
>
> Message: 13
> Date: Wed, 4 Apr 2007 12:39:28 +0200
> From: "Allan Della Libera" <allan.dellalibera at exprivia.it>
> Subject: [vtkusers] vtk 5.1 and Visual Studio Intellisense
> To: <vtkusers at vtk.org>
> Message-ID:
>         <D74DACA6A0513B4E947A74A7AD67DDB1358DA1 at abc-milano.milano.abacosoft.it>
>
> Content-Type: text/plain; charset="us-ascii"
>
> I'm using vtk 5.1 source code with Visual studio .NET 2003 as static
> lib. I put generated libs and include files a tree as
>
> vtk/
>     include/
>         lib/
>             debug/
>             relese/
>
> For debug i putted into lib/debug dir also .pdb files. My projects
> references these directories to build. Unfortunately I could't use
> Intellisense to view  vtk functions, classes parameters. Could you help
> me?
>
> Best Regards.
>
>
>
> Allan Della Libera
>
>
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://public.kitware.com/pipermail/vtkusers/attachments/20070404/959ce53c/attachment-0001.html
>
> ------------------------------
>
> Message: 14
> Date: Wed, 04 Apr 2007 13:40:12 +0200
> From: fred <fredmfp at gmail.com>
> Subject: [vtkusers] writing several scalars in one file (py and C)...
> To: vtkusers <vtkusers at vtk.org>
> Message-ID: <46138E9C.9070004 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-15; format=flowed
>
> Hi all,
>
> I wonder how can I write several scalars in one file, in C and python.
>
> In C, I tried something like this:
>
> car2[1] = 'v';
> vtkXMLWriterC_SetPointData(writer, car2, VTK_DATA_TYPE, vtk_tab_scal_v,
> nbpoints, 1, "SCALARS");
> car2[1] = 'x';
> vtkXMLWriterC_SetPointData(writer, car2, VTK_DATA_TYPE, vtk_tab_scal_x,
> nbpoints, 1, "SCALARS");
> car2[1] = 'y';
> vtkXMLWriterC_SetPointData(writer, car2, VTK_DATA_TYPE, vtk_tab_scal_y,
> nbpoints, 1, "SCALARS");
> car2[1] = 'z';
> vtkXMLWriterC_SetPointData(writer, car2, VTK_DATA_TYPE, vtk_tab_scal_z,
> nbpoints, 1, "SCALARS");
>
> vtkXMLWriterC_SetFileName(writer, filename);
> vtkXMLWriterC_Write(writer);
> vtkXMLWriterC_Delete(writer);
>
> In python, I tried something like this:
>
>     writer = vtkImageData()
>     writer.SetExtent(0, Nx-1, 0, Ny-1, 0, Nz-1)
>     writer.SetOrigin(x0, y0, z0)
>     writer.SetSpacing(dx, dy, dz)
>
>     vtkdata = vtkFloatArray()
>     vtkdata.SetName('raw')
>     for k in range(Nz):
>         for j in range(Ny):
>             for i in range(Nx):
>                 vtkdata.InsertNextValue(float(data1[i][j][k]))
>     writer.GetPointData().SetScalars(vtkdata)
>
>     vtkdata = vtkFloatArray()
>     vtkdata.SetName('filtered')
>     for k in range(Nz):
>         for j in range(Ny):
>             for i in range(Nx):
>                 vtkdata.InsertNextValue(float(data2[i][j][k]))
>     writer.GetPointData().SetScalars(vtkdata)
>
>     vtkdata = vtkFloatArray()
>     vtkdata.SetName('residue')
>     for k in range(Nz):
>         for j in range(Ny):
>             for i in range(Nx):
>                 vtkdata.InsertNextValue(float(data3[i][j][k]))
>     writer.GetPointData().SetScalars(vtkdata)
>
>     fd = vtkXMLImageDataWriter()
>     fd.SetFileName(filename)
>     fd.SetInput(writer)
>     fd.Write()
>
> But none works: the last scalar data erase the previous.
>
> Where can I find info about this ? (gave a look in the VTK book, but
> found nothing).
>
> Any suggestion ?
>
> Thanks in advance.
>
> Cheers,
>
> --
> /F
>
>
>
> ------------------------------
>
> Message: 15
> Date: Wed, 4 Apr 2007 05:19:00 -0700 (PDT)
> From: medamine <miladimedamine at yahoo.fr>
> Subject: [vtkusers] marching cube
> To: vtkusers at vtk.org
> Message-ID: <9835843.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hi;
> I would like to knew the marching cube algorithme using vtk.
> thanks.
>
> --
> View this message in context: http://www.nabble.com/marching-cube-tf3525501.html#a9835843
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 16
> Date: Wed, 4 Apr 2007 14:37:15 +0200
> From: "Lazzarato Dr. Gianni" <lazzadrgi at libero.it>
> Subject: R: [vtkusers] atan2 domain error and distance widget error
> To: "'Michael Knopke'" <Michael.Knopke at gmx.de>
> Cc: vtkusers at vtk.org
> Message-ID: <FBCMFE02B08bS8oLhWT00090a58 at FBCMFE02B08.fbc.local>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Michael,
>
>                  i resolved by myself :
>
>
>
> For anglewidget problem I take care at the case where     double theta1 =
> atan2(p1[1]-c[1],p1[0]-c[0]) ;   take 0 values ->     double theta1 =
> atan2(0,0);      in vtkAngleRepresentation2d.
>
> ( the same for theta2,obviously)
>
>
>
> Also I changed the value of font scaling in vtkleaderactor2d (#define
> VTK_LA2D_FACTOR 0.015)   increasing to 0.025.
>
> I did the same also for vtkimageaxis2d involved in vtkdistancewidget.
>
>
>
> That�s all , everything is ok for me, right now.  :)
>
>
>
> Regards
>
> Gianni
>
>
>
>
>
>   _____
>
> Da: vtkusers-bounces+lazzadrgi=libero.it at vtk.org
> [mailto:vtkusers-bounces+lazzadrgi=libero.it at vtk.org] Per conto di Michael
> Knopke
> Inviato: marted� 3 aprile 2007 9.26
> A: vtkusers at vtk.org
> Oggetto: [vtkusers] atan2 domain error
>
>
>
> Hi,
>
>
>
> I have posted this error long time ago in the bugtracker, so far no answer.
> The problem seems not the class vtkAngleWidget itself, its rather related to
> a different behavior of one of it�s superclasses, I guess it is
> vtkAbstractWidget. So in the end vtkAngleWidget needs to be changed to
> accommodate this new behavior.
>
> If you make any progress with it, let the forum know please.
>
>
>
> Regards
>
>
>
> Michael
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://public.kitware.com/pipermail/vtkusers/attachments/20070404/6196dbc4/attachment-0001.htm
>
> ------------------------------
>
> Message: 17
> Date: Wed, 4 Apr 2007 15:45:54 +0100
> From: " Jo?o Manuel R. S. Tavares " <tavares at fe.up.pt>
> Subject: [vtkusers] Symposium "Computational Methods in Image
>         Analysis"       within the USNCCM IX Congress - Announce & Call for Papers
> To: <vtkusers at vtk.org>
> Message-ID: <005801c776c7$f58f7ee0$7bbf1eac at torgh>
> Content-Type: text/plain;       charset="iso-8859-1"
>
>
> ----------------------------------------------------------------------------
> -------------------------
>
> (Apologies for cross-posting)
>
> Symposium �Computational Methods in Image Analysis�
> National Congress on Computational Mechanics (USNCCM IX) San Francisco, CA,
> USA, July 22 - 26 2007 http://www.me.berkeley.edu/compmat/USACM/main.html
>
> We would appreciate if you could distribute this information by your
> colleagues and co-workers.
>
> ----------------------------------------------------------------------------
> -------------------------
>
>
> Dear Colleague,
>
> Within the National Congress on Computational Mechanics (USNCCM IX), to be
> held in San Francisco, CA, USA, July 22 - 26 2007, we are organizing the
> Symposium �Computational Methods in Image Analysis�. Examples of some topics
> that will be considered in that symposium are: Image acquisition, Image
> processing and analysis, Image segmentation, 3D Vision, Motion analysis,
> Pattern recognition, Objects recognition, Medical imaging and Tools and
> applications.
> Due to your research activities in those fields, we would like to invite you
> to submit an abstract and participate in the symposium �Computational
> Methods in Image Analysis�.
>
> For instructions and submission, please access to the congress website at:
> http://www.me.berkeley.edu/compmat/USACM/main.html.
> Please note, when submitting your abstract you should select �Computational
> Methods in Image Analysis�.
>
> Important dates:
>
> - Deadline for abstract submissions: May 1, 2007
> - Final selection of abstracts: May 15, 2007
> - Deadline for early registration: May 22, 2007
> - Deadline for CD-ready abstracts: June 1, 2007
> - Deadline for regular registration: July 15, 2007
>
>
> Kind regards,
>
> Jo�o Manuel R. S. Tavares
> Renato Natal Jorge
> Yongjie Zhang
> Dinggang Shen
> (Symposium organizers)
>
>
>
> ------------------------------
>
> _______________________________________________
> vtkusers mailing list
> vtkusers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
> End of vtkusers Digest, Vol 36, Issue 4
> ***************************************
>


More information about the vtkusers mailing list