[vtkusers] Render window [error on close/render]

Davide Bianconi bianconi.davide at gmail.com
Thu Mar 17 04:14:56 EST 2005


Hi Alex,
I have resized the render window with the following codes:

this->renWin->SetSize(xSize, ySize);

I have followed your suggestion but I haven't risolved my problem.
My application is developed with Visual Studio .Net, Do You think that
this version have a problem with VC++ MFC Multi document and VTK?

My problem is very strange, It appears only when I change fastly the
active CChildFrm.

thx
sorry for my english :) 

On Wed, 16 Mar 2005 23:07:19 -0500 (EST), 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: Render window [error on close/render]
>      (Alex Cristopher Vivas Munar)
>   2. Re: Problems compiling CVS QT-VTK source code (Clinton Stimpson)
>   3. problem deriving from vtkVolumeRayCastCompositeFunction (Abhishek)
>   4. VTK dataarray question (Richard Lee)
>   5. Re: VTK dataarray question (Amy Squillacote)
>   6. vtk instalation linux (yala kaluma)
>   7. VTKPoints and VTKLookupTable (Toh Da Jun)
>   8. vtk 4.2 compilation error, linux, vtkBMPRead.cxx (Dongbai Guo)
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 16 Mar 2005 12:00:43 -0500
> From: Alex Cristopher Vivas Munar <a-vivas at uniandes.edu.co>
> Subject: Re: [vtkusers] Render window [error on close/render]
> To: Davide Bianconi <bianconi.davide at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID: <1110992443.4238663ba00ef at correo2.uniandes.edu.co>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> hi...
> 
> try define an actor with vtkImageActor with its input is the output of reader of
> image, then link de actor with a render window...
> 
> i have a problem... i open an image with VTK in a render window... how can i
> resize the render window???
> 
> Alex...
> 
> Mensaje citado por Davide Bianconi <bianconi.davide at gmail.com>:
> 
> > Hallo, I have your same problem…  Have you found the solution ?
> > Many thanks.
> >
> > Davide Bianconi
> > Bologna University - Italy
> >
> >
> ---------------------------------------------------------------------------------------------------------------
> > 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?
> >
> >
> > many thanks in advance.
> >
> > Joris ( newbie :) )
> > Medical Spectrum
> > Enschede, The Netherlands
> > _______________________________________________
> > 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: Wed, 16 Mar 2005 10:14:46 -0700
> From: Clinton Stimpson <clinton at elemtech.com>
> Subject: Re: [vtkusers] Problems compiling CVS QT-VTK source code
> To: vtkusers at vtk.org
> Message-ID: <42386986.5050305 at elemtech.com>
> Content-Type: text/plain; charset=us-ascii; format=flowed
> 
> This has been fixed in CVS.
> Clint
> 
> >
> >Message: 2
> >Date: Tue, 15 Mar 2005 20:20:43 -0700
> >From: Clinton Stimpson <clinton at elemtech.com>
> >Subject: Re: [vtkusers] Problems compiling CVS QT-VTK source code
> >To: ma.cardin at swri.ca, vtkusers at vtk.org
> >Message-ID: <20050315202043.8163lra2658g4skw at webmail.xmission.com>
> >Content-Type: text/plain;      charset=ISO-8859-1;     format="flowed"
> >
> >
> >I can help.  That's an interesting error as the two types are definitely
> >related contrary to what the compiler thinks.  What version of the Visual
> >Studio compiler are you using.
> >
> >Clint
> >
> >
> >
> >>Message: 6
> >>Date: Tue, 15 Mar 2005 15:43:32 -0500
> >>From: "Michel-Alexandre Cardin" <ma.cardin at swri.ca>
> >>Subject: [vtkusers] Problems compiling CVS QT-VTK source code
> >>To: <vtkusers at vtk.org>
> >>Message-ID: <000801c5299f$a7181780$1e194c8e at wang>
> >>Content-Type: text/plain;     charset="iso-8859-1"
> >>
> >>Hi,
> >>
> >>I am having problems compiling the code provided by the author "clinton" in
> >>the "[VTK] / GUISupport / Qt / vtkEventQtSlotConnect.cxx" file of the CVS
> >>repository. Here is the message that I get:
> >>
> >>--------------------Configuration: QVTK - Win32 Debug--------------------
> >>Compiling...
> >>vtkEventQtSlotConnect.cxx
> >>C:\VTK\GUISupport\qt\vtkEventQtSlotConnect.cxx(43) : error C2440:
> >>'static_cast' : cannot convert from 'class vtkObject *' to 'class
> >>vtkQtConnection *'
> >>       Types pointed to are unrelated; conversion requires
> >>reinterpret_cast, C-style cast or function-style cast
> >>C:\VTK\GUISupport\qt\vtkEventQtSlotConnect.cxx(43) : error C2440: 'return' :
> >>cannot convert from 'class vtkQtConnection *' to 'class vtkObject *'
> >>       Types pointed to are unrelated; conversion requires
> >>reinterpret_cast, C-style cast or function-style cast
> >>Error executing cl.exe.
> >>
> >>ALL_BUILD - 2 error(s), 0 warning(s)
> >>
> >>Can someone help me with this or provide me the author's email address so I
> >>can communicate directly with him?
> >>
> >>Thanks,
> >>
> >>MA
> >>
> >>============================================
> >>
> >>Michel-Alexandre Cardin, BSc, MASc
> >>Research Engineer/Physicist
> >>Medical Imaging Department S605
> >>Sunnybrook & Women's
> >>College Health Science Centre
> >>2075 Bayview Ave., Toronto
> >>M4N 3M5
> >>+1(416)480-6100 ext: 7482
> >>
> >>
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 16 Mar 2005 12:58:46 -0500
> From: "Abhishek" <gattani at aktina.com>
> Subject: [vtkusers] problem deriving from
>        vtkVolumeRayCastCompositeFunction
> To: <vtkusers at vtk.org>
> Message-ID: <200503161158150.SM01612 at AGworkstation>
> Content-Type: text/plain; charset="us-ascii"
> 
> I derive a class from vtkVolumeRayCastCompositeFunction as:
> 
> Class VTK_RENDERING_EXPORT aktVolumeRayCastDRRCompositeFunction :
> 
>      public vtkVolumeRayCastCompositeFunction
> 
> The only function I override is the RayCast function. I create an instance
> of the new derived class as follows:
> 
> aktVolumeRayCastDRRCompositeFunction *compositeFunction =
> (aktVolumeRayCastDRRCompositeFunction *)
> aktVolumeRayCastDRRCompositeFunction::New();
> 
> And pass this composite function to the volume mapper. But the RayCast
> function that I override does not seem to get called. Instead the one in
> vtkVolumeRayCastCompositeFunction is being called. I am obviously missing
> something here. Can anyone tell me what should be the steps to successfully
> override from vtkVolumeRayCastCompositeFunction. Thanks,
> 
> -Cheers,
> 
> Abhishek
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://public.kitware.com/pipermail/vtkusers/attachments/20050316/633b7590/attachment.html
> 
> ------------------------------
> 
> Message: 4
> Date: Wed, 16 Mar 2005 13:00:27 -0500
> From: "Richard Lee" <gouqizi.lvcha at gmail.com>
> Subject: [vtkusers] VTK dataarray question
> To: <vtkusers at vtk.org>
> Message-ID: <01ba01c52a52$0a14b020$d8fb6ba4 at topaz>
> Content-Type: text/plain; charset="gb2312"
> 
> Hi, All:
> 
> I have an object of class  vtkDataSetAttributes.  When I called its
> GetScalars(), it returns an object vtkDataArray.
> 
> Now how can get the actual data in vtkDataArray without first recasting
> it to its subclass like vtkFloatArray. Can I call some virtual function to do this job?
> 
> Rick
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://public.kitware.com/pipermail/vtkusers/attachments/20050316/15e3fe96/attachment.htm
> 
> ------------------------------
> 
> Message: 5
> Date: Wed, 16 Mar 2005 13:25:39 -0500
> From: Amy Squillacote <amy.squillacote at kitware.com>
> Subject: Re: [vtkusers] VTK dataarray question
> To: "Richard Lee" <gouqizi.lvcha at gmail.com>, <vtkusers at vtk.org>
> Message-ID: <6.2.1.2.2.20050316132516.04254900 at pop.biz.rr.com>
> Content-Type: text/plain; charset="us-ascii"
> 
> Try using either the GetPointer or GetVoidPointer method.
> - Amy
> 
> At 01:00 PM 3/16/2005, Richard Lee wrote:
> >Hi, All:
> >I have an object of class  vtkDataSetAttributes.  When I called its
> >GetScalars(), it returns an object vtkDataArray.
> >
> >Now how can get the actual data in vtkDataArray without first recasting
> >it to its subclass like vtkFloatArray. Can I call some virtual function to
> >do this job?
> >
> >Rick
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at:
> >http://www.vtk.org/Wiki/VTK_FAQ
> >Follow this link to subscribe/unsubscribe:
> >http://www.vtk.org/mailman/listinfo/vtkusers
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://public.kitware.com/pipermail/vtkusers/attachments/20050316/691f1d71/attachment.html
> 
> ------------------------------
> 
> Message: 6
> Date: Thu, 17 Mar 2005 00:10:45 +0100
> From: "yala kaluma" <yala_aiiii at hotmail.com>
> Subject: [vtkusers] vtk instalation linux
> To: vtkusers at vtk.org
> Message-ID: <BAY24-F36191A1D908C4DB2AD72DFE4480 at phx.gbl>
> Content-Type: text/plain; charset=iso-8859-1; format=flowed
> 
> Hi,
> 
> I am trying to install VTK on a Linux computer and I am having problems with
> cmake.
> whe I try to run cmake in my vtk folder it says that cmake do not find my
> c++ compiler.
> I am using the gcc/g++compiler.
> I tried to set the the environment variable CXX to /usr/bin/gcc with the
> command "extract"but it still doesn t work.
> It seems like the modifications that i set to CXX are not taken in
> consideration. As cmake keeps searching for gcc/g++ in the usr/lib/gcc
> directory and keeps giving me feedbacks saying that  usr/lib/gcc is not in
> the PATH...
> I do not understant, It seems like the way i change the env variable is not
> good...
> Somebody can tell me how to change the path under linux???
> I d apreciate any kind of hint...
> 
> please HELP!!!!!!!!!!!
> yala
> 
> _________________________________________________________________
> 
> ------------------------------
> 
> Message: 7
> Date: Thu, 17 Mar 2005 09:52:07 +0800
> From: Toh Da Jun <tohdj at bii.a-star.edu.sg>
> Subject: [vtkusers] VTKPoints and VTKLookupTable
> To: vtkusers at vtk.org
> Message-ID: <1111024327.7561.5.camel at ip4-215-v347.research-users.bii>
> Content-Type: text/plain
> 
> I'm trying to display points on screen in different colors.
> I've searched through the user forum and wrote the following codes.
> Yet the points are all in one color. any idea where i went wrong...when
> i've followed the advices given by fellow users?
> 
> BTW, the printout for the lookout table seems weird, because the first
> 10 table values are the same. And the lut.GetTableValue(x, rgba); uses a
> double vector for rgba instead of float (which is true for the C++
> version).
> 
> Language is Java. VTK is version 4.2.
> 
> tohdj
> 
> ========= source codes =============
> 
>        // Draw the points
>        polyVertexPoints = new vtkPoints();
>        polyVertexPoints.SetData(PointCoords);
>        vtkPolyVertex aPolyVertex = new vtkPolyVertex();
>        (aPolyVertex.GetPointIds()).SetNumberOfIds(NumPoints);
> 
>        for (int i=0; i<m_iDimension; i++)
>            for (int j=0; j<m_iDimension; j++)
>                (aPolyVertex.GetPointIds()).SetId((i*m_iDimension+j),
> (i*m_iDimension+j));
> 
>        vtkPolyData aPolyData = new vtkPolyData();
>        aPolyData.Allocate(1, 1);
>        aPolyData.InsertNextCell(aPolyVertex.GetCellType(),
> aPolyVertex.GetPointIds());
>        aPolyData.SetPoints(polyVertexPoints);
> 
>        vtkPolyDataMapper aPolyVertexMapper = new vtkPolyDataMapper();
>        aPolyVertexMapper.SetInput( aPolyData );
>        aPolyVertexMapper.SetScalarRange( 0, NumPoints * 4 );
>        aPolyVertexMapper.ScalarVisibilityOn();
> 
>        vtkLookupTable lut = new vtkLookupTable();
>        lut.SetRange( 0, 0.5 );
>        lut.SetNumberOfColors( 5 );
>        lut.SetHueRange( 0, 0 );
>        lut.SetSaturationRange( 0, 0 );
>        lut.SetAlphaRange( 1, 1 );
>        lut.SetValueRange( 0, 1 );
>        lut.Build();
>        aPolyVertexMapper.SetLookupTable( lut );
> 
>        System.out.println("GetNumberOfColors()="+lut.GetNumberOfColors());
>        double [] rgba = new double[4];
>        for (int x=0; x<lut.GetNumberOfColors(); x++) {
>            lut.GetTableValue(x, rgba);
>            System.out.println(x+".\t"+rgba[0]+", "+rgba[1]+",
> "+rgba[2]+", "+rgba[3]+".");
>        }
> 
>        vtkActor aPolyVertexActor = new vtkActor();
>        aPolyVertexActor.SetMapper(aPolyVertexMapper);
> 
>        ren.AddActor(aPolyVertexActor);
> 
> ------------------------------
> 
> Message: 8
> Date: Wed, 16 Mar 2005 23:06:56 -0500
> From: Dongbai Guo <guodongbai at gmail.com>
> Subject: [vtkusers] vtk 4.2 compilation error, linux, vtkBMPRead.cxx
> To: vtkusers at vtk.org
> Message-ID: <42390260.3040600 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Anybody knows a workaround?
> 
> thx
> Db.
> 
> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx: In function
> `void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT =
> double]':
> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:545:
> instantiated from here
> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:507: error: ISO
> C++ says that these are ambiguous, even though the worst conversion for
> the first is better than the worst conversion for the second:
> /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h:176:
> note: candidate 1: std::fpos<_StateT>
> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT =
> mbstate_t]
> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:507: note:
> candidate 2: operator+(std::streamoff, long int) <built-in>
> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:545:
> instantiated from here
> /data/dev/public/vtk/vtk-4.2_linux/IO/vtkBMPReader.cxx:511: error: ISO
> C++ says that these are ambiguous, even though the worst conversion for
> the first is better than the worst conversion for the second:
> 
> ------------------------------
> 
> _______________________________________________
> vtkusers mailing list
> vtkusers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> End of vtkusers Digest, Vol 11, Issue 27
> ****************************************
>



More information about the vtkusers mailing list