[Insight-users] Speeding up the SpatialObjectToImageFilter

Heike Moll Heike.Moll at rwth-aachen.de
Tue Jun 17 06:53:43 EDT 2008


Hi Dan,

I have the same problem like Anja (but with a SurfaceSpatialObject). 

I want to look at your Insight Journal contribution but I can't open it! Please, can you send me a copy?

Thx Heike

----- Ursprüngliche Nachricht -----
Von: Dan Mueller <dan.muel at gmail.com>
Datum: Dienstag, Juni 17, 2008 11:18 am
Betreff: Re: [Insight-users] Speeding up the SpatialObjectToImageFilter
An: Anja Ende <anja.ende at googlemail.com>
Cc: insight-users at itk.org

> Hi Anja,
> 
> You may want to look at my Insight Journal contribution "Using a Mask
> to Decrease Computation Time for SpatialObject to Image Conversions":
> http://www.insight-
> journal.org/InsightJournalManager/view_reviews.php?pubid=117
> The approach taken is to firstly compute a low resolution mask of the
> image, dilate the mask (to ensure it includes all areas), and then
> compute the conversion only for pixels under the mask. As I wrote the
> paper over 2 years ago, I can't recall if it will work for
> BlobSpatialObjects, but you can give it a shot.
> 
> Hope this helps.
> 
> Regards, Dan
> 
> 2008/6/17 Anja Ende <anja.ende at googlemail.com>:
> > Hello everyone,
> >
> > I am using the SpatialObjectToImageFilter as follows:
> >
> > typedef typename itk::Image<unsigned char, 3> ImageType;
> > typedef typename itk::SpatialObjectToImageFilter<PolygonType,
> > ImageType> SpatialObjectToImageFilterType;
> > typedef typename SpatialObjectToImageFilterType::Pointer
> > SpatialObjectToImageFilterTypePointer;
> > SpatialObjectToImageFilterTypePointer filter =
> > SpatialObjectToImageFilterType::New();
> > filter->SetInput(segmentation);
> > typename ImageType::SizeType size;
> > size[0] = sizeX;
> > size[1] = sizeY;
> > size[2] = sizeZ;
> > filter->SetSize(size);
> > filter->Update();
> >
> > In the above code, "segmentation" object is an 
> itk::BlobSpatialObject> type pointer and as you can see I am using 
> it on a 3D volume.
> >
> > The problem I am facing is that this is very slow. Even when I 
> have a
> > blob object that defines a segmentation in only one slice and the 
> rest> of the slices are basically blank, still it is quite slow. The
> > Update() call takes about 10 seconds on my machine. I am 
> wondering if
> > there is a way to speed this up with something like preinitializing
> > the Filter with the size? Anyone has any ideas on this?
> >
> > Many thanks,
> >
> > Anja
> > _______________________________________________
> > 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