[Insight-users] itkMinimumMaximumImageCalculator

Chad Washington chad . w . washington at vanderbilt . edu
Thu, 15 May 2003 18:02:19 -0500


I am trying to use the Min/Max calculator and keep getting errors when I 
compile the code.  I am using gcc 3.2.3 and have the following definitions:

typedef int     PixelType;
typedef itk::Image< PixelType, 2 >     ImageType;
typedef itk::MinimumMaximumCalculator< ImageType >     CalculatorType;

and the code:
ImageType::PixelType min;
ImageType::PixelType max;
myCalculator->SetImage( myImage );
myCalculator->ComputeMinimum();
min = myCalculator->GetMinium();
myCalculator->ComputMaximum();
max = myCalculator->GetMaximum();

The resulting errors:
In file included from 
                 from itkMinimumMaximumImageCalculator.h:110,
                 from mie.h:28,
                 from mie.cxx:57:
Insight/Code/BasicFilters/itkMinimumMaximumImageCalculator.txx:47:45: macro 
"min" requires 2 arguments, but only 1 given
Insight/Code/BasicFilters/itkMinimumMaximumImageCalculator.txx:48:45: macro 
"max" requires 2 arguments, but only 1 given
Insight/Code/BasicFilters/itkMinimumMaximumImageCalculator.txx:78:45: macro 
"max" requires 2 arguments, but only 1 given
Insight/Code/BasicFilters/itkMinimumMaximumImageCalculator.txx:102:45: macro 
"min" requires 2 arguments, but only 1 given
Insight/Code/BasicFilters/itkMinimumMaximumImageCalculator.txx: In
   member function `void
   itk::MinimumMaximumImageCalculator<TInputImage>::ComputeMaximum() [with
   TInputImage = ImageType]':
mie.cxx:1653:   instantiated from here
Insight/Code/BasicFilters/itkMinimumMaximumImageCalculator.txx:102: invalid
   conversion from `int (*)()' to `int'
Insight/Code/BasicFilters/itkMinimumMaximumImageCalculator.txx: In
   member function `void
   itk::MinimumMaximumImageCalculator<TInputImage>::ComputeMinimum() [with
   TInputImage = ImageType]':
mie.cxx:1674:   instantiated from here
Insight/Code/BasicFilters/itkMinimumMaximumImageCalculator.txx:78: invalid
   conversion from `int (*)()' to `int'

Thanks,
Chad Washington
Biomedical Modeling Laboratory
Department of Biomedical Engineering
Vanderbilt University