[Insight-developers] Problem with BinaryMask3DMeshSource

Gunn Marie Navestad gunnmari at stud.ntnu.no
Tue Mar 8 05:45:45 EST 2005


I have a problem when I'm trying to use the BinaryMask3DMeshSource-class
in itk 2.0. I have defined a BinaryMask3DMeshSource-filter and I would
like to put a float-image as input to this filter. The problem is that the
"SetInput"-method seems to demand an input parameter of type itk:Mesh. The
following error message appears when I try to compile my code:

"error C2664: 'itk::BinaryMask3DMeshSource<TOutputMesh>::SetInput' :
cannot convert parameter 1 from
'itk::Image<TPixel,VImageDimension>::Pointer' to 'const
itk::BinaryMask3DMeshSource<TOutputMesh>::InputImageType *'
        with
        [
            TOutputMesh=MeshType
        ]
        and
        [
            TPixel=float,
            VImageDimension=3
        ]
        and
        [
            TOutputMesh=MeshType
        ]
"

Here is my code:

	typedef itk::Mesh<float> MeshType;
	itk::BinaryMask3DMeshSource<MeshType>::Pointer meshSource;
	meshSource = itk::BinaryMask3DMeshSource<MeshType>::New();
	meshSource->SetInput(floatPicture);
	meshSource->SetObjectValue(1.0);


floatPicture is of type Image<float, 3> and is containing a binary image
of an object.

Kind regards,
Gunn Marie


More information about the Insight-developers mailing list