[vtkusers] (no subject) (vtkImageWeightedSum)

Peter F Bradshaw pfb at exadios.com
Thu Aug 23 19:51:10 EDT 2007


Hi Pierre;

On Wed, 22 Aug 2007, Pierre SCHMITT wrote:

>
> Hi,
>
> Since I could not find how to solve my problem, I've tried this :
> ITK image -> VTK Image -> vtkImageViewer -> wxVTKRenderWindowInteractor ->wxWindow
> So basicly, I skipped the part with the vtkImageWeightedSum. It is what I was doing for testing before I had the CVS version and wanted to use vtkImageWeightedSum.
>
> With CVS version, I still have the error I described below, but with the 5.0.1 vtk release everything goes well.
>
> Does anyone has and idea of how I could solve this problem with the CVS version, because I have to use this vtkImageWeightedSum class, which is not available on the 5.0.1 release.

There is no "promise" that any particular CVS snap shot will do
anything very useful.

It is not true that, in order to use vtkImageWeightedSum, you need to
use vtknightly. As suggested previously suggested it is usually possible
to back port from vtknightly to VTK 5.0.3. This is especially true for
vtkAlgorithyms since these are generally additions and the architectures
of vtknightly and VTK 5.0.3 are the same.

IMO you have three strategies available to address your problem (in order
of suitability):

(1). Back port;
(2). Update from vtknightly on a daily basis until you have something
     the works; and
(3). Fix the snap shot you have now.

