[Insight-users] test image for DeformableRegistration7.cxx and DeformableRegistration8.cxx

Luis Ibanez luis.ibanez at kitware.com
Tue Jan 11 10:01:40 EST 2005


Hi Xavier,


Thanks for your clarification.


The reason why you cannot use BMP as file format for the resampled
images is that they are declared as using pixeltype = "signed short".


This pixel type is not supported by the BMP fileformat.


BTW, BMP is an extremely poor fileformat for medical images, you
may want to avoid it unless you are in a really desperate situation.


You may want to use Analyze or MetaImage in order to save the output
images, and MetaImage or VTK in order to save the deformation field.



    Regards,


       Luis


-------------------
BATY Xavier wrote:
> Hello,
> 
> My goal is to register 2 2D images with MI Criterion and a Bspline
> transformation
> 
> So I changed  Dimension = 3 to Dimension = 2 in DeformableRegistration8.cxx.
> Is it sufficient to "fulfill my dreams"?
> 
> and i tried with to run the program. then i got the error message that leads
> me to ask my previous question.
> 
> thanks for all
> xavier
> 
> 
> 
> ----- Original Message ----- 
> From: "Luis Ibanez" <luis.ibanez at kitware.com>
> To: "BATY Xavier" <xavier.baty at univ-angers.fr>
> Cc: <insight-users at itk.org>
> Sent: Monday, January 10, 2005 6:15 PM
> Subject: Re: [Insight-users] test image for DeformableRegistration7.cxx and
> DeformableRegistration8.cxx
> 
> 
> 
>>Hi Xavier,
>>
>>I missed to notice that these two examples are 3D,
>>instead of 2D.  Sorry about that.
>>
>>
>>They will not run correctly by providing 2D images
>>as input. You may want to create a deformed 3D image
>>to be used as input.
>>
>>In this way you can use your favorite 3D image as the
>>FixedImage input, and its artificial deformation as
>>the MovingImage input.
>>
>>
>>In order to create deformations in 3D images you can
>>use any of the examples:
>>
>>
>>     Insight/Examples/Registration/
>>                         LandmarkWarping2.cxx
>>                         BSplineWarping1.cxx
>>
>>
>>You will only need to modify the code in order to
>>replace Dimension = 2, with Dimension = 3.
>>
>>You will find easier to do the deformation with
>>LandmarkWarping2 than with BSplineWarping1.
>>
>>The input file that you need to provide to Landmark
>>Warping is a plain text file that should contain the
>>coordinates of landmarks in the fixed image and their
>>corresponding coordinates in the moving image.
>>
>>For example, if you have landmarks:
>>
>>   FixedImage       MovingImage
>>    (0,0,0)   ----->  (0,0,0)
>>   (100,0,0)  ----->(110,0,0)
>>   (0,100,0)  -----> (0,150,0)
>>    (0,0,30)   ----->  (0,0,40)
>>
>>
>>then the input file with landmark coordinates information
>>should be:
>>
>>    0   0   0             0   0   0
>>  100   0   0           110   0   0
>>    0 100   0             0 150   0
>>    0   0  30             0   0  40
>>
>>
>>
>>Another easy way of generating a deformed image is to use
>>the LandmarkWarping plugin for VolView.
>>
>>
>>
>>You can download the free version of VolView from:
>>
>>   http://www.kitware.com/products/volview.html
>>
>>
>>
>>
>>Regards,
>>
>>
>>     Luis
>>
>>
>>------------------
>>BATY Xavier wrote:
>>
>>
>>>hello
>>>I tried the following to perform registration.
>>>
>>>  DeformableRegistration8
>>>          BrainProtonDensitySliceBorder20.png
>>>         BrainProtonDensitySliceBSplined10.png
>>>         Output.bmp
>>>         DifAfter.bmp
>>>         FifBef.bmp
>>>         Field.vtk
>>>
>>>i got this error message:
>>>
>>>ExceptionObject caught !
>>>
>>>itk::ExeceptionObject (0105F13C)
>>>Location: "Unknown"
>>>File: C:\InsightToolkit-1.8.1\Code\IO\itkBMPImageIO.cxx
>>>Line: 522
>>>Description: File cannot be write
>>>
>>>Is there something wrong in the way i run the program?
>>>I use a windows2000 OS with VS6
>>>
>>>thanks
>>>Xavier
>>>
>>>------------------------------------------
>>>Hi Jim,
>>>
>>>For  DeformableRegistration7.cxx do:
>>>
>>>
>>>  DeformableRegistration7
>>>          fixedImage
>>>          movingImage
>>>          outputResampledMovingImage
>>>         [differenceImageAfterRegistration]
>>>         [differenceImageBeforeRegistration]
>>>         [deformationField]
>>>
>>>
>>>All in a single command line. Note that for the
>>>deformation field you must use an image file format
>>>that supports multiplecomponents, such as VTK or
>>>MetaImage. The entries in-between "[]" are optional.
>>>
>>>
>>>
>>>For visualizing the deformation field you can use
>>>ParaView:
>>>
>>>       http://www.paraview.org
>>>
>>>
>>>
>>>
>>>For input images you coulde use:
>>>
>>>    fixedImage = Insight/Examples/Data/
>>>                    BrainProtonDensitySliceBorder20.png
>>>
>>>    movingImage = Insight/Examples/Data/
>>>                    BrainProtonDensitySliceBSplined10.png
>>>
>>>
>>>
>>>The same arguments are expected by DeformableRegistration8.
>>>
>>>
>>>
>>>
>>>Please let us know if you have further questions.
>>>
>>>
>>>      Thanks
>>>
>>>
>>>        Luis
>>>
>>>
>>>
>>>-------------------------------------------
>>>Jim wrote:
>>>
>>>
>>>
>>>>Hi,
>>>>
>>>>Where can I find instruction and test images for
>>>>DeformableRegistration7.cxx and DeformableRegistration8.cxx.
>>>>
>>>>Thanks.
>>>>
>>>>Jim
>>>>_______________________________________________
>>>>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
>>>
>>>
>>
>>
>>
>>
> 
> 
> 






More information about the Insight-users mailing list