[Insight-developers] backward imcompatible changes in gaussian spatial object ?

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sat Jan 13 04:30:26 EST 2007


Julien,

I seem that the changes you have done in the gaussian spatial objet  
recently are changing the result produced by one the WrapITK tests:

http://www.itk.org/Testing/Sites/marvin.jouy.inra.fr/Linux-gcc-Debug/20070113-0100-Nightly/Results/__Wrapping_WrapITK_Python_Tests_PythonSpatialObject.html

Are those changes backward incompatibles, or is it a problem in the way I  
have used that gaussian spatial object ?

Thanks,

Gaetan



import itk
 from sys import argv, stderr, exit

itk.auto_progress(2)

dim = 2
SOType = itk.SpatialObject[dim]
InternalImageType = itk.Image[itk.F, dim]
OutputPixelType = itk.UC
OutputImageType = itk.Image[OutputPixelType, dim]

ellipse = itk.EllipseSpatialObject[dim].New( Radius=[10,5] )
ellipse.GetObjectToParentTransform().SetOffset( [20,20] )
ellipse.ComputeObjectToWorldTransform()

box = itk.BoxSpatialObject[dim].New( Size=20 )
box.GetObjectToParentTransform().SetOffset( [20,40] )
box.ComputeObjectToWorldTransform()

gaussian = itk.GaussianSpatialObject[dim].New()
gaussian.GetObjectToParentTransform().SetOffset( [60,60] )
gaussian.GetObjectToParentTransform().SetScale( 10 )
gaussian.ComputeObjectToWorldTransform()

group = itk.GroupSpatialObject[dim].New()
group.AddSpatialObject( ellipse.GetPointer() )
group.AddSpatialObject( box.GetPointer() )
group.AddSpatialObject( gaussian.GetPointer() )

filter = itk.SpatialObjectToImageFilter[SOType,  
InternalImageType].New( group, Size=[100,100], UseObjectValue=True )
filter.Update() # required ?!

rescale = itk.RescaleIntensityImageFilter[InternalImageType,  
OutputImageType].New( filter,  
OutputMinimum=itk.NumericTraits[OutputPixelType].NonpositiveMin(),  
OutputMaximum=itk.NumericTraits[OutputPixelType].max() )

itk.write(rescale, argv[1])


-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-developers mailing list