[Insight-users] Performance issues for single slices
Luis Ibanez
luis . ibanez at kitware . com
Wed, 18 Jun 2003 09:55:13 -0400
Hi Nils,
It is actually surprising that the pipeline
ran at all :-)
When you configure a 3D pipeline and feed it
with a degenerate volume ( a single sliced
volume), you risk to have trouble with any/all
of the filters requiring neighborhood information.
Since these filters look for data in the neighbor
slices (which happen not to exist in your case).
ITK filters based on the neighborhood iterator
will be able to manage the degenerate volume but
at the price of spending most of the computing
time checking for boundary conditions.
It is unlikely that LevelSet filters will be able
to process correctly a degenerate volume. These
filters solve a PDE using finite differences and
should be attempting to look for data in the
(again, unexisting) neighbor slices.
In order to get a reasonable speed in 2D,
and a consistent processing of your data,
you better instantiate a native 2D pipeline.
If you really want to factorize your programming
efforts and have a 2D and a 3D pipeline, the
simple way to go is to create a class holding
your entire pipeline, and template this class
over the image dimension. Then, in your application,
you instantiate this class for both 2D and 3D, and
at load time you switch from one pipeline to another.
Regards,
Luis
----------------------------
Nils Hanssen wrote:
> Hi,
>
> I put together a small application with a level-set pipeline on
> volumetric medical data. The scalar type of the images is float.
> When I run the filters on a volume that consists of one slice only, the
> computation time is increasing significantly. The measured times
> (compiled in release) are:
>
> Volume #1 (256x256x256 voxels):
> Gradient magnitude: 6.6 sec.
>
> Volume #2 (1984x1024x1 voxels):
> Gradient magnitude: 39.9 sec.
>
>
> Should I expect that the computation time is much lower if I use a
> 2-dimensional image for the slice images? The points is that I want to
> keep the application general; that is it should be able to load slices
> and volumetric images transparently.
>
>
> Thanks in advance,
> Nils
>
> -------------------------
> Nils Hanssen
> Surgical Systems Laboratory
> research center c ae sa r
> Ludwig-Erhard-Allee 2
> 53175 Bonn
> fon: +49-228-9656-197
> fax: +49-228-9656-117
> ___http://www . caesar . de/ssl_
>
>