File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Filtering/Thresholding/test
Numerics/Statistics/include Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ itk_add_test(NAME itkIsoDataThresholdImageFilterTestNoAutoMinMax
121
121
COMMAND ITKThresholdingTestDriver
122
122
--compare-MD5 DATA{Baseline/itkIsoDataThresholdImageFilterTestNoAutoMinMax.png}
123
123
9f844fd120ff49a7812e329a1b0216d8
124
- itkIsoDataThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR} /itkIsoDataThresholdImageFilterTestNoAutoMinMax.png 32 0 1 )
124
+ itkIsoDataThresholdImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR} /itkIsoDataThresholdImageFilterTestNoAutoMinMax.png 32 0 1023 )
125
125
126
126
itk_add_test (NAME itkIsoDataMaskedThresholdImageFilterTest
127
127
COMMAND ITKThresholdingTestDriver
Original file line number Diff line number Diff line change @@ -645,11 +645,12 @@ double
645
645
Histogram<TMeasurement, TFrequencyContainer>::Mean(unsigned int dimension) const
646
646
{
647
647
const unsigned int size = this ->GetSize (dimension);
648
- auto totalFrequency = double ( this ->GetTotalFrequency () );
648
+ double totalFrequency = this ->GetTotalFrequency ();
649
649
double sum = 0 ;
650
650
for (unsigned int i = 0 ; i < size; i++)
651
651
{
652
- sum += this ->GetFrequency (i, dimension);
652
+ double frequency = this ->GetFrequency (i, dimension);
653
+ sum += frequency * this ->GetMeasurement (i, dimension);
653
654
}
654
655
return sum / totalFrequency;
655
656
}
You can’t perform that action at this time.
0 commit comments