ImageDev

ScaleSpaceLogFilter3d

This filter applies a Laplacian of Gaussian (LoG) filter at different scales, to enhance spherical or ellipsoidal (blob-like) objects.

Access to parameter description

This filter enhances objects that appear bright on a dark background. For each voxel, the maximum LoG response and the scale providing this maximum response are recorded, and presented as two output images. Each LoG filter is normalized for scale-invariance.

The scales are defined by a minimum and maximum standard deviation of the gaussian kernel, and a number of scales. Minimum and maximum standard deviations can be either isotropic, or different for each axis. The corresponding standard deviation for each scale and axis is provided in an output data frame, the scale table. When enabled, the output scale image indicates for each voxel the index of the scale table corresponding to the selected scale.

Reference:
S.V. Fotin, D.F. Yankelevitz, C.I. Henschke, and A.P. Reeves, A multiscale Laplacian of Gaussian (LoG) filtering approach to pulmonary nodule detection from whole-lung CT scans . Proceedings of the SPIE , vol.7260, id.72601Q, Medical Imaging 2009: Computer-Aided Diagnosis, Mar 2009.

See also

Function Syntax

This function returns a ScaleSpaceLogFilter3dOutput structure containing outputImage, scaleTable and outputScaleImage.
// Output structure of the scaleSpaceLogFilter3d function.
struct ScaleSpaceLogFilter3dOutput
{
    /// The output image representing the maximum LoG response among all scale inputs. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float.
    std::shared_ptr< iolink::ImageView > outputImage;
    /// The output image from which each intensity represents the index of the selected scale. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to 8-bit unsigned integer. This image is not generated if selectIndexImage is set to False.
    std::shared_ptr< iolink::ImageView > outputScaleImage;
    /// The output table contains all couples of standard deviation values for X, Y and Z axes used to compute each scale.
    std::shared_ptr< iolink::DataFrameView > scaleTable;
};

// Function prototype
ScaleSpaceLogFilter3dOutput scaleSpaceLogFilter3d( std::shared_ptr< iolink::ImageView > inputImage, const iolink::Vector3d& minimumStandardDeviation, const iolink::Vector3d& maximumStandardDeviation, uint32_t numberOfScales, ScaleSpaceLogFilter3d::Lightness lightness, bool selectIndexImage, std::shared_ptr< iolink::ImageView > outputImage = nullptr, std::shared_ptr< iolink::DataFrameView > scaleTable = nullptr, std::shared_ptr< iolink::ImageView > outputScaleImage = nullptr );
This function returns a tuple containing output_image, scale_table and output_scale_image.
// Function prototype.
scale_space_log_filter_3d(input_image: idt.ImageType,
                          minimum_standard_deviation: Union[Iterable[int], Iterable[float]] = [1, 1, 1],
                          maximum_standard_deviation: Union[Iterable[int], Iterable[float]] = [1, 1, 1],
                          number_of_scales: int = 1,
                          lightness: ScaleSpaceLogFilter3d.Lightness = ScaleSpaceLogFilter3d.Lightness.BRIGHT,
                          select_index_image: bool = False,
                          output_image: idt.ImageType = None,
                          scale_table: Union[iolink.DataFrameView, None] = None,
                          output_scale_image: idt.ImageType = None) -> Tuple[idt.ImageType, Union[iolink.DataFrameView, None], idt.ImageType]
This function returns a ScaleSpaceLogFilter3dOutput structure containing outputImage, scaleTable and outputScaleImage.
/// Output structure of the ScaleSpaceLogFilter3d function.
public struct ScaleSpaceLogFilter3dOutput
{
    /// 
    /// The output image representing the maximum LoG response among all scale inputs. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float.
    /// 
    public IOLink.ImageView outputImage;
    /// 
    /// The output image from which each intensity represents the index of the selected scale. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to 8-bit unsigned integer. This image is not generated if selectIndexImage is set to False.
    /// 
    public IOLink.ImageView outputScaleImage;
    /// 
    /// The output table contains all couples of standard deviation values for X, Y and Z axes used to compute each scale.
    /// 
    public IOLink.DataFrameView scaleTable;
};

