[Insight-users] Re: deformable3Dfilter

Pieter Vos pieterv@radiology.azn.nl
Tue, 7 May 2002 12:29:02 +0200 (CEST)


Hi,

I found that when I input an image to the filter with spacing 1 1 1 in
sted of 1.024 1.024 1.024 the mesh is placed correctly on the image, so my
remark below about the cast form double to int is most likely correct.

On Tue, 7 May 2002, Pieter Vos wrote:

> Hello,
> 
> 
> When I compile the itkDeformable3DFilter I recieve the following warnings:
> 
> ---------------------------
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx: In
> method `long unsigned int
> itk::BinaryMask3DMeshSource<TOutputMesh>::SearchThroughLastRow (int, int,
> int) [with TOutputMesh =
> DMesh]':
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:2217:   instantiated
> from `itk::BinaryMask3DMeshSource<TOutputMesh>::AddNodes (int, unsigned
> char *, long unsigned int *) [with TOutputMesh = DMesh]'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:1161:   instantiated
> from `itk::BinaryMask3DMeshSource<TOutputMesh>::AddCells (unsigned char,
> unsigned char, int) [with TOutputMesh = DMesh]'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:1036:   instantiated
> from `itk::BinaryMask3DMeshSource<TOutputMesh>::CreateMesh () [with
> TOutputMesh = DMesh]'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:59:   instantiated
> from `itk::BinaryMask3DMeshSource<TOutputMesh>::GenerateData () [with
> TOutputMesh = DMesh]'
> /data/cemri/TestITK/DM/test/deformableTest.cxx:164:   instantiated from
> here
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:2307: warning: assignment
> to `int'
> from `double'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:2307: warning: argument
> to `int' from
> `double'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx: In
> method `long unsigned int
> itk::BinaryMask3DMeshSource<TOutputMesh>::SearchThroughLastFrame (int,
> int, int) [with TOutputMesh =
> DMesh]':
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:2226:   instantiated
> from `itk::BinaryMask3DMeshSource<TOutputMesh>::AddNodes (int, unsigned
> char *, long unsigned int *) [with TOutputMesh = DMesh]'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:1161:   instantiated
> from `itk::BinaryMask3DMeshSource<TOutputMesh>::AddCells (unsigned char,
> unsigned char, int) [with TOutputMesh = DMesh]'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:1036:   instantiated
> from `itk::BinaryMask3DMeshSource<TOutputMesh>::CreateMesh () [with
> TOutputMesh = DMesh]'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:59:   instantiated
> from `itk::BinaryMask3DMeshSource<TOutputMesh>::GenerateData () [with
> TOutputMesh = DMesh]'
> /data/cemri/TestITK/DM/test/deformableTest.cxx:164:   instantiated from
> here
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:2336: warning: assignment
> to `int'
> from `double'
> /data/cemri/Insight/Code/Algorithms/itkBinaryMask3DMeshSource.txx:2336: warning: argument
> to `int' from
> `double'
> 
> --------------------------------
> 
> When I visualize the binary image (see test file: binaryImageType::Pointer
> biimg=binaryImageType::New();) of the deformable filter AND the output
> mesh of the deformable filter, I can see the mesh is shifted for a bit
> from the binary image away. The origin of the binary image is 0,0,0 and of
> the mesh 1,1,1.
> So maybe there is data lossed when casting from double to int? 
> 
> Thanks for the help,
> 
> 

-- 
Pieter Vos
UMC Radboud Nijmegen
The Netherlands
mailto:pieterv@radiology.azn.nl