[Insight-users] Possible error in itkAdpativeHistogramEqualizationImageFilter.txx
   
    Yan Shang
     
    yan.shang at ibt.uni-karlsruhe.de
       
    Wed, 14 Apr 2004 11:00:10 +0200
    
    
  
--Apple-Mail-3-546795599
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed
Hello,
I suspect this is probably an error.
The following code in itkAdpativeHistogramEqualizationImageFilter.txx 
causes trouble by compiling:
   // Allocate a float type image which has the same size with an input 
image.
   // This image store normalized pixel values [-0.5 0.5] of the input 
image.
   typedef Image<float, ImageDimension> ImageFloatType;        
<--------------------------------
   typename ImageFloatType::Pointer inputFloat = ImageFloatType::New();
   inputFloat->SetRegions(input->GetRequestedRegion());
   inputFloat->Allocate();
   // Scale factors to convert back and forth to the [-0.5, 0.5] and
   // original gray level range
   float iscale = max - min;
   float scale = (float)1/iscale;
   // Normalize input image to [-0.5 0.5] gray level and store in
   // inputFloat. AdaptiveHistogramEqualization only use float type
   // image which has gray range [-0.5 0.5]
   ImageRegionIterator< ImageType > itFloat(inputFloat,
                                          input->GetRequestedRegion()); 
<------ Here the ImageType should be ImageFloatType, or it will cause 
trouble when ImageType is int, char, etc.
Yan
--Apple-Mail-3-546795599
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
	charset=US-ASCII
Hello,
I suspect this is probably an error.
The following code in itkAdpativeHistogramEqualizationImageFilter.txx
causes trouble by compiling:
<fixed>  <color><param>2323,6E6E,2525</param>// Allocate a float type
image which has the same size with an input image.</color>
  <color><param>2323,6E6E,2525</param>// This image store normalized
pixel values [-0.5 0.5] of the input image.</color>
  typedef Image<<float, ImageDimension> ImageFloatType;       
<<--------------------------------
  typename ImageFloatType::Pointer inputFloat = ImageFloatType::New();
  inputFloat->SetRegions(input->GetRequestedRegion());
  inputFloat->Allocate();
  <color><param>2323,6E6E,2525</param>// Scale factors to convert back
and forth to the [-0.5, 0.5] and</color>
  <color><param>2323,6E6E,2525</param>// original gray level range</color>
  float iscale = max - min;
  float scale =
(float)<color><param>0000,0000,FFFF</param>1</color>/iscale;
  
  <color><param>2323,6E6E,2525</param>// Normalize input image to
[-0.5 0.5] gray level and store in</color>
  <color><param>2323,6E6E,2525</param>// inputFloat.
AdaptiveHistogramEqualization only use float type</color>
  <color><param>2323,6E6E,2525</param>// image which has gray range
[-0.5 0.5]</color>
  ImageRegionIterator<< ImageType > itFloat(inputFloat,
                                         input->GetRequestedRegion());
<<------ Here the ImageType should be ImageFloatType, or it will cause
trouble when ImageType is int, char, etc.
Yan
</fixed>                                           
--Apple-Mail-3-546795599--