// Function prototype.
public static ScaleSpaceLogFilter3dOutput
ScaleSpaceLogFilter3d( IOLink.ImageView inputImage,
                       double[] minimumStandardDeviation = null,
                       double[] maximumStandardDeviation = null,
                       UInt32 numberOfScales = 1,
                       ScaleSpaceLogFilter3d.Lightness lightness = ImageDev.ScaleSpaceLogFilter3d.Lightness.BRIGHT,
                       bool selectIndexImage = false,
                       IOLink.ImageView outputImage = null,
                       IOLink.DataFrameView scaleTable = null,
                       IOLink.ImageView outputScaleImage = null );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input grayscale image. The image type can be integer or floating point. Image Grayscale nullptr
input
minimumStandardDeviation
The Minimum standard deviation for X, Y and Z axes, in pixels. Vector3d Any value {1.f, 1.f, 1.f}
input
maximumStandardDeviation
The Maximum standard deviation for X, Y and Z axes, in pixels. Vector3d Any value {1.f, 1.f, 1.f}
input
numberOfScales
The number of scales used for computing Laplacian of Gaussian filters. UInt32 [1, 255] 1
input
lightness
The lightness type of object to detect.
BRIGHT Bright objects are extracted from a dark background.
DARK Dark objects are extracted from a bright background.
Enumeration BRIGHT
input
selectIndexImage
The index image is generated only if set to true. Bool false
output
outputImage
The output image representing the maximum LoG response among all scale inputs. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float. Image nullptr
output
scaleTable
The output table contains all couples of standard deviation values for X, Y and Z axes used to compute each scale. DataFrameView nullptr
output
outputScaleImage
The output image from which each intensity represents the index of the selected scale. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to 8-bit unsigned integer. This image is not generated if selectIndexImage is set to False. Image nullptr
Parameter Name Description Type Supported Values Default Value
input
input_image
The input grayscale image. The image type can be integer or floating point. image Grayscale None
input
minimum_standard_deviation
The Minimum standard deviation for X, Y and Z axes, in pixels. vector3d Any value [1, 1, 1]
input
maximum_standard_deviation
The Maximum standard deviation for X, Y and Z axes, in pixels. vector3d Any value [1, 1, 1]
input
number_of_scales
The number of scales used for computing Laplacian of Gaussian filters. uint32 [1, 255] 1
input
lightness
The lightness type of object to detect.
BRIGHT Bright objects are extracted from a dark background.
DARK Dark objects are extracted from a bright background.
enumeration BRIGHT
input
select_index_image
The index image is generated only if set to true. bool False
output
output_image
The output image representing the maximum LoG response among all scale inputs. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float. image None
output
scale_table
The output table contains all couples of standard deviation values for X, Y and Z axes used to compute each scale. data_frame_view None
output
output_scale_image
The output image from which each intensity represents the index of the selected scale. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to 8-bit unsigned integer. This image is not generated if selectIndexImage is set to False. image None
Parameter Name Description Type Supported Values Default Value
input
inputImage
The input grayscale image. The image type can be integer or floating point. Image Grayscale null
input
minimumStandardDeviation
The Minimum standard deviation for X, Y and Z axes, in pixels. Vector3d Any value {1f, 1f, 1f}
input
maximumStandardDeviation
The Maximum standard deviation for X, Y and Z axes, in pixels. Vector3d Any value {1f, 1f, 1f}
input
numberOfScales
The number of scales used for computing Laplacian of Gaussian filters. UInt32 [1, 255] 1
input
lightness
The lightness type of object to detect.
BRIGHT Bright objects are extracted from a dark background.
DARK Dark objects are extracted from a bright background.
Enumeration BRIGHT
input
selectIndexImage
The index image is generated only if set to true. Bool false
output
outputImage
The output image representing the maximum LoG response among all scale inputs. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float. Image null
output
scaleTable
The output table contains all couples of standard deviation values for X, Y and Z axes used to compute each scale. DataFrameView null
output
outputScaleImage
The output image from which each intensity represents the index of the selected scale. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to 8-bit unsigned integer. This image is not generated if selectIndexImage is set to False. Image null

Object Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

ScaleSpaceLogFilter3d scaleSpaceLogFilter3dAlgo;
scaleSpaceLogFilter3dAlgo.setInputImage( foam );
scaleSpaceLogFilter3dAlgo.setMinimumStandardDeviation( {1.0, 1.0, 1.0} );
scaleSpaceLogFilter3dAlgo.setMaximumStandardDeviation( {3.0, 3.0, 3.0} );
scaleSpaceLogFilter3dAlgo.setNumberOfScales( 1 );
scaleSpaceLogFilter3dAlgo.setLightness( ScaleSpaceLogFilter3d::Lightness::BRIGHT );
scaleSpaceLogFilter3dAlgo.setSelectIndexImage( true );
scaleSpaceLogFilter3dAlgo.execute();

std::cout << "outputImage:" << scaleSpaceLogFilter3dAlgo.outputImage()->toString();
std::cout << "scaleTable:" << scaleSpaceLogFilter3dAlgo.scaleTable()->shape();
std::cout << "outputScaleImage:" << scaleSpaceLogFilter3dAlgo.outputScaleImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

scale_space_log_filter_3d_algo = imagedev.ScaleSpaceLogFilter3d()
scale_space_log_filter_3d_algo.input_image = foam
scale_space_log_filter_3d_algo.minimum_standard_deviation = [1.0, 1.0, 1.0]
scale_space_log_filter_3d_algo.maximum_standard_deviation = [3.0, 3.0, 3.0]
scale_space_log_filter_3d_algo.number_of_scales = 1
scale_space_log_filter_3d_algo.lightness = imagedev.ScaleSpaceLogFilter3d.BRIGHT
scale_space_log_filter_3d_algo.select_index_image = True
scale_space_log_filter_3d_algo.execute()

print("output_image:", str(scale_space_log_filter_3d_algo.output_image))
print("scale_table:", str(scale_space_log_filter_3d_algo.scale_table))
print("output_scale_image:", str(scale_space_log_filter_3d_algo.output_scale_image))
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

ScaleSpaceLogFilter3d scaleSpaceLogFilter3dAlgo = new ScaleSpaceLogFilter3d
{
    inputImage = foam,
    minimumStandardDeviation = new double[]{1.0, 1.0, 1.0},
    maximumStandardDeviation = new double[]{3.0, 3.0, 3.0},
    numberOfScales = 1,
    lightness = ScaleSpaceLogFilter3d.Lightness.BRIGHT,
    selectIndexImage = true
};
scaleSpaceLogFilter3dAlgo.Execute();

Console.WriteLine( "outputImage:" + scaleSpaceLogFilter3dAlgo.outputImage.ToString() );
Console.WriteLine( "scaleTable:" + scaleSpaceLogFilter3dAlgo.scaleTable.ToString() );
Console.WriteLine( "outputScaleImage:" + scaleSpaceLogFilter3dAlgo.outputScaleImage.ToString() );

Function Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

auto result = scaleSpaceLogFilter3d( foam, {1.0, 1.0, 1.0}, {3.0, 3.0, 3.0}, 1, ScaleSpaceLogFilter3d::Lightness::BRIGHT, true );

std::cout << "outputImage:" << result.outputImage->toString();
std::cout << "scaleTable:" << result.scaleTable->shape();
std::cout << "outputScaleImage:" << result.outputScaleImage->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

result_output_image, result_scale_table, result_output_scale_image = imagedev.scale_space_log_filter_3d(foam, [1.0, 1.0, 1.0], [3.0, 3.0, 3.0], 1, imagedev.ScaleSpaceLogFilter3d.BRIGHT, True)

print("output_image:", str(result_output_image))
print("scale_table:", str(result_scale_table))
print("output_scale_image:", str(result_output_scale_image))
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

Processing.ScaleSpaceLogFilter3dOutput result = Processing.ScaleSpaceLogFilter3d( foam, new double[]{1.0, 1.0, 1.0}, new double[]{3.0, 3.0, 3.0}, 1, ScaleSpaceLogFilter3d.Lightness.BRIGHT, true );

Console.WriteLine( "outputImage:" + result.outputImage.ToString() );
Console.WriteLine( "scaleTable:" + result.scaleTable.ToString() );
Console.WriteLine( "outputScaleImage:" + result.outputScaleImage.ToString() );





© 2025 Thermo Fisher Scientific Inc. All rights reserved.