[Insight-users] ImageToImageFilter

Gwenaël Guillard gwenael.guillard@enst-bretagne.fr
Mon, 02 Dec 2002 20:34:35 +0100


--------------D7888084752057A5B61B78FB
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi Luis,

I want to compute the local maxima of an image. I didn't find a filter that
do this so I tried to implemented my own algorithm.

1. I do typedef ImageToImageFilter    LocalMaximaFilterType
2. LocalMaximaFilterType::Pointer m_LocalMaxima
3. m_LocalMaxima->SetInput(m_Modulus->GetOutput( ))     (m_Modulus in
GaussianFilter example)
4. do my computation on             m_LocalMaxima->GetOutput( )
with          m_LocalMaxima->GetOutput( )->SetPixel(  ,   )
5. display

Gwenael







Luis Ibanez a écrit :

> Hi Gwenael,
>
> Are you creating your own filter deriving from
> ImageToImageFilter  ?
>
> or are you looking for a filter that performs
> a particular process on an image ?
>
> The itk::ImageToImageFilter is the base class of all
> the image filters in the toolkit. It is not intended
> to be instantiated.
>
> If you want to write a filter, SetPixel()/GetPixel()
> are not the appropiate methods for getting access to
> image data. You may want to look in to image iterators.
>
> Please give us more information about what you are
> trying to implement.
>
>    Thanks
>
>     Luis
>
> ======================================================
>
> Gwenaël Guillard wrote:
>
> > Hi,
> >
> > I would like to use ImageToImageFilter to compute things in an image and
> > have a new image.
> > I use SetInput(), do my computation but I don't know how to get the
> > output image in order to do a SetPixel() and then use this new/modified
> > image with the GetOutput() method of the filter.
> >
> > When I'm using ImageToImageFilter->GetOutput()->SetPixel(index,value).,
> > it compiles but does not run. It says memory "can't be writen".
> >
> > Thanks,
> >
> > Gwenael
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users@public.kitware.com
> > http://public.kitware.com/mailman/listinfo/insight-users
> >
> >

--
-----------------------------------------------------------
Gwenael Guillard
Doctorant
Departement Image et Traitement de l'Information (ITI)
LAboratoire  de Traitement de l'Information Medicale (LATIM) - INSERM ERM 0102
ENST Bretagne
Technopole Brest Iroise
BP 832 - 29285 Brest Cedex
Tel : 02 29 00 13 01
email : gwenael.guillard@enst-bretagne.fr, g.guillard@ieee.org



--------------D7888084752057A5B61B78FB
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi Luis,
<p>I want to compute the local maxima of an image. I didn't find a filter
that do this so I tried to implemented my own algorithm.
<p>1. I do typedef ImageToImageFilter&nbsp;&nbsp;&nbsp; LocalMaximaFilterType
<br>2. LocalMaximaFilterType::Pointer m_LocalMaxima
<br>3. m_LocalMaxima->SetInput(m_Modulus->GetOutput( ))&nbsp;&nbsp;&nbsp;&nbsp;
(m_Modulus in GaussianFilter example)
<br>4. do my computation on&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
m_LocalMaxima->GetOutput( )&nbsp;&nbsp;&nbsp;&nbsp; with&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
m_LocalMaxima->GetOutput( )->SetPixel(&nbsp; ,&nbsp;&nbsp; )
<br>5. display
<p>Gwenael
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<p>Luis Ibanez a &eacute;crit :
<blockquote TYPE=CITE>Hi Gwenael,
<p>Are you creating your own filter deriving from
<br>ImageToImageFilter&nbsp; ?
<p>or are you looking for a filter that performs
<br>a particular process on an image ?
<p>The itk::ImageToImageFilter is the base class of all
<br>the image filters in the toolkit. It is not intended
<br>to be instantiated.
<p>If you want to write a filter, SetPixel()/GetPixel()
<br>are not the appropiate methods for getting access to
<br>image data. You may want to look in to image iterators.
<p>Please give us more information about what you are
<br>trying to implement.
<p>&nbsp;&nbsp; Thanks
<p>&nbsp;&nbsp;&nbsp; Luis
<p>======================================================
<p>Gwena&euml;l Guillard wrote:
<p>> Hi,
<br>>
<br>> I would like to use ImageToImageFilter to compute things in an image
and
<br>> have a new image.
<br>> I use SetInput(), do my computation but I don't know how to get the
<br>> output image in order to do a SetPixel() and then use this new/modified
<br>> image with the GetOutput() method of the filter.
<br>>
<br>> When I'm using ImageToImageFilter->GetOutput()->SetPixel(index,value).,
<br>> it compiles but does not run. It says memory "can't be writen".
<br>>
<br>> Thanks,
<br>>
<br>> Gwenael
<br>>
<br>> _______________________________________________
<br>> Insight-users mailing list
<br>> Insight-users@public.kitware.com
<br>> <a href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a>
<br>>
<br>></blockquote>

<pre>--&nbsp;
-----------------------------------------------------------
Gwenael Guillard
Doctorant
Departement Image et Traitement de l'Information (ITI)
LAboratoire&nbsp; de Traitement de l'Information Medicale (LATIM) - INSERM ERM 0102
ENST Bretagne
Technopole Brest Iroise
BP 832 - 29285 Brest Cedex
Tel : 02 29 00 13 01
email : gwenael.guillard@enst-bretagne.fr, g.guillard@ieee.org</pre>
&nbsp;</html>

--------------D7888084752057A5B61B78FB--