[Insight-users] Performance issues for single slices
Simon Warfield
warfield at bwh . harvard . edu
Thu, 19 Jun 2003 12:31:22 -0400
Hi Luis,
Luis Ibanez wrote:
>
> 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.
I don't agree that it is reasonable to have an expectation that a 3D
filter will run poorly on a single slice of a 3D volume.
Often it is valuable to be able to present to a user a single coronal,
sagittal or axial slice, or perhaps all three, and illustrate rapidly a
processing operation on these slices, and then ask the user if it should
be carried out in 3D. For example, this UI strategy is used in our
3Dslicer environment.
I don't see what magic a 2D instantiation of template coded filter can
work that a 3D filter running on a 2D slice could not also do. Why
could the 3D filter not determine it is running on an Xx1xZ data set,
and know the boundary conditions as well as a 2D filter running on an
XxZ data set ?
>
>
> 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_
>>
>>
>
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at www . itk . org
> http://www . itk . org/mailman/listinfo/insight-users
--
Simon K. Warfield, Ph.D. warfield at bwh . harvard . edu Phone:617-732-7090
http://www . spl . harvard . edu/~warfield FAX: 617-582-6033
Assistant Professor of Radiology, Harvard Medical School
Director, Computational Radiology Laboratory
Thorn 329, Dept Radiology, Brigham and Women's Hospital
75 Francis St, Boston, MA, 02115