>
> Thanks again.
>
> Pierre
>
>
>
>
> ----------------------------------------
> > From: ilovepierre at hotmail.com
> > To: vtkusers at vtk.org
> > Subject: RE: [vtkusers] (no subject)   (vtkImageWeightedSum)
> > Date: Tue, 21 Aug 2007 15:18:49 +0000
> >
> >
> >
> > Hi, thanks for your help again.
> >
> > I am now using the CVS version and I can use vtkImageWeightedSum.
> > I have now some problems using it, I wondered if you could help me.
> >
> > The software I'm coding is using ITK, VTK and wxWidget.
> > I'm trying to display, on a wxWidget Interface, an image which is a result
> > of a combination of 3 images (thanks to vtkImageWeightedSum).
> >
> > Here is a little schema :
> > 3 ITK images ---[connectorITKtoVTK]---> 3 VTK images ---[input]--->
> > vtkImageWeightedSum ---[input]--->vtkImageViewer2 ---[render]--->
> > wxVTKRenderWindowInteractor ---[add]--->wxWindow
> >
> > This hwas working when I was skipping the vtkImageWeightedSum part (that is
> > to say when I put the output of a connector into the input of an
> > ImageViewer.
> >
> > Here is likely what I do :
> >
> > vtkImageWeightedSum *imageWeightedSumSPGR = vtkImageWeightedSum::New();
> >
> > imageWeightedSumSPGR->SetInput(connector1_SPGR->GetOutput());
> > imageWeightedSumSPGR->AddInput(connector2_SPGR->GetOutput());
> > imageWeightedSumSPGR->AddInput(connectorM_SPGR->GetOutput());
> >
> > viewerSPGR->SetInput( imageWeightedSum->GetOutput() ); // An error occures
> > here.
> >
> > ------------
> >
> > Here is the error (sorry for the length of it) :
> >
> > *** glibc detected *** ./bin/Midway: free(): invalid pointer: 0x08de5548
> > ***
> > ======= Backtrace: =========
> > /lib/tls/i686/cmov/libc.so.6[0xb3af08bd]
> > /lib/tls/i686/cmov/libc.so.6(__libc_free+0x84)[0xb3af0a44]
> > /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb3c79fc1]
> > ./bin/Midway(_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIN3itk12SmartPointerINS2_11LightObjectEEEEE10deallocateEPS6_j+0x11)[0x80b9509]
> > ./bin/Midway(_ZNSt10_List_baseIN3itk12SmartPointerINS0_11LightObjectEEESaIS3_EE11_M_put_nodeEPSt10_List_nodeIS3_E+0x20)[0x80b94f6]
> > ./bin/Midway(_ZNSt10_List_baseIN3itk12SmartPointerINS0_11LightObjectEEESaIS3_EE8_M_clearEv+0x44)[0x80b94d2]
> > ./bin/Midway(_ZNSt10_List_baseIN3itk12SmartPointerINS0_11LightObjectEEESaIS3_EED2Ev+0x12)[0x80b942e]
> > ./bin/Midway(_ZNSt4listIN3itk12SmartPointerINS0_11LightObjectEEESaIS3_EED1Ev+0x11)[0x80b9419]
> > /home/karanga/Installation/kitware-shared-03-07/lib/InsightToolkit/libITKIO.so.3.2(_ZN3itk14ImageIOFactory13CreateImageIOEPKcNS0_12FileModeTypeE+0x27f)[0xb6ecf7d3]
> > ./bin/Midway(_ZN3itk15ImageFileReaderINS_5ImageIdLj3EEENS_25DefaultConvertPixelTraitsIdEEE25GenerateOutputInformationEv+0x334)[0x80c27da]
> > /home/karanga/Installation/kitware-shared-03-07/lib/InsightToolkit/libITKCommon.so.3.2(_ZN3itk13ProcessObject23UpdateOutputInformationEv+0x1b3)[0xb70a4697]
> > ./bin/Midway(_ZN3itk9ImageBaseILj3EE23UpdateOutputInformationEv+0x88)[0x80c4504]
> > /home/karanga/Installation/kitware-shared-03-07/lib/InsightToolkit/libITKCommon.so.3.2(_ZN3itk13ProcessObject23UpdateOutputInformationEv+0xd6)[0xb70a45ba]
> > /home/karanga/Installation/kitware-shared-03-07/lib/InsightToolkit/libITKBasicFilters.so.3.2(_ZN3itk18VTKImageExportBase25UpdateInformationCallbackEv+0x18)[0xb6f9b886]
> > /home/karanga/Installation/kitware-shared-03-07/lib/InsightToolkit/libITKBasicFilters.so.3.2(_ZN3itk18VTKImageExportBase33UpdateInformationCallbackFunctionEPv+0x1a)[0xb6f9ba90]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkImaging.so.5.1(_ZN14vtkImageImport32InvokeUpdateInformationCallbacksEv+0x3b)[0xb6211e53]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkImaging.so.5.1(_ZN23vtkImageImportExecutive14ProcessRequestEP14vtkInformationPP20vtkInformationVectorS3_+0x59)[0xb6219e1b]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN12vtkExecutive15ForwardUpstreamEP14vtkInformation+0x168)[0xb599b102]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN23vtkDemandDrivenPipeline14ProcessRequestEP14vtkInformationPP20vtkInformationVectorS3_+0x1ef)[0xb5994bb7]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN32vtkStreamingDemandDrivenPipeline14ProcessRequestEP14vtkInformationPP20vtkInformationVectorS3_+0x29e)[0xb5ad3b74]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN23vtkDemandDrivenPipeline17UpdateInformationEv+0x104)[0xb5995162]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN32vtkStreamingDemandDrivenPipeline6UpdateEi+0x27)[0xb5ad3bcf]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN12vtkExecutive6UpdateEv+0x3c)[0xb59996e2]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN23vtkDemandDrivenPipeline6UpdateEv+0x1e)[0xb5994e3c]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN32vtkStreamingDemandDrivenPipeline6UpdateEv+0x1e)[0xb5ad3ba0]
> > /home/karanga/Installation/kitware-shared-03-07/lib/libvtkFiltering.so.5.1(_ZN12vtkAlgorithm6UpdateEv+0x2b)[0xb5947a31]
> > ./bin/Midway(_ZN7MyFrame11PrintImagesEv+0xf8)[0x80e63e6]
> > ./bin/Midway(_ZN7MyFrame5OnNewER14wxCommandEvent+0x65)[0x80e7277]
> > /usr/local/lib/libwx_based-2.6.so.0(_ZNK12wxAppConsole11HandleEventEP12wxEvtHandlerMS0_FvR7wxEventES3_+0x43)[0xb7a2111f]
> > /usr/local/lib/libwx_based-2.6.so.0(_ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent+0xe2)[0xb7abd56c]
> > /usr/local/lib/libwx_based-2.6.so.0(_ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler+0xd8)[0xb7abf028]
> > /usr/local/lib/libwx_based-2.6.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x146)[0xb7abf198]
> > /usr/local/lib/libwx_gtk2d_core-2.6.so.0[Abandon (core dumped)
> >
> >
> > I don't know how to understand this "invalid pointer".
> > I verified that my pointers where all initialised and they are.
> > I tried with ddd to find out more, but the errors occures on a deep stack
> > in vtk sources and I'm not experienced enough to understand to problem.
> >
> > Do you have any idea, with what I said, of where I did wrong ?
> >
> > In advance, thanks again for your help.
> >
> > Bye
> >
> > Pierre
> >
> >
> > ----------------------------------------
> > > Date: Tue, 21 Aug 2007 09:08:59 +0800
> > > From: pfb at exadios.com
> > > To: vtkusers at vtk.org
> > > Subject: Re: [vtkusers] (no subject)
> > >
> > > Hi;
> > >
> > > On Mon, 20 Aug 2007, Cory Quammen wrote:
> > >
> > > > Hi Pierre,
> > > >
> > > > There is not currently an official 5.1.0 release; it is still under
> > > > development. You can grab the most recent code by accessing the CVS
> > > > repository.  Directions for doing so are here:
> > > > http://www.vtk.org/get-software.php#cvs. Be aware that if you do grab
> > > > the CVS source code, it may contain bleeding-edge features that
> > > > haven't been tested very well and may cause instability in your
> > > > application.
> > >
> > > As you point out the CVS release (a.k.a. vtk-nightly) is often unstable.
> > > However, it is often possible to back port a particular vtkAlgorithm
> > > from vtk-nightly to VTK 5.0.3. This may avoid the general instability
> > > of vtk-nightly.
> > >
> > > >
> > > > For documentation on vtk 5.0.3, see: http://www.vtk.org/doc/release/5.0/html/
> > > >
> > > > Cory
> > > >
> > > > On 8/20/07, Pierre SCHMITT  wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am doing an internship, and I've been told to use the vtkImageWeightedSum
> > > > > class for my work.
> > > > > It is described in the documentation of a 5.1.0 version of vtk, but mine is
> > > > > the 5.0.3, latest release on vtk.org.
> > > > > It seems there is no 5.1.0 downloadable yet. Or did I miss something ?
> > > > >
> > > > > Could someone help me please ?
> > > > > Thanks a lot.
> > > > >
> > > > > Bye
> > > > >
> > > > > Pierre
> > >
> > > Cheers
> > >
> > > --
> > > Peter F Bradshaw: http://www.exadios.com (public keys avaliable there).
> > > Personal site: http://personal.exadios.com
> > > "I love truth, and the way the government still uses it occasionally to
> > >  keep us guessing." - Sam Kekovich.
> > > _______________________________________________
> > > 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
> >
> > _________________________________________________________________
> > Besoin d'un e-mail ? Créez gratuitement un compte Windows Live Hotmail et gagnez du temps avec l'interface à la Outlook !
> > http://www.windowslive.fr/hotmail/default.asp_______________________________________________
> > 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
>
> _________________________________________________________________
> Besoin d'un e-mail ? Créez gratuitement un compte Windows Live Hotmail et gagnez du temps avec l'interface à la Outlook !
> http://www.windowslive.fr/hotmail/default.asp_______________________________________________
> 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
>

-- 
Peter F Bradshaw: http://www.exadios.com (public keys avaliable there).
Personal site: http://personal.exadios.com
"I love truth, and the way the government still uses it occasionally to
 keep us guessing." - Sam Kekovich.



More information about the vtkusers mailing list