[Insight-users] Using Any Filters

Neha D itkneha@yahoo.com
Tue, 29 Apr 2003 09:15:42 -0700 (PDT)


--0-88425486-1051632942=:61332
Content-Type: text/plain; charset=us-ascii

Hi Julien,Thanks for your reply.  I am using MetaImage importer to read raw image and then apply one filter on it and then write the image in raw format. I was wondering if I can make any filter application example to deal with any file format..(those currently supported by ITK ).  Anyways, I am using now pipes of filters once I load the image using Meta file importer. And this is definitely easier to use as you have  suggested here. Thanks,Neha Julien Jomier <jjomier@cs.unc.edu> wrote:Hi Neha,

ITK filters are using itk::Image as a data representation and therefore are
independent of the file format you are using. To answer your question, you
do not have to register filters with the IO factory.
Basically, the itkIO reads an image (any formats) from disk and produces an
itk::Image which is processed by the filters.

The best way to read a .raw image is to use the MetaImageImporter (in
InsightApplications) to create a MetaImage header. Then you can use the
ImageReadWrite example to read the MetaImage created. MetaImage is a file
format (see http://www.itk.org/HTML/Data.htm and
Insight/Utilities/MetaIO/doc) which specifies a header with the pixel type,
spacing, etc... for your raw image.

However, you can take a look at the RawImageReaderViewer example (in
InsightApplications) or
even, in Insight/Testing/Code/IO if you want to read your .raw image
directly, but this is more complex.

Let us know if you have further questions.

Julien

-----Original Message-----
From: insight-users-admin@public.kitware.com
[mailto:insight-users-admin@public.kitware.com] On Behalf Of Neha D
Sent: Monday, April 28, 2003 3:46 PM
To: Luis Ibanez; cspl
Cc: insight-users@public.kitware.com; Lydia Ng
Subject: [Insight-users] Using Any Filters


Hi All,

I am trying to use any filter on raw images. Do I need register all those
filters to central IO Factory ? I have seen that most of ITK applications/
filters deal with formats like PNG. But I can not use any other format than
raw. Raw format is a must for me. 

Any input is highly appreciated. 
Thanks,
Neha

Luis Ibanez wrote:

Hi Sateesh,

I agree with you in that 1Gb is too much memory
for performing the registration of your current
images using a single resolution level.

This may require to profile the example closer.
One typical suspect is the computation of derivatives
in the ImageMetric. In any case, it is quite likely
that some intermediate memory is being keept around
without being used.

The option I mention of loading only particular
levels of the pyramid is something you will have to
implement in your applications. This is not a feature
of the current multi-resolution framework.


Regards,


Luis


-------------------

cspl wrote:
> Hi Lius,
> Thanks for ur mail.
> As u said i tried Registration by reducing the number of levels to 
> 1. It is performing registration with out any error but it takes more 
> memory as i said before. It is taking nearly 1000Mb of memory. It is too 
> heavy.
> 
> Now how to load the memory related to particular level of the 
> pyramid. When we are in 1st level we should load only images related to 
> 1st level. Then when we are in 2nd level we should deallocate the 1st 
> level memory and load the second level memory and so on...How to achive 
> this task. I have gone through the documentation of the registration 
> class and pyramid class for any specific function which serves the 
> purpose. But i did not find one...Any other way to achive this.
> 
> I am trying the second method which u have said i.e. subsampling the 
> images, registering them, save the transform parameters and so on.
> 
> Please help in this regard. Time is running out for me.
> 
> Thanks in advance.
> 
> -Regards,
> Sateesh.



________ _______________________________________
Insight-users mailing list
Insight-users@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-users


Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
--0-88425486-1051632942=:61332
Content-Type: text/html; charset=us-ascii

