Hi Jan,

Many Thanks!

Actually, with the number of dimensions specified it works ...

typedef itk::Image< itk::Vector< _type, _length>, *Dimension*>
ItkFixedVectorImageType;



Best Regards,

Hila


On Fri, May 11, 2012 at 11:05 AM, Hering, Jan
<[email protected]>wrote:

> Hi Hila,****
>
> ** **
>
> to answer your question from the first mail – the CastToItkImage methods
> support only image types with fixed size, so if you know the length of the
> vectors located at each pixel of your image by compile time use the
> following type:****
>
> ** **
>
> typedef itk::Image< itk::Vector< _type, _length>> ItkFixedVectorImageType;
> ****
>
> ** **
>
> instead of the itk::VectorImage.****
>
> ** **
>
> But you can also directly manipulate the itk::VectorImage given on the
> input by using image filters which derive from the itk::ImageToImageFilter
> as often done in the DiffusionImaging module.****
>
> ** **
>
> Examples : the itk::ResidualImageFilter
> http://docs.mitk.org/nightly-qt4//classitk_1_1ResidualImageFilter.html<http://docs.mitk.org/nightly-qt4/classitk_1_1ResidualImageFilter.html>
> ****
>
> which operates on the vector image encapsulated in the
> mitk::DiffusionImage (code snippet from the QmitkTensorReconstructionView)
> ****
>
> ** **
>
>   typedef itk::ResidualImageFilter<DiffusionPixelType, float>
> ResidualImageFilterType;****
>
> ** **
>
>   ResidualImageFilterType::Pointer residualFilter =
> ResidualImageFilterType::New();****
>
>   residualFilter->SetInput(diffImage->GetVectorImage());****
>
> ** **
>
> ** **
>
> Best,****
>
> ** **
>
> Jan****
>
> ** **
>
> *Von:* Hila Hiler [mailto:[email protected]]
> *Gesendet:* Freitag, 11. Mai 2012 08:55
> *An:* [email protected]
> *Betreff:* Re: [mitk-users] Cast a mitk::Image to an itk::vectorImage****
>
> ** **
>
> sorry about the previous unfinished email.
>
> Again:
>
> I created a plug-in which the user's input is an itk::VectorImage (I
> created that image and saved it by an itk writer in another plug in).
> and I'd like to manipulate some filters on that input image ...
> How am I doing this?
>
> Is there a way to access/manipulate this image as an itk image from the
> beginning and not as mitk::Image ? because if I have an itk::Image inserted
> to my plug in, why do I have to accept it as mitk and then convert to itk
> image and then filters manipulations etc...
>
> I guess that I'm out of knowledge in this field...
>
> any help ...
>
> Best,
>
> Hila
>
>
> ****
>
> On Fri, May 11, 2012 at 9:44 AM, Hila Hiler <[email protected]> wrote:**
> **
>
> Hi,
>
> I investigated again this problem adn would like to tell more about my
> story:
> I created a plug in that the user's input is an itk::Vector ****
>
> ** **
>
> On Thu, May 10, 2012 at 8:21 PM, Hila Hiler <[email protected]> wrote:**
> **
>
> Hi all,
>
> I know that mitk::CastToItkImage cast mitk::Image to itk::Image.
> Do you know how I can convert to itk::VectorImage?
>
> I need the functionality that this code does but with other type of image.
>
> ImageType::Pointer Itk_Image;
> mitk::CastToItkImage(mitk_image, Itk_Image);
> filter->SetInput(Itk_Image)
> ...
>
> I tryed to simply use CastToItkImage but the linker returns this error:
>
> Linking...
> 1>Filter.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) void __cdecl mitk::CastToItkImage<class
> itk::VectorImage<double,3> >(class mitk::Image const *,class
> itk::SmartPointer<class itk::VectorImage<double,3> > &)"
> ...
>
> Best Regards,
> Hila****
>
> ** **
>
> ** **
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to