You probably want to change ClipBinsAtEnds from defaults, see itk::Histogram docs. Possibly like histogramFilter->GetOutput()-> SetClipBinsAtEnds(true); // or maybe false?
ClipBinsAtEnds
histogramFilter->GetOutput()-> SetClipBinsAtEnds(true); // or maybe false?