[Insight-users] VTK render window error?

Samuel Rodríguez Bescos srodrigu@gbt.tfo.upm.es
Mon, 31 Mar 2003 11:00:53 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0023_01C2F774.CC682700
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hello Joris,

I had the same problem and I asked to this list.

I post you the response of Luis Ibanez.

(Luis, I hope you don't mind.)

What I do is waiting for new versions of VTK but I haven't checked yet.

Regards,

Sam
----- Original Message -----
From: "J Mst" <gave_edgar@hotmail.com>
To: <insight-users@public.kitware.com>
Sent: Monday, March 31, 2003 10:42 AM
Subject: [Insight-users] VTK render window error?


>
>
>
> Hi all,
>
> I've a question about the renderwindow. I'm using ITK and VTK to show an
> image. The image is first being prcessed with ITK and then it'll be shown
> with VTK. I tried both the imageviewer and the renderwindow (with actors).
> I'm all doing this in an VC++ MFC environment. I desinged it that the
window
> will be rendered when the user pushes the render-button.
>
> When I use the ordinary "vtkImageViewer", my program will compile just
fine
> but when I run the program and hit the render window, it gives me an
error.
> I can see the render window but trough the error, the program is stuck.
The
> same think happens when I use a renderwindow with the use of
actors/mappers
> (same principle).
>
> When I use a "vtkRenderWindowInteractor", the render window will show
just.
> In this case I added the command: renderwindowinteractor->Start().
>
> The problem seems solved, but it isn't. When I want to close the window,
> it'll give me the same error as before. So I suspect it has something to
do
> with the return value or something. For clarity, this error occurs when
I'm
> programming in a MFC. The error/break can be seen below.(the arrow
indicates
> the place of the break)
>
> I couldn't find the problem as I looked through the mailing-list so.. Does
> anyone here got a clue how to fix the problem?
>
> !! I know this is not an ITK question but I got no response at the VTK
> !! mailing list.
>
> many thanks in advance.
>
> Joris
> Medical Spectrum
> Enschede, The Netherlands
>
>
> --------------<SNIP>--------------------------------------------
> void VTKImageExportBase::UpdateInformationCallbackFunction(void* userData)
> {
>   static_cast<VTKImageExportBase*>(userData)->
> ----->     UpdateInformationCallback();
> }
>
> int VTKImageExportBase::PipelineModifiedCallbackFunction(void* userData)
> {
>   return static_cast<VTKImageExportBase*>(userData)->
>     PipelineModifiedCallback();
>
> --------------<SNIP>--------------------------------------------
>
>
> _________________________________________________________________
> Hotmail en Messenger on the move
> http://www.msn.nl/communicatie/smsdiensten/hotmailsmsv2/
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users

------=_NextPart_000_0023_01C2F774.CC682700
Content-Type: message/rfc822;
	name="Re_ [Insight-users] Problem with FLTK and VTK.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="Re_ [Insight-users] Problem with FLTK and VTK.eml"

Return-Path: <luis.ibanez@kitware.com>
Received: from relay.upm.es (einstein.ccupm.upm.es [138.100.4.8])
	by gbt.tfo.upm.es (8.11.0/8.11.0) with ESMTP id h1CEKO527295
	for <srodrigu@gbt.tfo.upm.es>; Wed, 12 Feb 2003 15:20:25 +0100
Received: from fep03.biz.rr.com (fep03.biz.rr.com [24.30.201.200])
	by relay.upm.es (8.11.2/8.11.1) with ESMTP id h1CELTL13676
	for <srodrigu@gbt.tfo.upm.es>; Wed, 12 Feb 2003 15:21:29 +0100 (MET)
Received: from kitware.com ([24.97.130.20]) by fep03.biz.rr.com with ESMTP
          id <20030212141807.QQY18040.fep03.biz.rr.com@kitware.com>;
          Wed, 12 Feb 2003 09:18:07 -0500
Message-ID: <3E4A5799.2020308@kitware.com>
Date: Wed, 12 Feb 2003 09:18:01 -0500
From: Luis Ibanez <luis.ibanez@kitware.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.8) Gecko/20020204
X-Accept-Language: en-us
MIME-Version: 1.0
To: Samuel =?ISO-8859-1?Q?Rodr=EDguez?= Bescos <srodrigu@gbt.tfo.upm.es>
CC: insight-users@public.kitware.com
Subject: Re: [Insight-users] Problem with FLTK and VTK
References: <006401c2d28f$5ae74f20$5f0a048a@gbt.tfo.upm.es>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Status:   


Hi Samuel,

This is due to a feature in VTK that prevented
applications from mixing OpenGL windows with
VTK managed windows.

This has been fixed now in the VTK cvs repository.

Basically VTK was caching the OpenGL context
and restoring it assuming that no other OpenGL
windows were used at the same time.

Please update your VTK checkout and let us know
if you find further problems.


    Thanks


       Luis


---

PS. Now that...

Why to use OpenGL directly when you can use VTK  :-)
You could use the vtkFlRenderWindowInteractor as
illustrated in ThinPlatesSplines example and do
all the visualization with VTK.


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

Samuel Rodríguez Bescos wrote:
 > Hello everybody,
 >
 >
 >
 > I'm developing a sgementation program using deformable models. I'm using
 > in my program the FLTKImageViewer to visualize the initial image and the
 > VTK  to visualize the final Mesh.
 >
 >
 >
 > The problem is that when the final Mesh is displayed in VTK. I can't use
 > the window of the initial image in FLTK again. It doesn't respond.
 >
 >
 >
 > I think the problem is related with the functions:
 >
 >
 >
 >  Fl::run(); related with FLTK and the function
 > "m_MeshRenderWindowInteractor->Start();"  used to interact with the
 > final mesh in VTK .
 >
 >
 >
 > Has anybody any Idea? or what have I do to solve it?
 >
 >
 >
 > Thanks in Advance.
 >
 >
 >
 > Sam
 >





------=_NextPart_000_0023_01C2F774.CC682700--