[Insight-users] Questions

Angela a.mendoza at alumnos.urjc.es
Fri Apr 29 09:55:38 EDT 2005


I am very interesting in to begin to work with itk but I need to know how
can I form itk and I can see the examples the registration itk.

Thank you.

Angela



-----Mensaje original-----
De: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org] En
nombre de insight-users-request at itk.org
Enviado el: viernes, 29 de abril de 2005 8:11
Para: insight-users at itk.org
Asunto: Insight-users Digest, Vol 12, Issue 68

Send Insight-users mailing list submissions to
	insight-users at itk.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://www.itk.org/mailman/listinfo/insight-users
or, via email, send a message with subject or body 'help' to
	insight-users-request at itk.org

You can reach the person managing the list at
	insight-users-owner at itk.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Insight-users digest..."


Today's Topics:

   1. Re: Normalized MI (Karthik Krishnan)
   2. Re: How to get update or actual speed from level	set	image
      filter (Luis Ibanez)
   3. Re: Iteration stops so fast! (Luis Ibanez)
   4. RE: discreteGaussianImageFilter has	problemswithinteger
      images (Miller, James V (Research))
   5. ITK Programs and executable files (Ken Urish)
   6. Re: ITK Programs and executable files (Ashish Poddar)
   7. Re: [Insight-developers] template <> (Ashish Poddar)


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

Message: 1
Date: Thu, 28 Apr 2005 15:58:04 -0400
From: Karthik Krishnan <Karthik.Krishnan at kitware.com>
Subject: Re: [Insight-users] Normalized MI
Cc: insight insight <insight-users at itk.org>
Message-ID: <4271404C.8070708 at kitware.com>
Content-Type: text/plain; charset=GB2312

Try looking at the evolution of the joint histograms as iterations
progress. The HistogramToEntropyImageFilter and derivatives do this. See
example Registration/ImageRegistrationHistogramPlotter.cxx. This plots
the joint histogram at every iteration. This will tell you if you are
overbinning or underbinning or if there is enough information to drive
MI. You should see that MI tries to re-group the bins. Sometimes you
might just have a few bins occupied and that may not be sufficient to
drive MI.

Run the example runs on BrainT1SliceBorder20 and
BrainProtonDensitySliceShfited13x17y.png,
and you will see the joint histograms grouping.

Thanks
karthik


Yu Qi wrote:

> I copied some code from
>
Testing/Code/Algorithms/itkNormalizedMutualInformationHistogramImageToImageM
etricTest.cxx
> into my application of registration of MRI and fMRI.
> But the result is not good.
> I have two questions:
> 1. do i need metric->SetInterpolater();
> metric->SetTransform();
> metric->SetFixedImageRegion();,
> as I set those in registration->SetXXXXXX() ?
> 2. Which parameters are most important in normalized histogram MI
> metric? and how to adjust them to get a good result?
> BTW, I found there is no rotation in my result.
> Thanks!
> Best regards,
> Yu Qi
>
>
> ------------------------------------------------------------------------
> *Do You Yahoo!?*
> 150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌà <http://music.yisou.com>
> ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ <http://image.yisou.com>
> 1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
>
<http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_
1g/>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>  
>



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

Message: 2
Date: Thu, 28 Apr 2005 16:32:27 -0400
From: Luis Ibanez <luis.ibanez at kitware.com>
Subject: Re: [Insight-users] How to get update or actual speed from
	level	set	image filter
To: "Nils H. Busch" <nilsb at cbs.mpg.de>
Cc: insight-users at itk.org
Message-ID: <4271485B.8040908 at kitware.com>
Content-Type: text/plain; charset=us-ascii; format=flowed


Hi Nils,

Please look at the method

      ComputeUpdate()

in any of the LevelSet methods.

If you grep for "ComputeUpdate()" in

     Insight/Code/BasicFilter
     Insight/Code/Algorithms


you will find most of them.



Note that this is the update for ONE pixel.



    Regards,


       Luis



-------------------
Nils H. Busch wrote:

> Hello,
> 
> how can i get the update values (as an image) of a level set filter for
> each iteration ?
> By update, I mean the update values of the right hand size of the finite
> difference equation. Or even better, how can i get the current speed per
> iteration,  not only the static part of the speed image, but the whole
> speed term consisting of propagation speed etc for every valid pixel, e.g.
> the zero level set or the whole image. I need to check the speed that is
> actually computed by my level set filter derived from
> itkSegmentationLevelSetImageFilter, so this would at least grab the speed
> or update values for the specified layers.
> 
> I know that I need to attach an observer to the segmentation filter, but
> it is not quite clear to me how I can get access to the actual update
> values or computed speed term for all valid pixels.
> 
> Thanks.
> 
> 





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

Message: 3
Date: Thu, 28 Apr 2005 16:36:03 -0400
From: Luis Ibanez <luis.ibanez at kitware.com>
Subject: Re: [Insight-users] Iteration stops so fast!
To: Yu Qi <felix_china at yahoo.com.cn>
Cc: insight insight <insight-users at itk.org>
Message-ID: <42714933.9020501 at kitware.com>
Content-Type: text/plain; charset=GB2312


