[Insight-users] itk::VariableSizeMatrix
Luis Ibanez
luis.ibanez at kitware.com
Thu Sep 20 21:07:46 EDT 2007
Hi Julien,
Thanks for pointing this out.
Notice that, since this class doesn't derives from any other class,
we could simply add the method:
virtual const char *GetNameOfClass() const
{return "VariableSizeMatrix"; }
to the header.
This may be less confusing than adding a TypeMacro in a class that
doesn't have a superclass.
Could you please log this issue as a bug report in
the Mantis bug tracker ?
http://public.kitware.com/Bug/my_view_page.php
Thanks
Luis
-------------------
Julien Michel wrote:
> Dear ITK users,
>
> We are using the itk::VariableSizeMatrix class when our matrix size can
> not be decided at compilation time.
>
> In this class encapsulating the vnl/vnl_matrix class redefines all the
> operators, such as += or -= for instance.
>
> In these operators, a size check is performed in order to check the
> matrices compatibility. Eventually, an exception is raised using the
> itkExpectionMacro. This macro needs the GetNameOfClass method to be
> defined.
>
> However, the VariableSizeMatrix derives from nothing, and no
> itkTypeMacro is used in its header, so there is no GetNameOfClass method.
>
> This lead us to compiling errors whenever we are trying to use these
> operators.
>
> To fix this, I think either an itkTypeMacro should be used in the class
> declaration or an itkGenericExceptionMacro should be used in the
> operators checking.
>
> Best regards,
>
> Julien Michel
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list