According to the nightly built API docs, the mitk::CastToItkImage
function is void, so you cannot use it in an expression.

Something like this can work (I have not tried it):

VolumeType::Pointer firstImageItk;
mitk::CastToItkImage(firstImage, firstImageItk);
m_Hausdorff->SetInput1(firstImageItk);

Regards,
Miklos

On Thu, May 26, 2011 at 8:07 PM, Ghazall Aghaei
<[email protected]> wrote:
> Hello fellow MITK users,
> I am currently working on implementing a HausdorffDistance calculation
> within an MITK plugin but ran into problems with converting images back and
> forth as needed:
> - I have both images already available as mitk::image
> - I have defined my types as followed:
>         typedef unsigned char VoxelType;
> typedef itk::Image <VoxelType, 3> VolumeType;
> typedef itk::HausdorffDistanceImageFilter <VolumeType, VolumeType>
> HausdorffDistanceFilterType;
> - Now I'd simply like to do
>                   this->m_Hausdorff = HausdorffDistanceFilterType::New ();
>
>             this->m_Hausdorff->SetInput1 ( mitk::CastToItkImage (
> firstImage, VolumeType ) );
>
>             this->m_Hausdorff->SetInput2 ( mitk::CastToItkImage (
> secondImage, VolumeType ) );
>
> => But all I get is the compiler error 'CastToItkImage': Is not an element
> of 'mitk'
>
> - I've already tried adding the MITK_CORE_EXPORT as it seems CastToItkImage
> is not part of MITK's Qt core function set any more
>
> Any ideas?
>
> Regards,
>
> Ghazall
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
>

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to