[Insight-users] crash with labelmapmaskimagefilter

Kiên Kiêu kien.kieu at jouy.inra.fr
Fri Oct 26 06:32:12 EDT 2012


Hi,

I am using ITK v4.2rc04 on Linux. I have a crash when updating a 
LabelMapMaskImageFilter with progress reporting. No crash if no 
reporting. Here is a piece of python code. I do not know whether the 
problem shows up using only C++.

Python 2.6.6 (r266:84292, Sep 11 2012, 08:34:23)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import itk
 >>> itk.auto_progress(2)
 >>> maskCenters = itk.Image.UC2.New(Regions=[256,256])
Loading ITKPyBase... done
Loading ITKCommon... done
Loading ITKFiniteDifference... done
Loading ITKImageFilterBase... done
Loading ITKCurvatureFlow... done
Loading ITKStatistics... done
Loading ITKTransform... done
Loading ITKImageFunction... done
Loading ITKImageGrid... done
Loading ITKAnisotropicSmoothing... done
Loading ITKImageCompose... done
Loading ITKIOImageBase... done
Loading ITKMesh... done
Loading ITKSpatialObjects... done
Loading ITKImageStatistics... done
Loading ITKPath... done
Loading ITKImageIntensity... done
Loading ITKImageLabel... done
Loading ITKThresholding... done
Loading ITKConnectedComponents... done
Loading ITKMathematicalMorphology... done
Loading ITKLabelMap... done
Loading ITKBinaryMathematicalMorphology... done
Loading ITKNarrowBand... done
Loading ITKDistanceMap... done
Loading ITKQuadEdgeMesh... done
Loading ITKFastMarching... done
Loading ITKImageCompare... done
Loading ITKSmoothing... done
Loading ITKImageGradient... done
Loading ITKImageSources... done
Loading ITKImageFeature... done
Loading ITKOptimizers... done
Loading ITKLevelSets... done
Loading ITKPyUtils... done
 >>> maskCenters.Allocate()
 >>> maskCenters.FillBuffer(0)
 >>> maskCenters.SetPixel([50,50],255)
 >>> maskCenters.SetPixel([100,100],255)
 >>> binMask = itk.BinaryDilateImageFilter.IUC2IUC2SE2.New(maskCenters, 
Kernel=itk.strel(2, [20,20]))
 >>> masks = itk.BinaryImageToShapeLabelMapFilter.IUC2LM2.New(binMask)
 >>> signal = itk.Image.UC2.New(Regions=[256,256])
 >>> signal.Allocate()
 >>> signal.FillBuffer(200)
 >>> test = itk.LabelMapMaskImageFilter.LM2IUC2.New(masks, signal, Label=1)
 >>> test() # crash
Running itkBinaryDilateImageFilterIUC2IUC2SE2... done
Running itkBinaryImageToShapeLabelMapFilterIUC2LM2... done
done
Running itkLabelMapMaskImageFilterLM2IUC2... Running 
itkLabelMapMaskImageFilterLM2IUC2...Erreur de segmentation (core dumped)

-- 
Kiên Kiêu                    tel  : + 33 (0)1 34 65 28 16
Unité MIA, INRA              fax  : + 33 (0)1 34 65 22 17
Domaine de Vilvert           email: Kien.Kieu at jouy.inra.fr
F-78350 Jouy-en-Josas        url  : http://www.inra.fr/miaj/



More information about the Insight-users mailing list