[Insight-users] itkGaussianOperator and a warning message
Luis Ibanez
luis.ibanez at kitware.com
Fri May 16 17:11:31 EDT 2008
Hi Mauro
Two options:
A) The right thing to do:
a) Increase your MaximumKernelWidth or
b) Increase your Error tolernace or
c) Reduce your variance
Until the combination matches the class
criteria.
B) The wrong thing to do:
"Kill the Messenger"
That is, turn off the error message, hope that
everything will go well, and that nobody will
die as a consequence.
You can turn off the message by any of the
following two methods:
a) in the itkGaussianOperator call the
method:
->SetGlobalWarningDisplay(false);
or
b) Connect a FileOutputWindow and send the
messages to "/dev/null"
you can do this with the following code
#include "itkFileOutputWindow.h"
itk::FileOutputWindow::Point window =
itk::FileOutputWindow::New()
itk::OutputWindow::SetInstance( window );
window->SetFileName("/dev/null");
Of course,
We strongly encourage you to do the right thing: (A) :-)
That warning that you are getting is not just an annoyance...
It is telling you that you are doing something wrong,
because the kernel that you compute is not a proper
approximation of a Gaussian.
Regards,
Luis
---------------------
mauro maiorca wrote:
> Hi all,
>
> do you know how to get rid of the warning:
> "itkGaussianOperator (0x85ace78): Kernel size has exceeded the
> specified maximum width of 15 and has been truncated to 16 elements.
> You can raise the maximum width using the SetMaximumKernelWidth
> method."?
>
> I don't want to change the SetMaximumKernelWidth and the warning
> message all the time and it is quite annoying!
> Do you know any elegant solution for this?
>
> cheers,
> Mauro
> _______________________________________________
> 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