[Insight-developers] Problem with BinaryMask3DMeshSource

Luis Ibanez luis.ibanez at kitware.com
Tue Mar 8 09:46:22 EST 2005


Hi Gunn Marie,

Please post the exact typedef that you used for declaring

                 floatPicture


Thanks


    Luis


--------------------------------
Gunn Marie Navestad wrote:

> 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
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 
> 





More information about the Insight-developers mailing list