Suresh G N | 1 Aug 11:06 2005
Picon

Export data

I have two silly questions please:

1) I am trying to get data from a itk::Image. I found  the below one, but not my requirement. Can any one tell me is there a facility to import data from an itk::Image type to C array?

ImportImageFilter provides a mechanism for importing data into an itk::Image. ImportImageFilter is an image source, so it behaves like any other pipeline object. what abt other way?

2) Is it possible to find the Mean, variance and other statistical values of a given volume using itk

Thanx in advance

Suresh

_______________________________________________
Insight-users mailing list
Insight-users@...
http://www.itk.org/mailman/listinfo/insight-users
Karthik Krishnan | 1 Aug 12:40 2005

Re: Export data


On Mon, 2005-08-01 at 14:36 +0530, Suresh G N wrote:
> I have two silly questions please:
> 
> 1) I am trying to get data from a itk::Image. I found  the below one,
> but not my requirement. Can any one tell me is there a facility to
> import data from an itk::Image type to C array?
> 
> 
> ImportImageFilter provides a mechanism for importing data into an
> itk::Image. ImportImageFilter is an image source, so it behaves like
> any other pipeline object. what abt other way?

You could write a simple iterator that does the job for you.

  IteratorType it( image, image->GetBufferedRegion() );
  it.GoToBegin();
  while( !it.IsAtEnd() )
      {
      *cdata = it.Get();
      ++it;
      ++cdata;
      }

> 
> 2) Is it possible to find the Mean, variance and other statistical
> values of a given volume using itk
> 
> 

http://www.itk.org/Insight/Doxygen/html/classitk_1_1LabelStatisticsImageFilter.html
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageMomentsCalculator.html

> Thanx in advance
> 
> 
> Suresh
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@...
> http://www.itk.org/mailman/listinfo/insight-users
Luis Ibanez | 1 Aug 15:48 2005

Re: Export data


Hi Suresh,

Please look at the ITK Tutorials

   http://www.itk.org/HTML/Tutorials.htm

There is a full tutorial on how to
integrate ITK with your application

http://www.itk.org/CourseWare/Training/GettingStarted-V.pdf

It includes a detailed explanation on how to
convert ITK images into C-arrays, back and forth.

    Regards,

      Luis

-----------------
Suresh G N wrote:
> I have two silly questions please:
> 
> 1) I am trying to get data from a itk::Image. I found  the below one, 
> but not my requirement. Can any one tell me is there a facility to 
> import data from an itk::Image type to C array?
> 
> ImportImageFilter <a02158.html> provides a mechanism for importing data 
> into an itk::Image <a02088.html>. ImportImageFilter <a02158.html> is an 
> image source, so it behaves like any other pipeline object. what abt 
> other way?
> 
> 2) Is it possible to find the Mean, variance and other statistical 
> values of a given volume using itk
> 
> Thanx in advance
> 
> Suresh
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@...
> http://www.itk.org/mailman/listinfo/insight-users

Gmane