[Insight-users] RE: Reg Deformabale Reg 6
Dalal, Dhaval
dalal at bnl.gov
Wed Sep 22 12:21:01 EDT 2004
Thanx Luis,
What should the output image be specified as, .img or .hdr?
Thanx
Dhaval Dalal
-----Original Message-----
From: Luis Ibanez
To: Dalal, Dhaval
Cc: 'Insight-users at itk.org '
Sent: 9/19/2004 8:14 PM
Subject: Re: Reg Deformabale Reg 6
Hi Dalal,
1) You should specify the filenames with extensions .hdr
as the input in the command line of this example.
The associated .img files must be in the same directory
as the .hdr files.
2) The program is not hanging...
it is simply consuming a lot of CPU time, because the
operation that you are requesting is *extremely* time
consuming. If you are in Unix you can check the CPU
consumption with the command "top", if you are using
windows, you can use CPU usage with the "Task Manager".
3) The Multi-resolution scheme in DeformableRegistration6
is applyed to the BSpline Grid, not to the image. You
still should use a multi-resolution scheme for the image
itself.
4) Replacing the image type is the most important step,
however you still have to add the settings for the
parameters of the Mattes mutual information class.
Please look at the Software Guide for a description
of the parameters needed by the Mattes metric.
5) Before you do too far,... did you already applied an
Affine (or at least a rigid) registration to your pair
of images ?
If there is any misregistration at the Affine transform
level, you don't want to try to solve it using a deformable
transform such as the BSplines, it will take a long time
for the BSpline to converte to that correction. Please
reserve the BSpline for very local and small correction
that remain after an Affine transform registration.
Regards,
Luis
---------------------
Dalal, Dhaval wrote:
> Hi Luis
> Thanx for your help regarding analyze format.
> I have some more questions to ask
> - I can specify the 2 .img files on the command line (my .hdr files
are
> stored in the same directory) and specify the output file as .img . IS
this
> correct?
> - In DeformableRegistration6.cxx, I just changed
> const unsigned int ImageDimension = 3 (for 3D datasets).
> My datasets are 256*256*512 Mri Images. When i run the exe file
> it says "Starting resolution with low resolution transform", but
just
> hangs in there and nothing seems to happen,I changed from
> DeformableRegistration4.cxx to DeformableRegistration6.cxx to
incorporate
> multi-resolution scheme but it still seems to be very slow.
> Any suggestions on how can i increase the speed, like should i reduce
the
> Bspline grid size.
> - My goal is to to replace the itkMeanSquaresImageToImageMetric.h with
> Mattes implementation of MI cause i will be registering different
modality
> images, for doing this
> #include "itkMeanSquaresImageToImageMetric.h"
> needs to be replaced with
> #include "itkMattesMutualInformationImageToImageMetric.h"
> and
> typedef itk::MeanSquaresImageToImageMetric<
> FixedImageType,
> MovingImageType > MetricType;
> on line 116 needs to be replaced with
> typedef itk::MattesMutualInformationImageToImageMetric<
> FixedImageType,
> MovingImageType >
MetricType;
> IS that all?
> I did run the example Imageregistration11.cxx to get an idea about
this
> metric by changing the no. of histogram bins and no. of spatial
samples.
> But i tested it for 2D data.
> Kindly reply back. Any help will be greatly appreciated.
> Thanx
> Regards
> Dhaval
>
> -----Original Message-----
> From: Luis Ibanez
> To: Dalal, Dhaval
> Cc: Insight-users at itk.org
> Sent: 9/12/2004 12:48 PM
> Subject: Re: how to read analyze files
>
>
> Hi Dhaval,
>
> Regarding your questions on DeformableRegistration4.cxx
>
> 1) "How to change the code for 3D images?"
>
> A) Just edit the file, go to line 106, and replace
>
> "const unsigned int Dimension = 2;"
>
> with
>
> "const unsigned int Dimension = 3;"
>
>
> B) in line 208 add the third component of the initial
> parameters (for the Z axis)
>
> initialParameters[0] = 0.0; // Initial offset in mm along X
> initialParameters[1] = 0.0; // Initial offset in mm along Y
> initialParameters[2] = 0.0; // Initial offset in mm along Z
>
>
> Then recompile...
>
>
>
>
> 2) "How do i change the code in there to read analyze files?"
>
> You have not done your homework !
>
> from the previous email:
>
> > You don't need anything especial for reading Analyze
> > images. The Analyze reader is used by default by the
> > ImageIO factory.
> >
> > You just need to instantiate an ImageFileReader and
> > to pass the filename of your image to the reader.
> > The image file and header must be located in the
> > same directory. ITK will expect your header file to
> > have extension ".hdr".
> >
> > Please read the IO Chapter from the ITK Software Guide
> >
> > http://www.itk.org/ItkSoftwareGuide.pdf
> >
> > Chapter 7, pdf-page 219-240.
> >
> >
>
> If you do your homework, there will be no need for
> repeating the same question over and over again.
>
>
>
>
> Regards,
>
>
>
> Luis
>
>
> -------------------
> Dalal, Dhaval wrote:
>
>
>> Hi Luis
>> Thanx so much for your reply.
>>I want to use Deformable regitration4 example based on bsplines.
>>I have successfully tested the algorithm for 2D .tif files, running
>
> the
>
>>executables from ms-dos.
>>Can you please tell me
>>- How to change the code for 3D images
>>- How do i change the code in there to read analyze files
>>i am not fluent in C++ so i am confused regarding which specific class
>
> to
>
>>intantiate.
>>PLease let me know.
>>thanx
>>Dhaval
>>
>>-----Original Message-----
>>From: Luis Ibanez
>>To: Dalal, Dhaval
>>Cc: Insight-users at itk.org
>>Sent: 9/10/2004 5:45 PM
>>Subject: Re: how to read analyze files
>>
>>
>>Hi Dalal,
>>
>>
>>Please read the IO Chapter from the ITK Software Guide
>>
>> http://www.itk.org/ItkSoftwareGuide.pdf
>>
>>Chapter 7, pdf-page 219-240.
>>
>>---
>>
>>You don't need anything especial for reading Analyze
>>images. The Analyze reader is used by default by the
>>ImageIO factory.
>>
>>You just need to instantiate an ImageFileReader and
>>to pass the filename of your image to the reader.
>>The image file and header must be located in the
>>same directory. ITK will expect your header file to
>>have extension ".hdr".
>>
>>--
>>
>>Most of the examples in ITK are designed to be run
>>from the command line. There are not intended to be
>>GUI applications. You need to run them from an MS_DOS
>>command window or from a Cygwin shell.
>>
>>Please read the ITK software guide, all the examples
>>are described there.
>>
>>
>>If you are interested in GUI applications, you could
>>try the ones in the InsightApplications module.
>>
>>However, it will be much more efficient for you to
>>first get familiar with ITK by reading the software
>>guide and by looking at the Tutorial sessions.
>>
>> http://www.itk.org/HTML/Tutorials.htm
>>
>>
>>
>>Regards,
>>
>>
>> Luis
>>
>>---------------------
>>Dalal, Dhaval wrote:
>>
>>
>>
>>>
>>>Hi Luis
>>>I DOn't now how to read in analyze file format, i did not see any
>>
>>examples
>>
>>
>>>on this and even the software guide does not explain this.
>>>can you tell me which files to use, so that i can write the cmake.txt
>>
>>file
>>
>>
>>>with the included libraries.
>>>also shuld my image files and header files should be stored in the
>>
>>same
>>
>>
>>>directory.
>>>I am not so fluent in C++, also whenever i run any exe file(generated
>>
>>from
>>
>>
>>>buildiing examples), the exe file just appears on the screen and
>>
>>disappears,
>>
>>
>>>how can i see the output? or do i have to add some getc statement in
>>
>>the c++
>>
>>
>>>code and generate the build again?
>>>i am sorry for asking such questions..
>>>thanx in advance for yr help.
>>>Dhaval
>>>
>>
>>
>>
>>
>>
>
>
>
>
More information about the Insight-users
mailing list