Generate roi statistics 4 pr

Pull request for GenerateROIstatistics
Use IsNan from Core/Math/MiscMath.h.