[Insight-users] Re: ITK/VTK Pipeline

Luis Ibanez luis.ibanez at kitware.com
Wed Jul 21 10:48:54 EDT 2004


Hi Anonymous User,

When you see the error message

   "Program received signal SIGABRT, Aborted."

You can suspect of an exception being thrown
and not being catched.

Please add a try/catch block around the line

     itkImporterFixed->Update();

and print out the description returned by
the eventual exception.

You will find multiple examples on how to write
this try/catch block on the ITK Software Guide

    http://www.itk.org/ItkSoftwareGuide.pdf

The description returned by the exception
will help to find the source of the problem.


Please let us know what you find.


     Thanks



       Luis


---------------------------------------------
Anonymous User wrote:
> Hello,
> 
> I am currently using ITK to develop a registration tool... I have used the
> ITK/VTK pipeline before and it has worked, and I did not touch it for a
> while... but now it does not seem to work anymore and I have not found why.
> 
> Here is my sample code, and the stack until the crash... Could you help me
> please! Any ideas?
> Anonymous User
> 
> --------------------------
> 
> #include "itkImage.h"
> #include "itkVTKImageImport.h"
> #include "vtkImageExport.h"
> #include "vtkImageShiftScale.h"
> 
> const    unsigned int    Dimension = 3;
> typedef   signed short  ExternalPixelType;
> typedef itk::Image< ExternalPixelType, Dimension >  ExternalImageType;
> 
> vtkImageShiftScale::Pointer rescaleTarget = vtkImageShiftScale::New();
> rescaleTarget->ClampOverflowOn();
> rescaleTarget->ReleaseDataFlagOn();
> rescaleTarget->SetOutputScalarTypeToUnsignedChar();
> rescaleTarget->SetInput(dTargetImage->getVolume()/*returns a valid
> vtkImageData*/);
> rescaleTarget->SetShift(shift);
> rescaleTarget->SetScale(scale);
> rescaleTarget->ClampOverflowOn();
> rescaleTarget->Update();
> 
> vtkImageExport* vtkExporterFixed = vtkImageExport::New();
> VTKImageImport<ExternalImageType>::Pointer itkImporterFixed =
> VTKImageImport<ExternalImageType>::New();
> 
> vtkExporterFixed->SetInput(rescaleTarget->GetOutput());
> ConnectPipelines(vtkExporterFixed,itkImporterFixed);
> itkImporterFixed->Update(); <- crashes here!
> 
> -----------------------STACK (before crash)--------------------------------
> Breakpoint 3, QtRegMiImage2ImageLoader::OnStartRegistration(double*, double*,
> int, unsigned long, double, double, unsigned long, unsigned long, bool)
> (this=0x850fa50, dTranslation=0x9109260, dRotation=0x90d40d8, iResLevel=1,
> lNbBins=65, dStpNb=10, dStpLgth=5, lNbIt=500, lNbSs=100000, bObserversOn=false)
> at
> /development/CAS/Private/manon/Libraries/QtRegMIImage2Image/QtRegMIImage2ImageLoader.C:524
>  
> /development/CAS/Private/manon/Libraries/QtRegMIImage2Image/QtRegMIImage2ImageLoader.C:524:18205:beg:0x8098adc
> (gdb) itk::SmartPointer<itk::VTKImageImport<itk::Image<short, 3> >
> 
>>::operator->() const (this=0x850fb2c) at
> 
> /usr/lib/itk/Insight/Code/Common/itkSmartPointer.h:79
>   /usr/lib/itk/Insight/Code/Common/itkSmartPointer.h:79:2203:beg:0x809b8a1
> (gdb) itk::ProcessObject::Update() (this=0x909e660) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkProcessObject.cxx:488
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkProcessObject.cxx:488:10390:beg:0x82277f6
> (gdb) itk::ProcessObject::GetOutput(unsigned) (this=0x909e660, i=136707124) at
> /usr/include/g++/bits/stl_iterator.h:590
>   /usr/include/g++/bits/stl_iterator.h:590:19192:beg:0x8226f78
> (gdb)   /usr/include/g++/bits/stl_iterator.h:639:20721:beg:0x8226f7e
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkProcessObject.cxx:346:7917:beg:0x8226f80
> (gdb)   /usr/include/g++/bits/stl_iterator.h:639:20721:beg:0x8226f83
> (gdb)   /usr/include/g++/bits/stl_vector.h:415:15158:beg:0x8226f86
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSmartPointer.h:102:2815:beg:0x8226f8f
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkProcessObject.cxx:353:8017:beg:0x8226f92
> (gdb) itk::ProcessObject::Update() (this=0x909e660) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkProcessObject.cxx:490
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkProcessObject.cxx:490:10422:beg:0x822780a
> (gdb) itk::DataObject::Update() (this=0x90a4330) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkDataObject.cxx:325
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkDataObject.cxx:325:7395:beg:0x821796a
> (gdb) itk::ImageBase<3>::UpdateOutputInformation() (this=0x90a4330) at
> /usr/lib/itk/Insight/Code/Common/itkImageBase.txx:126
>   /usr/lib/itk/Insight/Code/Common/itkImageBase.txx:126:2727:beg:0x80a4113
> (gdb) itk::DataObject::GetSource() const (this=0x90a4330) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkDataObject.cxx:270
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkDataObject.cxx:270:5933:beg:0x8216f1f
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkDataObject.cxx:269:5931:beg:0x8216f20
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkDataObject.cxx:270:5933:beg:0x8216f23
> (gdb) itk::Object::GetDebug() const (this=0xbfffdcd0) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkObject.cxx:231
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkObject.cxx:231:4932:beg:0x821e0e3
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkObject.cxx:232:4950:beg:0x821e0ee
> (gdb) itk::DataObject::GetSource() const (this=0x90a4330) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkWeakPointer.h:87
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkWeakPointer.h:87:2622:beg:0x8216f38
> (gdb) SmartPointerForwardReference (this=0x90a4330, p=0x909e660) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSmartPointerForwardReference.txx:47
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSmartPointerForwardReference.txx:47:1553:beg:0x8217f36
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSmartPointerForwardReference.txx:48:1571:beg:0x8217f3b
> (gdb) itk::SmartPointerForwardReference<itk::ProcessObject>::Register()
> (this=0x909e660) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSmartPointerForwardReference.txx:175
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSmartPointerForwardReference.txx:175:4794:beg:0x8217e66
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSmartPointerForwardReference.txx:177:4817:beg:0x8217e80
> (gdb) itk::Object::Register() const (this=0x909e660) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkObject.cxx:230
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkObject.cxx:230:4930:beg:0x821e15f
> (gdb)  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkObject.cxx:280:5638:beg:0x821e16e
> (gdb) itk::LightObject::Register() const (this=0x909e660) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkLightObject.cxx:124
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkLightObject.cxx:124:2382:beg:0x8218c78
> (gdb) itk::SimpleFastMutexLock::Lock() const (this=0x909e668) at
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSimpleFastMutexLock.cxx:73
>  
> /export/spare/mounts/tools/itk/Insight_Nightly/Insight_1_2_N/Insight/Code/Common/itkSimpleFastMutexLock.cxx:73:2002:beg:0x822c2b3
> (gdb)
> Program received signal SIGABRT, Aborted.
> 0x42860691 in kill () from /lib/libc.so.6
> 
> 





More information about the Insight-users mailing list