[Insight-users] deformable registration 3D
Luis Ibanez
luis.ibanez at kitware.com
Wed, 28 Apr 2004 10:07:41 -0400
Hi Christoph
Thanks for letting us know that the
registration is now working for you.
About the output:
if you want to get image files in 16bit/pixel
You should simply instantiate the writers as
typedef itk::Image< unsigned short, Dimension > OutputImageType;
typedef itk::ImageFileWriter< OutputImageType > WriterType;
Note that the image that you connect to the writer in SetInput()
*must* be of pixel type "unsigned short". If you need a
conversion you could to casting with:
CastImageFilter
RescaleIntensityImageFilter
IntensityWindowingImageFilter
or any of the other filters described in Section 6.2
"Casting and Intensity Mapping", pdf-page 146 on the
SoftwareGuide.
http://www.itk.org/ItkSoftwareGuide.pdf
Feel free to delete the resampling part. If you want to
do subtraction you may want to use the SquaredDifference
image filter. You will find examples on the use of this
filter the follwing files:
Insight/Examples/Registration/
DeformableRegistration4.cxx
ImageRegistration1.cxx
ImageRegistration10.cxx
ImageRegistration5.cxx
ImageRegistration6.cxx
ImageRegistration7.cxx
ImageRegistration8.cxx
ImageRegistration9.cxx
Regards,
Luis
----------------------------
Christoph Albrecht wrote:
> Dear Luis,
>
> Many Thanks. I changed all file types to the correspondend 3D types, now it
> works fine. The relative path was no problem anymore.
> Now I have one more thing:
> The input files are 16 bit files, ANALYZE format. The output files are also
> ANALYZE, but only 8 bit. Can I change the output somewhere to 16 bit? In the
> internet I found the information that it is short integer.
> I was also thinking of deleting the whole rescaling part, because after the
> registration I want to substract the original, fixed image from the result
> to see a distribution of a contrast medium.
>
> Best regards
> Christoph
>
>
>
>
>
>
> ----- Original Message -----
> From: "Luis Ibanez" <luis.ibanez at kitware.com>
> To: "Christoph Albrecht" <chrisalb at upvnet.upv.es>
> Cc: <insight-users at itk.org>
> Sent: Monday, April 26, 2004 7:00 PM
> Subject: Re: [Insight-users] deformable registration 3D
>
>
>
>>Hi Christoph,
>>
>>Did you changed the Dimension from 2 to 3
>>in the .cxx file and recompiled ?
>>
>>The error message is sayikng that the
>>image filename was not found.
>>
>>You are writing a relative path in the
>>specification of the input Moving and
>>Fixed image files.
>>
>>Could you please try with an absolute
>>path ?
>>
>>Please let us know if that works or not.
>>
>>
>> Thanks
>>
>>
>> Luis
>>
>>
>>----------------------------
>>Christoph Albrecht wrote:
>>
>>
>>>Hello,
>>>
>>>I tried to use the example "deformableregistration1" for a 3D problem
>
> instead of the given 2D problem.
>
>>>The result was always 2D, the first slice of my ANALYZE data registered.
>>>In an old post I found this problem solved by adding a third 1 to the
>
> "scaling at lowest level of pyramid", but this leads to the error message:
>
>>>%---------------------------------------------------
>>>Exception caught during reference file reading
>>>
>>>itk::ImageFileReaderException (010DFB2C)
>>>Location: "Unknown"
>>>File: ......\IO\itkImageFileReader.txx
>>>Line: 91
>>>Description: FileName must be specified
>>>%----------------------------------------------------
>>>
>>>My configuration file looks like the following, I have only changed the
>
> dimensions, the file names and the third 1:
>
>>>% ---------------------------------------------------------
>>>1 % Number of levels in the multi-res pyramid (1 = single-res)
>>>1 % Highest level to use in the pyramid
>>> 1 1 1 % Scaling at lowest level of pyramid
>>> 4 % Number of pixels per element
>>> 1.e4 % Elasticity (E)
>>> 1.e4 % Density x capacity (RhoC)
>>> 1 % Image energy scaling (gamma) - sets gradient step size
>>> 2 % NumberOfIntegrationPoints
>>> 1 % WidthOfMetricRegion
>>> 20 % MaximumIterations
>>>
>>>0 0.99 % Similarity metric (0=mean sq, 1 = ncc, 2=pattern int, 3=MI,
>
> 5=demons)
>
>>>1.0 % Alpha
>>>0 % DescentDirection (1 = max, 0 = min)
>>>0 % DoLineSearch (0=never, 1=always, 2=if needed)
>>>1.e1 % TimeStep
>>>0.5 % Landmark variance
>>>0 % Employ regridding / enforce diffeomorphism ( >= 1 -> true)
>>>
>>>512 % Nx (image x dimension)
>>>512 % Ny (image y dimension)
>>>24 % Nz (image z dimension - not used if 2D)
>>>./___FEM/000000310000001x01.hdr % ReferenceFileName
>>>./___FEM/000000310000001x02.hdr % TargetFileName
>>>
>>>0 % UseLandmarks? - read the file name below if this is true
>>>- % LandmarkFileName
>>>./___FEM/RatLung_result % ResultsFileName (prefix
>
> only)
>
>>>1 % WriteDisplacementField?
>>>./___FEM/RatLung_disp % DisplacementsFileName
>
> (prefix only)
>
>>>0 % ReadMeshFile?
>>>- % MeshFileName
>>>END
>>>%-----------------------------------------------------------------------
>>>
>>>
>>>I would be glad if somebody could help me with this.
>>>
>>>Many thanks
>>> Christoph Albrecht
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
>>
>
>