Hi Yu,

Please connect a Command observer to your optimizer
and print out the values of the Metric and the
VersorTransform parameters at every iteration.

Then post that list of values to the mailing list.

You will find many examples on how to connect Command
Observers to optimizers if you look at the Registration
chapter of the ITK SoftwareGuide

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



The most common reason for having an early stop
of the optimizer is to have set up a minimal step
length that is too large.



Regards,



   Luis



------------
Yu Qi wrote:

> MRI/fMRI
> I use
>  
> /Viola MI metric/
> /versorRigid3D Transforms/ and /Optimizer/ with /centeredTransform /
> /

> initializer/
> /linear interpolator/
>  
> my parameters were as follows,
> optimizer scale= [1, 1 , 1 , 0,001 , 0,001 , 0,001]
> imageStandardDeviation=0.4
> number of spacial samples=80
> numberOfIterations=200
>  
> It seems that the iteration stops around 15 every time.
> and the result were the same bad no matter how I changed the parameters.
>  
> What happened?
>  
> 
> 
> *Best Regards!*
> ** 
> *Yu Qi*
>  
>  
> 
> 
> ------------------------------------------------------------------------
> *Do You Yahoo!?*
> 150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌà <http://music.yisou.com>
> ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ <http://image.yisou.com>
> 1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ 
>
<http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_
1g/> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users





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

Message: 4
Date: Thu, 28 Apr 2005 17:02:21 -0400
From: "Miller, James V (Research)" <millerjv at crd.ge.com>
Subject: RE: [Insight-users] discreteGaussianImageFilter has
	problemswithinteger images
To: "Miller, James V (Research)" <millerjv at crd.ge.com>,	"Martin
	Urschler" <martin at urschler.info>, <insight-users at itk.org>
Message-ID:
	<FA26BEF1EA775E4584FB34B91E14A1C4B41902 at SCHMLVEM01.e2k.ad.ge.com>
Content-Type: text/plain;	charset="iso-8859-1"

Martin, 

I have made some changes to the DiscreteGaussianImageFilter and the 
NeighborhoodOperatorImageFilter to support having an operator with
a different kernel type than the pixel type of the image.

I need to clean some things up and run some tests then I will 
try to check it in tomorrow.

Jim


-----Original Message-----
From: insight-users-bounces at itk.org
[mailto:insight-users-bounces at itk.org]On Behalf Of Miller, James V
(Research)
Sent: Thursday, April 28, 2005 1:17 PM
To: Martin Urschler; insight-users at itk.org
Subject: RE: [Insight-users] discreteGaussianImageFilter has
problemswithinteger images


How much round off error are you willing to accept?

The DiscreteGaussian uses separable convolution.  So N convolutions
are performed to smooth an ND image.  The intermediate results could
be kept as float so the second through N-1st convolution would not have
any round off error and the last convolution would bring the pixeltypes
back to short.  Or the results of all convolutions in your case could
be shorts and the round off error would acculumate as the separable 
convolutions are performed.

Do you have a preference?

Jim



-----Original Message-----
From: insight-users-bounces at itk.org
[mailto:insight-users-bounces at itk.org]On Behalf Of Martin Urschler
Sent: Thursday, April 28, 2005 8:59 AM
To: insight-users at itk.org
Subject: [Insight-users] discreteGaussianImageFilter has problems
withinteger images


hello,

If I use the DiscreteGaussianImageFilter on e.g. a signed short itk 
image instead of a float or double itk image, then I found that the 
output image of the filter is zero.


Here is my sample code:

Int16ImageType::Pointer image =
    VolumeIOWrapper<Int16ImageType>::readITKVolume(inputFilename, "");

typedef itk::DiscreteGaussianImageFilter<Int16ImageType,
   Int16ImageType> SmoothingFilterType;
SmoothingFilterType::Pointer smoother = SmoothingFilterType::New();

SmoothingFilterType::ArrayType variances;
variances[0] = sigma_x;
variances[1] = sigma_y;
variances[2] = sigma_z;

smoother->SetVariance( variances );
smoother->SetInput( image );
ITK_EXCEPTION_CHECKED( "smoothing", smoother->Update(), EXIT_FAILURE );

Int16ImageType::Pointer smoothed_image = smoother->GetOutput();

VolumeIOWrapper<Int16ImageType>::writeITKVolume16Bit(smoothed_image,
    outputFilename, "");




I traced this error down to the itkGaussianOperator and its parent class 
the itkNeighborhoodOperator. The Gaussian operator correctly creates 
discrete gauss kernel coefficients that have floating point values 
between 0 and 1 (method "GenerateCoefficients()" in 
itkGaussianOperator.txx). However the neighborhood operator that stores 
these coefficients has signed short as pixel type due to the 
instantiation in itkDiscreteGaussianImageFilter and therefore the 
"FillCenteredDirectional(const CoefficientVector &coeff)" method of 
itkNeighborhoodOperator assigns the float coefficients to signed short, 
thereby cutting off everything behind the comma, leaving 0s for the 
operator.

