On Tue, 2008-08-26 at 09:23 +0200, Kelm, Michael wrote: > Dear mitk users, > > using the mitk::PadImageFilter I run into problems when using a 3D > reference image and a 2D input image. > > The problematic code in PadImageFilter::GenerateData is > > mitk::Image::ConstPointer image = this->GetInput( 0 ); > mitk::Image::ConstPointer referenceImage = this->GetInput( 1 ); > > typedef itk::Image< short, 3 > ImageType; > ImageType::Pointer itkImage = ImageType::New(); > mitk::CastToItkImage( image, itkImage ); > > where CastToItkImage fails due to a violated assertion (CastToItkImage > calls AccessFixedDimensionByItk_1 which contains the assertion).
Hi, this filter expects a 3D input image. CastToItkImage will try to create a 3D image of shorts from "image" (which is 2D), which will just not work. I guess the original author of PadImageFilter never thought of using this filter with your kind of inputs. If you want to extend the filter in a way that it just uses the first two dimensions of a 3D image in cases like yours, we would gladly add your patch. Kind regards Daniel > > How can this problem be fixed? > > Thank you, > Michael. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users -- Dipl.-Inform. Med. Daniel Maleike Phone: +49 6221 42 2326 Deutsches Krebsforschungszentrum Im Neuenheimer Feld 280 Medical and Biological Informatics (E130) 69120 Heidelberg ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
