[Insight-users] itk neighborhood operator image filter error

Luis Ibanez luis.ibanez at kitware.com
Thu, 22 Apr 2004 20:22:03 -0400


Hi Raghu,

At this point there is no way in ITK for
creating *any* type of DICOM images.

The DICOM writing functionality has been
entered as a feature request in the bug
tracker. You may want to join the group
who is interested in this functionality,
log in the bug tracker and vote for this
feature in order to increase its priority.

In the meantime I would suggest you to use
the MetaImage format in order to write
RGB and/or RGBA images.


   Regards,


     Luis


----------------------
raghu venkatram wrote:

> Hi Luis,
> 
> is there a way to create color dicom images? in the sense store a color 
> map/palatte within the dicom files.
> 
> Thanks,
> 
> Raghu
> 
>  >From: Luis Ibanez <luis.ibanez at kitware.com>
>  >To: raghu venkatram <raghu_420 at hotmail.com>
>  >CC: insight-users at itk.org
>  >Subject: Re: [Insight-users] itk neighborhood operator image filter error
>  >Date: Tue, 20 Apr 2004 21:01:16 -0400
>  >
>  >
>  >Hi Raghu,
>  >
>  >If the metric value gets to a stable value you can
>  >define a stopping criterion by using the Gradient
>  >Magnitude Tolerance.
>  >
>  >In the case of the RegularStepGradientDescentOptimizer
>  >http://www.itk.org/Insight/Doxygen/html/classitk_1_1RegularStepGradientDescentBaseOptimizer.html
>  >
>  >You call:
>  >
>  >      SetGradientMagnitudeTolerance();
>  >
>  >The optimizer will stop when the magnitude
>  >of the Metric gradient is less than this
>  >value.
>  >
>  >The default value is :   1 e-4
>  >
>  >
>  >You will find the code that controls the optimizer in
>  >
>  >     Insight/Code/Numerics/
>  >         itkRegularStepGradientDescentBaseOptimizer.cxx
>  >
>  >In line 197.
>  >
>  >
>  >----
>  >
>  >
>  >If you use the RegularStepGradientDescent optimizer, the
>  >step length is divided by two each time the gradient change
>  >directions.
>  >
>  >
>  >If you use the GradientDescent optimizer, the learning
>  >rate is constant. You could however change it from the
>  >Execute() method of a Command/Observer.
>  >
>  >
>  >You will find the code for the GradientDescentOptimizer at
>  >
>  >        Insight/Code/Numerics/
>  >           itkGradientDescentOptimizer.cxx
>  >
>  >
>  >
>  >   Regards,
>  >
>  >
>  >      Luis
>  >
>  >
>  >---------------------
>  >raghu venkatram wrote:
>  >>
>  >>
>  >>Hi Luis,
>  >>
>  >>Using the gradient descent optimizer, even with 2000 iterations, my
>  >>registration does not converge. But my results do look good, as a
>  >>plot of my iterations vs my metric, my metric kind of flattens out
>  >>after a certain number of iterations.
>  >>
>  >>my question is the learning rate constant throughout the process?
>  >>or is it divided my the current iteration something like
>  >>r/iteration no.?
>  >>
>  >>thanks,
>  >>raghu
>  >>
>  >>&gt;From: Luis Ibanez &lt;luis.ibanez at kitware.com&gt;
>  >>&gt;To: raghu venkatram &lt;raghu_420 at hotmail.com&gt;
>  >>&gt;CC: insight-users at itk.org
>  >>&gt;Subject: Re: [Insight-users] itk neighborhood operator image
>  >>filter error
>  >>&gt;Date: Tue, 20 Apr 2004 14:34:15 -0400
>  >>&gt;
>  >>&gt;
>  >>&gt;Hi raghu,
>  >>&gt;
>  >>&gt;The optimizer scales do not need to be different among
>  >>&gt;X, Y, and Z. Unless the anisotropy ratio as big as 1:10.
>  >>&gt;
>  >>&gt;The goal of the parameter scaling is to deal with large
>  >>&gt;dynamic range differences such  as degrees versus
>  >>&gt;millimeters where the ratio is in the range of 1:100.
>  >>&gt;
>  >>&gt;If your metric plots shows the Metric behaving smoothly,
>  >>&gt;you can take the risk of *increasing* (not decreasing)
>  >>&gt;the step length of the optimizer, and probably reducing
>  >>&gt;the number of iterations.
>  >>&gt;
>  >>&gt;Note however that if your registration is using all the
>  >>&gt;allotted iterations, it means that it has not converged,
>  >>&gt;and that you still have homework to do in parameter
>  >>&gt;tunning.
>  >>&gt;
>  >>&gt;
>  >>&gt;
>  >>&gt;    Regards,
>  >>&gt;
>  >>&gt;
>  >>&gt;       Luis
>  >>&gt;
>  >>&gt;
>  >>&gt;
>  >>&gt;------------------------
>  >>&gt;raghu venkatram wrote:
>  >>&gt;
>  >>&gt;&gt;Hello Luis,
>  >>&gt;&gt;
>  >>&gt;&gt;Thank you for the tip, it was ofcourse my CT volume, I was
>  >>only
>  >>&gt;&gt;reading 2 slices. I am not sure why this is happening as I
>  >>used
>  >>&gt;&gt;MRICro to convert both my CT and MR volumes into mayo
>  >>clinic
>  >>&gt;&gt;analyze format and everything works fine. using ITK's dicom
>  >>series
>  >>&gt;&gt;reader reads my MR volume and am able to wrtie it out, but
>  >>it dies
>  >>&gt;&gt;on the third slice of my CT volume.
>  >>&gt;&gt;
>  >>&gt;&gt;Also regarding registration itself, i am using viola-wells
>  >>mutual
>  >>&gt;&gt;information, with gradient descent and the translation
>  >>transform.
>  >>&gt;&gt;in this set up should my my optimizer scales for x and y be
>  >>equal
>  >>&gt;&gt;to 1 while my optimizer scale for z slightly greater than
>  >>1? my z
>  >>&gt;&gt;in the volume is much smaller than the inplane dimensions.
>  >>&gt;&gt;
>  >>&gt;&gt;with a step size of 18 and 500 epochs, i am getting good
>  >>results,
>  >>&gt;&gt;and a final metric value of 0.2-0.4,  a plot of the
>  >>iteration vs
>  >>&gt;&gt;metric shows that the metric is fairly stable with this,
>  >>should i
>  >>&gt;&gt;decrease the step size and increase the iterations further?
>  >>&gt;&gt;
>  >>&gt;&gt;
>  >>&gt;&gt;
>  >>&gt;&gt;thanks
>  >>&gt;&gt;
>  >>&gt;&gt;raghu
>  >>&gt;&gt;
>  >>&gt;&gt;  &gt;From: Luis Ibanez &lt;luis.ibanez at kitware.com&gt;
>  >>&gt;&gt;  &gt;To: raghu venkatram &lt;raghu_420 at hotmail.com&gt;
>  >>&gt;&gt;  &gt;CC: insight-users at itk.org
>  >>&gt;&gt;  &gt;Subject: Re: [Insight-users] itk neighborhood
>  >>operator image
>  >>&gt;&gt;filter error
>  >>&gt;&gt;  &gt;Date: Mon, 19 Apr 2004 19:43:23 -0400
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;Hi Raghu,
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;It is likely that your process for reading the
>  >>&gt;&gt;  &gt;DICOM series is failing.  The fact that it shows
>  >>&gt;&gt;  &gt;up in the Neighborhood iterator may simply indicate
>  >>&gt;&gt;  &gt;that you are reading an image of a single slice,
>  >>&gt;&gt;  &gt;for example.
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;Please connect a ImageFileWriter directly to the
>  >>&gt;&gt;  &gt;output of the DicomSeries reader and save the
>  >>&gt;&gt;  &gt;image in another format. MetaImage will be the
>  >>&gt;&gt;  &gt;best choice since then you can look at the header
>  >>&gt;&gt;  &gt;and figure out what information from the DICOM
>  >>&gt;&gt;  &gt;file is getting lost on the way.
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;Chances are that you only have a Input/Output
>  >>&gt;&gt;  &gt;problem and not a processing problem.
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;I will also suggest you to try the example
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;     Insight/Examples/IO/
>  >>&gt;&gt;  &gt;         DicomSeriesReadImageWrite.cxx
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;for reading your Dicom images, and to make sure
>  >>&gt;&gt;  &gt;that you are using the series reader correctly.
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;For example, note that you should specify the
>  >>&gt;&gt;  &gt;string identifying the series to be read.
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;Please let us know what you find.
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;    Thanks,
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;       Luis
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;-----------------------
>  >>&gt;&gt;  &gt;raghu venkatram wrote:
>  >>&gt;&gt;  &gt;&gt;Hello Luis,
>  >>&gt;&gt;  &gt;&gt;  I am trying to register a MR and CT image using
>  >>ImagetoImage
>  >>&gt;&gt;  &gt;&gt;mutual information measure, I have no problems
>  >>whatsoever using
>  >>&gt;&gt;the
>  >>&gt;&gt;  &gt;&gt;analyze image format.
>  >>&gt;&gt;  &gt;&gt;  when i switch to dicom, and use the series
>  >>reader, i can read
>  >>&gt;&gt;  &gt;&gt;both the series, but my program terminates with
>  >>an error window
>  >>&gt;&gt;  &gt;&gt;asking me to notify microsoft, debug option takes
>  >>me to the
>  >>&gt;&gt;  &gt;&gt;itkneighborhoodoperator filter.
>  >>&gt;&gt;  &gt;&gt;  is there something obvious that i am doing
>  >>wrong? my image
>  >>&gt;&gt;types
>  >>&gt;&gt;  &gt;&gt;are unsigned short 3 dimensions.
>  >>&gt;&gt;  &gt;&gt;  thanks,
>  >>&gt;&gt;  &gt;&gt;raghu
>  >>&gt;&gt;  &gt;&gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;
>  >>&gt;&gt;  &gt;_______________________________________________
>  >>&gt;&gt;  &gt;Insight-users mailing list
>  >>&gt;&gt;  &gt;Insight-users at itk.org
>  >>&gt;&gt;  &gt;http://www.itk.org/mailman/listinfo/insight-users
>  >>&gt;&gt;
>  >>&gt;&gt;------------------------------------------------------------------------
>  >>
>  >>&gt;&gt;Check out MSN PC Safety &amp; Security to help ensure your
>  >>PC is
>  >>&gt;&gt;protected and safe.
>  >>&lt;http://g.msn.com/8HMAENUS/2749??PS=&gt;
>  >>&gt;&gt;_______________________________________________
>  >>Insight-users
>  >>&gt;&gt;mailing list Insight-users at itk.org
>  >>&gt;&gt;http://www.itk.org/mailman/listinfo/insight-users
>  >>&gt;
>  >>&gt;
>  >>&gt;
>  >>
>  >>_________________________________________________________________
>  >>
>  >>>From must-see cities to the best beaches, plan a getaway with the
>  >>>Spring
>  >>
>  >>Travel Guide! http://special.msn.com/local/springtravel.armx
>  >>
>  >>
>  >
>  >
>  >
>  >_______________________________________________
>  >Insight-users mailing list
>  >Insight-users at itk.org
>  >http://www.itk.org/mailman/listinfo/insight-users
> 
> ------------------------------------------------------------------------
> FREE pop-up blocking with the new MSN Toolbar – get it now! 
> <http://g.msn.com/8HMAENUS/2734??PS=> 
> _______________________________________________ Insight-users mailing 
> list Insight-users at itk.org 
> http://www.itk.org/mailman/listinfo/insight-users