[Insight-users] How can I use LinearInterpolateImageFunction After BilateralImageFilter

Luis Ibanez luis.ibanez at kitware.com
Sat May 29 11:15:31 EDT 2010


Hi Danile,


                  Welcome to ITK !


1)  ITK images are N-Dimensional.

    When you use the Linear Interpolation class,
    it does:

    a)  Linear interpolation if the image is 1-D
    b)  Bilinear interpolation if the image is 2-D
    c)  Trilinear interpolation if the image is 3-D

    and so on....


2)   It looks like what you really want to do is to
      Resample the image at the output of the
      BilateralImageFilter.

      Something that internally will require an
      interpolator.


      Please look at the ITK Software Guide

           http://www.itk.org/ItkSoftwareGuide.pdf

    in particular to

              Section: 6.9.4. "Resample Image Filter".

     in pdf-pages :  254-284.


   You will find many source code examples in

               Inisght/Examples/Filtering



   Regards,


           Luis



--------------------------------------------------------------------------------------
2010/5/29 noc <hawkingyy at hotmail.com>

>  Hi everyone,
> I'm new here to use ITK,and I met some problems now,and really wanna know
> the solutions,could U help me,please?
>
> first,I don't know whether it's Bilinear Interpolation or Linear
> Interpolation when I use LinearInterpolateImageFunction to process a 2D
> image.
>
> second, how can I use LinearInterpolateImageFunction after
> BilateralImageFilter? The purpose to do so is that I wanna keep the edge of
> a CT image, and make the edge more consecutive.
>
> In the end,here's the codes I coded (just Bilinear Interpolation, I don't
> know how to use LinearInterpolateImageFunction)
>
> int main()
> {
>  typedef itk::Image<unsigned short, 2> ImageType;
>  typedef itk::ImageFileReader<ImageType> ReaderType;
>  typedef itk::GDCMImageIO DICOMType;
>  typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;
>  typedef itk::BilateralImageFilter<ImageType, ImageType> FilterType;
>  typedef itk::LinearInterpolateImageFunction<ImageType, double>
> InterpolatorType;
>
>  ReaderType :: Pointer reader = ReaderType :: New();
>  DICOMType :: Pointer gcdmImageIO = DICOMType :: New();
>  ConnectorType :: Pointer connector = ConnectorType :: New();
>  FilterType :: Pointer filter = FilterType :: New();
>  InterpolatorType :: Pointer interpolator = InterpolatorType::New();
>
>  reader->SetImageIO(gcdmImageIO);
>  reader->SetFileName("d:/Data/feet/feet.140");
>
>  filter->SetInput(reader->GetOutput());
>  filter->SetDomainSigma(1.0);
>  filter->SetRangeSigma(1.0);
>
>  return 0;
> }
>
> Could U help me, please?
> Thanks!
> And best wishes!!!
>
> Danile <http://www.windowslive.cn/safe/>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100529/8cfe72e7/attachment.htm>


More information about the Insight-users mailing list