I am trying to use the STAPLE filter, provided by Simple ITK. I do not understand how to interpret the input in the execute method, documentation is missing. For example:

Execute(const Image &image1) OR Execute(const Image &image1, const Image &image2)

From: https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1STAPLEImageFilter.html

What does const Image mean? What & operation will perform on Image and image1?

Thanks in advance!

1

There are 1 answers

1
Dave Chen On

Const is a C++ keyword meaning that the input parameter will not be modified in the method. The ampersand, '&', means the parameter is being passed to the method by reference. That means the entire input image isn't put on the stack, just a reference (address) to it.

These are performance/implementation issues that you don't really need to worry about. Basically you are passing one or more images to the STAPLE filter for analysis.