소스 검색

Merge pull request #721 from lassoan/inf-image-histogram

BUG: Fixed crash in histogram computation for inf image
Julien Finet 8 년 전
부모
커밋
bb98fa2aab
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Libs/Visualization/VTK/Widgets/ctkVTKHistogram.cpp

+ 2 - 2
Libs/Visualization/VTK/Widgets/ctkVTKHistogram.cpp

@@ -348,8 +348,8 @@ void populateIrregularBins(vtkIntArray* bins, const ctkVTKHistogram* histogram)
   ptr += component;
   for (; ptr < endPtr; ptr += componentNumber)
     {
-    if (std::numeric_limits<T>::has_quiet_NaN &&
-        vtkMath::IsNan(*ptr))
+    if ((std::numeric_limits<T>::has_quiet_NaN &&
+      vtkMath::IsNan(*ptr)) || vtkMath::IsInf(*ptr))
       {
       continue;
       }