<br>Hi Dan,<br><br>Yes, that's it, thanks, Dan!<br><br>Can anyone explain the pros/cons of NumericTraits vs. <br><a href="http://www.cplusplus.com/reference/std/limits/numeric_limits/">http://www.cplusplus.com/reference/std/limits/numeric_limits/</a><br>
<br>Does NumericTraits provide additional functionality specific to image processing?<br><br>TIA,<br>Darren<br><br><br><br><div class="gmail_quote">On Mon, Nov 2, 2009 at 7:32 PM, Dan Mueller <span dir="ltr"><<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Darren,<br>
<br>
If I understand your question correctly, I believe you may be looking<br>
for itk::NumericTraits.<br>
<br>
You can use as follows:<br>
<br>
#include "itkNumericTraits.h"<br>
<br>
typedef unsigned char PixelType;<br>
<br>
std::cout << "max=" << itk::NumericTraits<PixelType>::max() << std::endl;<br>
std::cout << "min=" << itk::NumericTraits<PixelType>::min() << std::endl;<br>
std::cout << "zero=" << itk::NumericTraits<PixelType>::Zero << std::endl;<br>
std::cout << "one=" << itk::NumericTraits<PixelType>::One << std::endl;<br>
std::cout << "one=" << itk::NumericTraits<PixelType>::IsPositive( 42 )<br>
<< std::endl;<br>
etc...<br>
<br>
Hope this helps.<br>
<br>
Cheers, Dan<br>
<br>
2009/11/3 Darren Weber <<a href="mailto:darren.weber.lists@gmail.com">darren.weber.lists@gmail.com</a>>:<br>
<div><div></div><div class="h5">><br>
> Does ITK provide platform-independent constants for common data limits, to<br>
> supplement or replace limits.h?<br>
><br>
> TIA,<br>
> Darren<br>
</div></div></blockquote></div><br>