[Insight-users] Re: ITK advice needed : DerivativeImageFilter example and PNG & TIFF images.

Luis Ibanez luis.ibanez at kitware.com
Tue Aug 23 19:49:20 EDT 2005


Hi Siddharth,

PNG and TIFF do not support float pixel types.

On reading ITK will convert the pixel type of
your PNG or TIFF file into the "float" pixel
type used in this example program.

But for the output you cannot use PNG or TIFF
in order to receive the "float" image that ITK
is producing.

You can use instead a more general file format
such as:

   1) MetaImage    .mhd
   2) VTK          .vtk
   3) GIPL         .gipl
   4) Analyze      .hdr


Note that the example for DerivativeImageFilter
expects three command line arguments. The first
one is the input image filename, the second is
the output image filename with float pixel type,
and the third one is the output image filename
for a normalized image with pixel type "char".



Regards,


   Luis



Siddharth Vikal wrote:
> Hello Luis,
>  
> Thanks for responding back.
>  
> Well, I'm giving an input of a file which is there in example data, the 
> format is PNG or in another case it was TIFF. I guess these file formats 
> are supported by ITK.
>  
> What else could be the problem?
>  
> Looking forward to hear from you.
>  
> regards
> siddharth
> 
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
> 
> 
>     Hi Siddarth,
> 
>     Welcome to ITK,
> 
>     You will find useful to follow the examples
>     in the ITK Software Guide:
> 
>     http://www.itk.org/ItkSoftwareGuide.pdf
> 
> 
>     You will find there typical values for the
>     parameters of most filters.
> 
> 
>     If an ITK program failed when reading your
>     data, chances are that you are providing
>     a file with an image format that is not
>     supported by ITK. Please refer to the chapter
>     "Reading and Writing Images" for a full list
>     of the image file formats supported in ITK.
> 
> 
>     You will also find useful to read the material
>     of the ITK Tutorials:
> 
>     http://www.itk.org/HTML/Tutorials.htm
> 
> 
>     Please let us know if you have further questions,
> 
> 
>     Thanks
> 
> 
>     Luis
> 
> 
> 
>     -------------------------
>     Siddharth Vikal wrote:
>      > Hello Luis,
>      >
>      > I'm working on Dr. Gabo! r's project of Brachytherapy seed
>     segmentation.
>      >
>      > I've no previous experience with ITK, but I'm learning to get
>     some. I'm
>      > trying to use ITK with Visual Studio .Net. I've compiled the
>     library in
>      > a different directory using CMake as directed in the
>     documentation. To
>      > get familiar, I was trying to run the example programs. They
>     build fine,
>      > but for example, Derivative Image Filter example, when I give it an
>      > input file (one from example data or my own, it doesn't matter), the
>      > program gives a run time error & terminates.
>      >
>      > I tried to trace & debug, the error seems to be coming at
>      > filter->update() method during some memory allocation I
>     guess...So I"m
>      > unable to proceed further. This is true even for the
>      > GradientMagnitudeFilter.
>      >
>      > Also, in the documentation for DerivativeImageFilter, it is not
>     clear
>      > what values & what range of values is acc! epted in arguments of
>      > SetOrder(int..) & SetDirection (int.) functions, I can just
>     imagine that
>      > I have to supply unsigned int values & nothing more.
>      >
>      > Can you please clear my doubts.
>      >
>      > Thanking you in anticipation and looking forward to hear from you.
>      >
>      > regards
>      > siddharth
>      >
>      > */Luis Ibanez /* wrote:
>      >
>      >
>      > Hi Gabor,
>      >
>      >
>      > As a complement of what Stephen already described, here are some
>      > names of filters and ITK examples that you may find useful to
>      > look at for approaching your problem.
>      >
>      >
>      > 1) For detection of BBS
>      >
>      > You could use filters such as
>      >
>      >
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1HessianRecursiveGaussianImageFilter.html
>      > and variations of the Hessian space like
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1Hessian3DToVesselnessMeasureImageFilter.html
>      >
>      > You could also use the Hat filters
>      >
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1HMaximaImageFilter.html
>      >
>      >
>      >
>      > 2) For calibration correction,
>      > once you gather the images from grids that Stephen suggested,
>      > you can use the following classes in order to compute
>      > correction fields:
>      >
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1KernelTransform.html
>      >
>      > and any of its derived classes:
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1ElasticBodyReciprocalSplineKernelTransform.html
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1ElasticBodySplineKernelTransform.html
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1ThinPlateR2LogRSplineKernelTransform.html
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1ThinPlateSplineKernelTransform.html
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1VolumeSplineKernelTransform.html
>      >
>      >
>      > You could also use BSplines with the classes
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1BSplineDeformableTransform.html
>      >
>      >
>      >
>      > 3) One application that you may want to look at is
>      >
>      >
>      > InsightApplications/
>      > IntensityBased2D3DRegistration
>      >
>      >
>      > This code is available in the InsightApplications module
>      > that you get with the releases, and that yo! u can get
>      > through CVS too.
>      >
>      >
>      >
>      > You probably want to take a look also at
>      >
>      >
>      > InsightApplications/
>      > Curve2DExtractor
>      >
>      >
>      > and
>      >
>      > InsightApplications/
>      > Curve3DExtractor
>      >
>      >
>      >
>      > 4) The 3D/2D registration! problem for the treatment seeds is
>     probably
>      > better approached using the combination of the Levenberg-Marquardt
>      > optimizer
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1LevenbergMarquardtOptimizer.html
>      >
>      > and the Rigid3DPerpective transform
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1Rigid3DPerspectiveTransform.html
>      >
>      > along with a Metric of your choice, that in the case of BBS, and
>      > extracted features may be something like the
>      >
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1EuclideanDistancePointMetric.html
>      >
>      >
>      >
>      >
>      > As Stephen already pointed out, there are many different ways
>      > of approaching these problems, and there are many classes in ITK
>      > that could be used for implementing those app! roaches. In a typical
>      > application you probably will end up using many of the existing ITK
>      > methods, and then customizing one or two for your p! articular type
>      > of clinical problem.
>      >
>      >
>      >
>      >
>      >
>      > Please let us know if you have further questions,
>      >
>      >
>      >
>      > Regards,
>      >
>      >
>      >
>      > Luis
>      >
>      >
>      >
>      > -------------------------
>      > Gabor Fichtinger wrote:
>      >
>      > > Dear Steve and Luis,
>      > >
>      > > Few days ago I talked with Bill Lorensen in Betheada about a
>     clinical
>      > > software problem that my group must solve rather urgently. (We
>      > must go
>      > > clinical during the fall, so we work on an accelerated time scale
>      > here.)
>      > > Bill suggested that I should seek your expert advice in the matter.
>      > >
>      > > The project involves reconstruction of the location of implanted
>      > prostate
>      > > brachytherapy seeds from a limited number of C-arm fluoroscopy
>      > shots. The
>      > > image processing work at hand entails segmentation of various
>      > metal objects:
>      > > fid! ucials (ellipses, straight line segments, BBs) and seeds
>      > (5x1 mm metal
>      > > pellets)
>      > > from C-arm fluoroscopic images. Calibration fixtures and
>      > dewarping grids are
>      > > also need be segmented from the C-arm images. I have the following
>      > > questions:
>      > >
>      > > (1) What filters and segmentation tools are available in ITK to
>      > support
>      > > these tasks?
>      > >
>      > > (2) Are there any fluoro calibration/distortion correction
>      > modules in or
>      > > outside ITK that we could use as an example/template?
>      > >
>      > > (3) Are there any application-level ITK examples that we could
>      > use as an
>      > > example/template?
>      > >
>      > > Steve, if I am not mistaken, you have done extensive work on
>      > fluoro/CT
>      > > registration of liver images that might have involved some of the
>      > problems
>      > > we are facing here. Please copy my associates on your reply.
>     Our lead
>      > > software engineer is Anton Deguet whom you probably remember from
>      > various
>      > > ITK work! shops.
>      > >
>      > > Thanks so very much, in advance, and have a great weekend.
>      > >
>      > > --gabor
>      > >
>      > > --
>      > > Gabor Fichtinger, Ph.D.
>      > > Associate Research Professor of
>      > > Computer Science, Mechanical Engineering and Radiology
>      > > Director of Engineering
>      > > Center for Computer-Integrated Surgery
>      > > Johns Hopkins University
>      > > 3400 North Charles Street
>      > > Baltimore MD 21218-2682
>      > > New Engineering Bldg, Room B26
>      > > Office: (410) 516-4057
>      > > Mobile: (410) 562-6955
>      > > Fax : (410) 516-5553
>      > > mailto:gabor at cs.jhu.edu
>      > > Assistant: Luwanna Spells
>      > > (410) 516-6235, lspells at cs.jhu.edu
>      > >
>      > >
>      > >
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      > Start your day with Yahoo! - make it your home page
>      >
> 
> ------------------------------------------------------------------------
> Start your day with Yahoo! - make it your home page 
> <http://us.rd.yahoo.com/evt=34442/*http://www.yahoo.com/r/hs>



More information about the Insight-users mailing list