[Insight-users] One error and one issue with itkImagePCAShapeModelEstimator

Luis Ibanez luis.ibanez@kitware.com
Thu May 13 20:59:29 EDT 2004


Hi Zach,



1) It seems reasonable to allow the ImagePCAShapeModelEstimator
    to accept images of different origin, different StartIndex
    and only enforce the pixel spacing and the image size (in
    pixel along every dimension) to be the same among all the
    input images.

    Please send us a patch...



2) It is strange what you report regarding the exception...

    It may look like a missmatch between the version of your
    compiler and the version of the debugger...

    No offense, ... but the Mac have proven to have many
    compiler bugs in the past...


    Just out of curiosity: Have you tried this same test
    by builng ITK in static libraries ?



Regards,



     Luis


---------------------
Zachary Pincus wrote:

> Hello,
> 
> I've run into a problematic situation: I want to estimate a PCA model  
> of several regions (same size) from the same image. I just run an  
> ExtractImageFilter a few times to get a bunch of sub-images, and feed  
> them to the model estimator. This should be no problem, but:
> 
> (1) itk::ImagePCAShapeModelEstimator will not accept images with  
> different LargestPossibleRegions, regardless of whether they are the  
> same size. This seems unnecessarily restrictive to me. If others agree,  
> I'll happily submit a patch to remedy this behavior.
> 
> The more problematic thing is that I had a really hard time tracking  
> down this bug because:
> (2) Somehow the exception reporting from this class seems to be broken.  
> I'm not sure if it's just me, but even though I've got a try/catch  
> block, I can't catch the exception raised by an  
> ImagePCAShapeModelEstimator object when you try to feed it wrong-sized  
> images. This exception is raised on line 146 of  
> itkImagePCAShapeModelEstimator.txx -- I know this because when I put a  
> bunch of printfs (well, std::cout <<, but you get my drift) in the  
> template code, I get output right up until where the exception is to be  
> called. Somehow, the exception doesn't get propagated back properly.
> 
> I've included some stripped-down test code (derived from the test code  
> in the ITK tree) that on my machine reproduces this problem. The code  
> tries to feed an ImagePCAShapeModelEstimator images with different  
> regions (though the sizes are the same). All of this is done within a  
> try/catch block; however the exception raised on line 146 of  
> itkImagePCAShapeModelEstimator.txx never gets caught. (My setup: OS X  
> 10.3.3, GCC 3.3 using c++ (not g++) compiler, with a CVS version of ITK  
> updated last night, built with shared libraries.)
> 
> Strange,
> 
> Zach Pincus
> 
> 
> Attached is the test code. Here follows a backtrace of what I get when  
> I run it in GDB. There is some strangeness afoot even in the backtrace  
> -- note the "itkOctreeNode" source files erroneously assigned to  
> symbols from the standard c++ library.
> 
> #0  0x90042aac in kill ()
> #1  0x9009ec5c in abort ()
> #2  0x00018034 in __cxxabiv1::__terminate(void (*)()) () at  
> /Volumes/Atlotl/Developer/ITK/ITK-CVS-src/Insight/Code/Common/ 
> itkSmartPointer.h:66
> #3  0x00018078 in std::terminate() () at  
> /Volumes/Atlotl/Developer/ITK/ITK-CVS-src/Insight/Code/Common/ 
> itkSmartPointer.h:66
> #4  0x028079fc in __cxxabiv1::__unexpected(void (*)()) () at  
> /Volumes/Atlotl/Developer/ITK/ITK-CVS-src/Insight/Code/Common/ 
> itkOctreeNode.h:117
> #5  0x027f607c in __cxa_call_unexpected () at  
> /Volumes/Atlotl/Developer/ITK/ITK-CVS-src/Insight/Code/Common/ 
> itkOctreeNode.h:117
> #6  0x027d3e94 in itk::DataObject::PropagateRequestedRegion()  
> (this=0x2501110) at  
> /Volumes/Atlotl/Developer/ITK/ITK-CVS-src/Insight/Code/Common/ 
> itkDataObject.h:90
> #7  0x027d3388 in itk::DataObject::Update() (this=0x25009e0) at  
> /Volumes/Atlotl/Developer/ITK/ITK-CVS-src/Insight/Code/Common/ 
> itkDataObject.cxx:343
> #8  0x0000343c in main () at  
> /Volumes/Atlotl/Developer/ITK/ITK-CVS-src/Insight/Code/Common/ 
> itkSmartPointer.h:71
> 






More information about the Insight-users mailing list