this happens here:

for (data = data.Begin(); data < data.End(); ++data, ++it)
{
   *data = static_cast<TPixel>(*it);
   // *it are the float coefficients, TPixel is signed short!
}


IMHO this is a bug, since I don't understand why it shouldn't be 
possible to convolve a signed short image with a float kernel resulting 
in a signed short image. The only problem that I see are rounding errors 
due to the implicit cast from float back to signed short.

My application has to deal with large volumes (500^3 voxel), therefore I 
don't want to cast my volumes to float for smoothing!

So, what should I do in this case? Hack a little bit in the interiors of 
the GaussianImageFilter and the NeighborhoodOperator? Form a bug request?

thanks,
Martin

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


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

Message: 5
Date: Thu, 28 Apr 2005 22:28:13 -0400
From: Ken Urish <ken.urish at gmail.com>
Subject: [Insight-users] ITK Programs and executable files
To: insight-users at itk.org
Message-ID: <d9adedd80504281928138a92c1 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

When I compile a program I wrote using ITK in Visuaual Studio 7 .net
(release mode) and I try to run the executable file on a different
computer I get the error message that it is missing MSVCP71.dll.

What do I need to do to use all this great ITK stuff I wrote on other
computer's in the lab? What other files do I need to include with the
.exe file that I compile?

I was told that I should transfer the ITK library dll files in the ITK
binary directory into the /windows/system32 folder, but the only dll
file I can find in my binary directory is "ITKCommon.dll". Your advice
would be much appreciated.

Thanks
--Ken--


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

Message: 6
Date: Fri, 29 Apr 2005 02:02:51 -0400
From: Ashish Poddar <ahpoddar at gmail.com>
Subject: Re: [Insight-users] ITK Programs and executable files
To: Insight Users <insight-users at itk.org>
Cc: ken.urish at gmail.com
Message-ID: <3d6c3f4805042823027d9cbe88 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

if u compiled it in visual studio .net, then maybe the compiled code needs 
.net runtime to execute.. just a possibility though i doubt it myself...

regards,
Ashish.

On 4/28/05, Ken Urish <ken.urish at gmail.com> wrote:
> 
> When I compile a program I wrote using ITK in Visuaual Studio 7 .net
> (release mode) and I try to run the executable file on a different
> computer I get the error message that it is missing MSVCP71.dll.
> 
> What do I need to do to use all this great ITK stuff I wrote on other
> computer's in the lab? What other files do I need to include with the
> .exe file that I compile?
> 
> I was told that I should transfer the ITK library dll files in the ITK
> binary directory into the /windows/system32 folder, but the only dll
> file I can find in my binary directory is "ITKCommon.dll". Your advice
> would be much appreciated.
> 
> Thanks
> --Ken--
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 



-- 
Ashish Poddar
Have an acceptable reason for accepting anything.
Y:ashish_poddar | MSN:ashish_poddar at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://public.kitware.com/pipermail/insight-users/attachments/20050429/caaab
5dc/attachment-0001.htm

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

Message: 7
Date: Fri, 29 Apr 2005 02:10:27 -0400
From: Ashish Poddar <ahpoddar at gmail.com>
Subject: [Insight-users] Re: [Insight-developers] template <>
To: Insight Users <insight-users at itk.org>
Cc: Kent Williams <norman-k-williams at uiowa.edu>
Message-ID: <3d6c3f48050428231014e76ef4 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

the error may be linked with something in your code where you are using that

templatized class..

as an example if u have 

template <class T>
void myfun(T);

and when calling this function u use

myfun<int>(4); // this is explicit specialization of the template parameter
myfun(4); // this is implicit specialization of the template parameter

so this warning must be linked with some similar code...

HTH,
with regards,
Ashish.

On 4/28/05, Kent Williams <norman-k-williams at uiowa.edu> wrote:
> 
> I noticed a warning when I used gcc -pedantic to compile some code that
> uses ITK. There were a bunch of warnings from gcc:
> 
> warning: explicit specialization not preceded by `template <>'
> 
> This goes back to itkMetaDataObject.h, and the NATIVE_TYPE_METADATAPRINT
> macro.
> That macro is used to define template specializations. I don't believe
> its widely used, and you never see a warning if you don't use -pedantic.
> At the same time, the only reason I could see for adding template <> to
> the template specializations is if there are compilers supported by ITK
> that would choke on that syntax.
> 
> So, does anyone know of compilers that wouldn't like template <>?
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 



-- 
Ashish Poddar
Have an acceptable reason for accepting anything.
Y:ashish_poddar | MSN:ashish_poddar at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://public.kitware.com/pipermail/insight-users/attachments/20050429/28d13
c23/attachment.html

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

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


End of Insight-users Digest, Vol 12, Issue 68
*********************************************



More information about the Insight-users mailing list