<DIV>Hi Julien,</DIV>
<DIV>Thanks for your reply. </DIV>
<DIV>&nbsp;</DIV>
<DIV>I am using MetaImage importer to read raw image and then apply one filter on it and then write the image in raw format. </DIV>
<DIV>I was wondering if I can make any filter application example to deal with any file format..(those currently supported by ITK ). </DIV>
<DIV>&nbsp;</DIV>
<DIV>Anyways, I am using now pipes of filters once&nbsp;I load the image using Meta file importer. And this is definitely easier to&nbsp;use as you have&nbsp; suggested here.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks,</DIV>
<DIV>Neha</DIV>
<DIV>&nbsp;</DIV>
<DIV><B><I>Julien Jomier &lt;jjomier@cs.unc.edu&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi Neha,<BR><BR>ITK filters are using itk::Image as a data representation and therefore are<BR>independent of the file format you are using. To answer your question, you<BR>do not have to register filters with the IO factory.<BR>Basically, the itkIO reads an image (any formats) from disk and produces an<BR>itk::Image which is processed by the filters.<BR><BR>The best way to read a .raw image is to use the MetaImageImporter (in<BR>InsightApplications) to create a MetaImage header. Then you can use the<BR>ImageReadWrite example to read the MetaImage created. MetaImage is a file<BR>format (see http://www.itk.org/HTML/Data.htm and<BR>Insight/Utilities/MetaIO/doc) which specifies a header with the pixel type,<BR>spacing, etc... for your raw image.<BR><BR>However, you can take a look at the RawImageReaderViewer example (in<BR>InsightApplications) or<BR>even, in Insight/Testing/Code/IO if you want to read your .raw image<BR>directly, but this is more complex.<BR><BR>Let us know if you have further questions.<BR><BR>Julien<BR><BR>-----Original Message-----<BR>From: insight-users-admin@public.kitware.com<BR>[mailto:insight-users-admin@public.kitware.com] On Behalf Of Neha D<BR>Sent: Monday, April 28, 2003 3:46 PM<BR>To: Luis Ibanez; cspl<BR>Cc: insight-users@public.kitware.com; Lydia Ng<BR>Subject: [Insight-users] Using Any Filters<BR><BR><BR>Hi All,<BR><BR>I am trying to use any filter on raw images. Do I need register all those<BR>filters to central IO Factory ? I have seen that most of ITK applications/<BR>filters deal with formats like PNG. But I can not use any other format than<BR>raw. Raw format is a must for me. <BR><BR>Any input is highly appreciated. <BR>Thanks,<BR>Neha<BR><BR>Luis Ibanez <LUIS.IBANEZ@KITWARE.COM>wrote:<BR><BR>Hi Sateesh,<BR><BR>I agree with you in that 1Gb is too much memory<BR>for performing the registration of your current<BR>images using a single resolution level.<BR><BR>This may require to profile the example closer.<BR>One typical suspect is the computation of derivatives<BR>in the ImageMetric. In any case, it is quite likely<BR>that some intermediate memory is being keept around<BR>without being used.<BR><BR>The option I mention of loading only particular<BR>levels of the pyramid is something you will have to<BR>implement in your applications. This is not a feature<BR>of the current multi-resolution framework.<BR><BR><BR>Regards,<BR><BR><BR>Luis<BR><BR><BR>-------------------<BR><BR>cspl wrote:<BR>&gt; Hi Lius,<BR>&gt; Thanks for ur mail.<BR>&gt; As u said i tried Registration by reducing the number of levels to <BR>&gt; 1. It is performing registration with out any error but it takes more <BR>&gt; memory as i said before. It is taking nearly 1000Mb of memory. It is too <BR>&gt; heavy.<BR>&gt; <BR>&gt; Now how to load the memory related to particular level of the <BR>&gt; pyramid. When we are in 1st level we should load only images related to <BR>&gt; 1st level. Then when we are in 2nd level we should deallocate the 1st <BR>&gt; level memory and load the second level memory and so on...How to achive <BR>&gt; this task. I have gone through the documentation of the registration <BR>&gt; class and pyramid class for any specific function which serves the <BR>&gt; purpose. But i did not find one...Any other way to achive this.<BR>&gt; <BR>&gt; I am trying the second method which u have said i.e. subsampling the <BR>&gt; images, registering them, save the transform parameters and so on.<BR>&gt; <BR>&gt; Please help in this regard. Time is running out for me.<BR>&gt; <BR>&gt; Thanks in advance.<BR>&gt; <BR>&gt; -Regards,<BR>&gt; Sateesh.<BR><BR><BR><BR>________ _______________________________________<BR>Insight-users mailing list<BR>Insight-users@public.kitware.com<BR>http://public.kitware.com/mailman/listinfo/insight-users<BR><BR><BR>Do you Yahoo!?<BR>The New Yahoo! Search - Faster. Easier. Bingo.<BR></BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com">The New Yahoo! Search</a> - Faster. Easier. Bingo.
--0-88425486-1051632942=:61332--