Skip to content
Snippets Groups Projects
Commit 7dd4acd9 authored by Julien Malik's avatar Julien Malik
Browse files

BUG: surely don't want to customize the histogram number of dimensions

parent c4bd28bd
No related branches found
No related tags found
No related merge requests found
...@@ -121,15 +121,9 @@ public: ...@@ -121,15 +121,9 @@ public:
this->Modified(); this->Modified();
} }
/** Neighborhood radius */
itkSetMacro(Radius, RadiusSizeType); itkSetMacro(Radius, RadiusSizeType);
/** Sets the histogram size. Note this function must be called before
\c Initialize(). */
itkSetMacro(HistogramSize, HistogramSizeType);
/** Gets the histogram size. */
itkGetConstReferenceMacro(HistogramSize, HistogramSizeType);
/** Factor to increase the upper bound for the samples in the histogram. /** Factor to increase the upper bound for the samples in the histogram.
Default value is 0.001 */ Default value is 0.001 */
itkSetMacro(UpperBoundIncreaseFactor, double); itkSetMacro(UpperBoundIncreaseFactor, double);
...@@ -190,9 +184,6 @@ private: ...@@ -190,9 +184,6 @@ private:
padding value should be ignored when calculating the similarity padding value should be ignored when calculating the similarity
measure. */ measure. */
bool m_UsePaddingValue; bool m_UsePaddingValue;
/** The histogram size. */
HistogramSizeType m_HistogramSize;
/** The increase in the upper bound. */ /** The increase in the upper bound. */
double m_UpperBoundIncreaseFactor; double m_UpperBoundIncreaseFactor;
......
...@@ -33,11 +33,10 @@ namespace otb ...@@ -33,11 +33,10 @@ namespace otb
template <class TInputImage1, class TInputImage2, template <class TInputImage1, class TInputImage2,
class TOutputImage, class TFunction> class TOutputImage, class TFunction>
BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TOutputImage, TFunction> BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TOutputImage, TFunction>
::BinaryFunctorNeighborhoodJoinHistogramImageFilter(): m_HistogramSize(2) ::BinaryFunctorNeighborhoodJoinHistogramImageFilter()
{ {
this->SetNumberOfRequiredInputs(2); this->SetNumberOfRequiredInputs(2);
m_Radius = 3; m_Radius = 3;
m_HistogramSize.Fill(256);
m_UsePaddingValue = false; m_UsePaddingValue = false;
m_UpperBoundIncreaseFactor = 0.001; m_UpperBoundIncreaseFactor = 0.001;
} }
...@@ -268,8 +267,10 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO ...@@ -268,8 +267,10 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
Input2IteratorType ti2(pInput2Image, input2Region); Input2IteratorType ti2(pInput2Image, input2Region);
typename HistogramType::Pointer histogram = HistogramType::New(); typename HistogramType::Pointer histogram = HistogramType::New();
HistogramSizeType histogramSize(2);
histogramSize.Fill(256);
histogram->SetMeasurementVectorSize(2); histogram->SetMeasurementVectorSize(2);
histogram->Initialize(m_HistogramSize, lowerBound, upperBound); histogram->Initialize(histogramSize, lowerBound, upperBound);
ti1.GoToBegin(); ti1.GoToBegin();
ti2.GoToBegin(); ti2.GoToBegin();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment