Documentation  ›  Documentation Library  ›  Spectral Texture Explorer
Spectral Analysis

Spectral Texture Explorer

Spectral Texture Explorer combines spatial texture analysis with hyperspectral imaging.

Overview

Spectral Texture Explorer combines spatial texture analysis with hyperspectral imaging.

Instead of analyzing only pixel intensity or spectral shape, the tool quantifies local spatial patterns at individual wavelengths.

This can reveal structures that have similar spectral intensity but different spatial organization.

The tool uses gray-level co-occurrence matrix (GLCM) based Haralick texture features.

A GLCM describes how frequently combinations of pixel intensities occur at defined spatial relationships.

Texture features are then calculated from that matrix.

Measures local intensity variation or heterogeneity.

Higher values generally indicate stronger differences between neighboring pixel intensities.

Measures local similarity or smoothness.

Higher values indicate that neighboring gray levels are more similar.

Measures disorder or complexity in the local texture distribution.

Higher entropy generally indicates more irregular or complex texture.

Measures uniformity or regularity.

Higher energy generally indicates that the GLCM distribution is concentrated in fewer states.

Measures the linear dependency or structural relationship between neighboring gray levels.

Spatial scale determines the size of the neighborhood used for texture analysis.

Emphasizes small local structures.

Provides a balance between local and regional structures.

Emphasizes larger spatial structures.

Computes Fine, Medium, and Coarse texture maps and combines them into an RGB image.

Colors therefore indicate the spatial scale at which texture is strongest.

The Detail / Speed control changes the number of gray levels used for GLCM calculation.

Higher numbers of gray levels preserve finer intensity information but require more computation.

Texture can depend on spatial orientation.

Computes texture in several directions and averages the results.

This is generally a useful default when texture orientation is not itself the quantity of interest.

Analyzes horizontal pixel relationships.

Analyzes vertical pixel relationships.

Analyzes diagonal relationships.

Directional analysis can be useful for fibers, vessels, aligned materials, or other anisotropic structures.

Use the wavelength slider to select the hyperspectral band used for texture analysis.

Texture may vary strongly with wavelength because different spectral bands emphasize different materials or structures.

Click Preview Texture Map to calculate the selected Haralick feature for the current band.

The right panel displays the resulting spatial texture map.

Changing wavelength while a texture preview is active recalculates the current analysis for the newly selected band.

The left panel displays an RGB reference composite generated from approximately 20%, 50%, and 80% of the spectral range.

This image is primarily provided for anatomical or spatial orientation.

Draw a region of interest on the RGB image using an ellipse, rectangle, freehand, or polygon ROI.

The same spatial region can then be evaluated with several texture-analysis functions.

ROI Spectrum calculates the selected texture feature across every wavelength.

The result is a texture-versus-wavelength curve.

This is conceptually similar to a spectral signature, except the measured quantity is spatial texture rather than mean intensity.

It can reveal wavelengths where the spatial organization of the ROI changes or becomes particularly distinctive.

ROI Similarity calculates the texture feature for the current wavelength and compares every pixel neighborhood with the texture values observed in the ROI.

The current similarity calculation is approximately:

exp( - |Texture - ROI mean| / ROI standard deviation )

Values near 1 indicate texture values similar to the ROI.

Values approaching 0 indicate increasingly different texture.

Best Discriminator automatically compares the available texture features.

For each feature, IDCubePro compares the texture distribution inside the ROI with the texture distribution outside the ROI.

The separation score is based on:

|mean ROI - mean background| The feature and spatial scale producing the greatest separation are displayed.

Interpreting The Discriminator Score

A larger score indicates stronger separation between the selected ROI and the remainder of the image according to that texture feature.

The score is primarily useful for comparing candidate features within the same image.

It should not be interpreted as an absolute biological or diagnostic accuracy metric.

Generate Texture Cube applies the selected texture feature across every spectral band.

The output has the same rows, columns, and number of wavelength channels as the original hyperspectral cube.

Instead of spectral intensity, each voxel represents the selected local texture feature.

This creates a hyperspectral-like texture dataset that can subsequently be used for visualization, clustering, machine learning, segmentation, or other IDCubePro analyses.

Multiscale Rgb And Texture Cube

Multiscale RGB is a visualization mode and does not correspond to one single scalar texture cube.

If texture-cube generation is requested while Multiscale RGB is selected, IDCubePro uses the Medium spatial scale.

When Set texture cube current is enabled, IDCubePro can replace the active image cube with the newly generated texture cube.

A separate confirmation is requested before replacement.

After replacement, the main IDCubePro interface operates on texture values rather than the original hyperspectral intensity cube.

Important

Generating a texture cube does not remove the original data from the stored myData structure unless the current Images field is explicitly replaced.

The generated texture cube is also stored under a named Haralick field in myData.

Useful starting points are Contrast and Entropy.

Contrast is often intuitive for boundaries and heterogeneous structures.

Entropy can be useful for complex or irregular structures.

Homogeneity and Energy emphasize more uniform patterns.

Correlation can be useful for organized structural relationships.

If structures are very small, compare Fine.

If the texture of interest is broad or regional, compare Coarse.

Multiscale RGB is useful for visually determining which spatial scales contribute to different image regions.

Rotation invariant is recommended as the default for general-purpose texture analysis.

Use directional modes when orientation is scientifically important.

Texture analysis is sensitive to both image noise and intensity quantization.

Useful preprocessing may include:

  • Removal of defective pixels
  • Removal of noisy wavelengths
  • Intensity normalization when scientifically appropriate

Excessive spatial smoothing can remove the texture features you are trying to measure.

Texture analysis requires spatial neighborhoods.

Very small ROIs may therefore provide unstable measurements, especially at Coarse spatial scale.

Choose an ROI sufficiently large to contain several local texture neighborhoods.

The Best Discriminator compares the ROI with all pixels outside the ROI.

If the image contains a large irrelevant background region, that region may dominate the comparison.

Consider masking irrelevant background before using the discriminator when appropriate.

1. Load the hyperspectral dataset.

2. Open Spectral Texture Explorer.

3. Begin with Contrast or Entropy.

5. Use Rotation invariant direction.

7. Select a representative wavelength.

8. Click Preview Texture Map.

9. Compare Fine, Medium, Coarse, or Multiscale RGB.

11. Calculate ROI Texture Spectrum.

13. Run Best Texture Discriminator.

14. Compare the recommended feature and scale.

15. Generate a full texture cube if useful for downstream analysis.

Try a larger spatial scale, fewer gray levels, or appropriate image denoising.

Texture Map Looks Too Smooth

Try Fine scale or increase the gray-level detail.

Roi Texture Spectrum Is Unstable

Use a larger ROI or select a more robust spatial scale.

Texture Differences Change With Wavelength

This is expected and is one of the main reasons for combining texture with hyperspectral imaging.

Best Discriminator Selects An Unexpected Feature

The algorithm selects the feature giving the strongest mathematical separation for the selected ROI and background. This may not necessarily correspond to the biologically or physically expected feature.

Multiscale Rgb Colors Are Difficult To Interpret

Remember that red represents Fine, green Medium, and blue Coarse texture after independent robust normalization.

Texture computation is much more computationally demanding than displaying a spectral band. Reduce gray levels, use a single direction, or use Fast mode for exploratory analysis.

Important Interpretation Note

Haralick texture values are mathematical descriptors of spatial intensity relationships.

They do not directly identify a material, tissue type, pathology, molecular species, or biological mechanism.

Texture findings should be interpreted together with spectral information, spatial context, controls, and independent validation.