|
|
|
|
|
|
This function is used to prepare spectral data for hierarchical cluster analysis (HCA) imaging. The HCA imaging routine itself is extensively
described in the chapter HCA imaging ('Multivariate Imaging' menu bar).
The window for data preparation is the same as for other multivariate imaging approaches, such as PCA, KMC or FCM imaging. To start HCA
imaging you can either prepare the data from spectral multi file (described here), or load results of a HCA carried out before (see chapter
HCA imaging ).
Reformatting data sets for HCA imaging: The following data manipulations are performed to prepare data sets for HCA:
- regions from the selected spectra are selected (data block of your choice),
- spectra are scanned for negative quality test results, or unselected regions of interest, and eliminated.
In the HCA window, select the number of spectral regions (min: 1; max: 4) and choose the data source block by selecting the appropriate
radio button (e.g. of the derivative data block). Then, indicate the wavenumber limits of the spectral regions. These regions may NOT
overlap, otherwise an error message will be given. Press 'goto HCA' or 'cancel' by pressing the appropriate button.
Important: Spectra with a negative Quality Test result,
or unselected Regions of Interest are automatically excluded from HCA imaging.
Once data preparation has been finished, the HCA imaging dialog box will appear:
HCA imaging
|
Hierarchical Cluster Analysis (HCA): This imaging function performs hierarchical cluster analysis of hyperspectral data and can be used
to display the results as HCA images and dendrograms. Spectra with negative
Quality Test results, or unselected Regions of Interest are excluded from the
analysis and appear in HCA images as black pixels. For each spectral class, or cluster, average spectra and standard deviation spectra are
calculated which can be stored in an ASCII data format. Furthermore, it is also possible to store, or load, distance data and the results of
hierarchical clustering.
The HCA Method:
- First, a distance matrix is calculated which contains information on the similarity of spectra. This matrix is symmetric and of
size n × n, where n is the number of spectra. One can choose between five different options to obtain
inter-spectral distances.
- Next, the two most similar spectra, that are spectra with the smallest inter-spectral distance, are determined.
- These spectra are combined to form a new object (cluster).
- The spectral distances between all remaining spectra and the new object have to be re-calculated. CytoSpec offers seven different
cluster methods.
- A new search for the two most similar objects (spectra or clusters) is initiated. These objects are merged and again, the distance
values for the newly formed cluster are determined.
- This procedure is performed n-1 times until only one cluster remains.
How to start cluster imaging?
The HCA imaging function can be either started from the 'Multivariate Imaging → HCA imaging → create HCA maps from
spectra' menu or from the menu bar 'Multivariate Imaging → HCA imaging → load HCA data'. In the latter case
one have to load the distance matrix file (extension: *.dis) or the cluster file (extension: *.cls) obtained in earlier program
sessions. For details please refer to the chapter Multivariate
Imaging → HCA imaging → create HCA maps from spectra .
Chapters, describing options of the HCA imaging function:
Part I - the distance matrix: obtaining inter-spectral distances
for clustering
Part II - hierarchical clustering.
Part III - HCA imaging: reassembling HCA images, obtaining mean
cluster spectra.
Part IV - an example of HCA imaging.
Part I - Distance Matrix |
 |
Given n objects, a distance or dissimilarity matrix, is a symmetric matrix with zero diagonal elements such that the ij-th
element represents how far apart or how dissimilar the i-th and j-th objects are.
calc: starts the calculation of the distance matrix.
load: load distance matrix files (file extensions is '*.dis').
save: save the distance matrix.
use shortcut: if this option is chosen, the calculation of the distance matrix AND hierarchical clustering are
queued that is no further user input will be required. Please select a distance AND a cluster method, even if the distance
matrix has not been obtained, before pressing the 'calc' button. Note also that the distance matrix cannot be stored
when this option was selected.
reduced HCA: This HCA imaging option is particularly useful when large datasets are analyzed. It is recommended to
choose this option for data files containing more than 128 × 128 spectra. In reduced HCA, the calculation of the distance
matrix and hierarchical clustering are carried out on the basis of randomly selected spectra. When finished, mean cluster
spectra of the last 50 clusters are obtained. Then, n × 50 distance values between all spectra
and mean cluster spectra are obtained (n is the number of pixel spectra in the data set). Cluster memberships are then
assigned on the basis of these distance values. Please note, that 'reduced HCA' is available only for the distance
option 'D-values'.
distance method: pop up menu which allows to select one of the following methods for distance matrix calculation.
1. D-Values |


|
2. Euclidean distances |
|
3. Normalized Euclidean distances |
|
4. Euclidean squared distances |
|
5. City block. |
|
Part II - Hierarchical clustering |
 |
calc: starts hierarchical clustering.
load: load cluster analysis files. The file extension is '*.cls'.
save: save cluster analysis results.
cluster method: here you can select a method for clustering:
1. Average linkage |

|
2. Single linkage |
|
3. Complete linkage |
|
4. Group average |
|
5. Centroid method. |
|
6. Median algorithm |
|
7. Ward's algorithm |
|
Part III - HCA imaging |
 |
number of clusters: allows selection of the number of clusters used for HCA imaging. Minimum is 2, maximum: 50.
image: displays the cluster image. The number of classes (clusters) are color encoded. The color sequence is determined
by the active color map, usually the color map 'ann' (see function
Display Spectra).
dendro: A dendrogram is shown on the display. The dendrogram can be stored as bitmap ('*.bmp') or as an encapsulated
postscript ('*.eps') data file. Both functions are available by a activating the context menu of the dendrogram window. Note
that dendrograms will show only the last 500 fusion steps.
spectra: this function produces and displays average spectra of each class. After clicking on the 'spectra'
button, a dialog box for choosing the source data block comes up (see screenshot below). This data block is then used for averaging
and the creation of the respective standard deviation spectra.
save all spectra: all spectra used for HCA imaging are stored as double column ASCII data. Use the standard windows dialog box
to set the path and create the ASCII data files. File names: corenamex_i: x-th spectrum of the i-th cluster.
disp averages: average spectra of the selected data block are calculated and plotted in the same color like in the
cluster false color image.
save averages: average and standard deviation spectra of the selected data block are calculated. To store these spectra
(double column ASCII) use the standard windows dialog box to set the path and chose a file name. Average spectra and standard
deviation spectra of the i-th cluster are stored per default in separate files (corename_i - for average spectra and
core name_std_i for the standard deviation spectra).
Part IV - Example of HCA imaging:
This example shows the results of HCA imaging (5 classes). Spectral data were acquired by the use of a 64 × 64 mid-infrared MCT focal
plane array detector. For HCA imaging, Ward's algorithm was used. Spectral distances were computed as D-values. The panel to the left
displays Min-Max Normalized average spectra, which were encoded
by the same color utilized for displaying the cluster in the HCA image (HCA was carried out on the basis of the file 'colon.cyt'.
which can be found in the /testdata/bin/CytoSpec/ directory).
Reference to the literature:
Lasch P, Hänsch W, Naumann D, Diem M. Imaging of
colorectal adenocarcinoma using FT-IR microspectroscopy and cluster analysis. Biochim Biophys Acta. 2004 1688(2):176-86.
Lasch P, Diem M, Hänsch W & Naumann D. Artificial
neural networks as supervised techniques for FT-IR microspectroscopic imaging. Journal of Chemometrics 2007 Vol. 20(5):
209-220.
|
Principles of k-means clustering: The algorithm of k-means clustering has been suggested by J.B. MacQueen in 1967:
J.B. MacQueen. In L.M. LeCam and J. Neymann (eds) Proceedings of Fifth Berkeley Symposium on Mathematical
Statistics and Probability. 1967 281-297.
Related web links (Wikipedia):
k-means clustering
k-means algorithm
In the CytoSpec implementation, MacQueens k-means cluster algorithm is used. k-means clustering is a non hierarchical clustering
method, which obtains a "hard" (crisp) class membership for each spectrum, that is the class membership of an individual spectrum
can be taken only the values of zero or one. It uses an iterative algorithm to update randomly selected initial cluster centers, and
to obtain the class membership for each spectrum, assuming well-defined boundaries between the clusters. MacQueens iterative algorithm
of KMC can be described as follows: Spectra are illustrated as points in a p-dimensional space (p is the number of features of the
spectra. In this space a number of k points is initially chosen, where each point represents a cluster to be made. Then, distance
values between the points and all objects (spectra) are calculated. Objects are assigned to a cluster on the basis of a minimal distance
value. Next, centroids of the clusters are calculated and distance values between the centroids and each of the objects are re-calculated.
Then, if the closest centroid is not associated with the cluster to which the object currently belongs, the object will switch its cluster
membership to the cluster with the closest centroid. The centroid's positions are re-calculated every time a component has changed the
cluster membership. This continues until none of the objects has been re-assigned.
When the function 'KMC imaging' was selected from the 'Multivariate imaging' menu bar the following window comes up:
The window for data preparation is the same as for other multivariate imaging approaches, such as HCA, PCA, or FCM imaging. Before KMC
imaging can be started you have to prepare the data from a spectral multi file.
Reformatting data sets for KMC imaging: The following data manipulations are performed to prepare data sets for KMC:
- regions from the selected spectra are selected (data block of your choice),
- spectra are scanned for negative quality test results, or unselected regions of interest, and eliminated.
In the KMC window, select the number of spectral regions (min: 1; max: 4) and choose the data source block by selecting the appropriate
radio button (e.g. of the derivative data block). Then, indicate the wavenumber limits of the spectral regions. These regions may NOT
overlap, otherwise an error message will be given. Press 'goto KMC' or 'cancel' by pressing the appropriate button.
Important: Spectra with a negative Quality Test result,
or unselected Regions of Interest are automatically excluded from KMC
imaging.
Once data preparation has been finished, the following KMC imaging dialog box will appear:
How to start KMC imaging? Once data preparation has been finished, the KMC imaging dialog box appears. Indicate how many
classes are assumed to be present in the data set ('choose number of cluster') and the enter the 'number of training cycles'
(default: 20). Furthermore it is required to select an 'initial learning rate' (default 0.5) and a method to obtain interspectral
distances. KMC imaging can be carried out using the following distance methods: Euclidean, standardized Euclidean, D-values (normalized
Pearsons's correlation coefficients), and PCA. PCA means Euclidean distances in PCA space (first 12 principal components). KMC is usually
done by a random initialization of the centroids. Please uncheck the checkbox 'random initialization' if you don't want this.
To start the KMC imaging function hit the 'image' button, to exit press 'cancel'. When the calculation is finished the
cluster map will be immediately plotted in the axis of the preprocessed maps using the colormap 'ann'.
Button 'spectra': This option becomes available when the k-means clustering calculations are finished. When this button is
pressed, a new window comes up that offers additional options such as the calculation of cluster mean spectra or sorting individual map
spectra by its cluster membership.
save all spectra: all spectra used for KMC imaging are stored as double column ASCII data. Use the standard windows dialog box
to set the path and create the ASCII data files. File names: corenamex_i: x-th spectrum of the i-th cluster.
disp averages: average spectra of the selected data block are calculated and plotted in the same color like in the cluster map.
save averages: average and standard deviation spectra of the selected data block are calculated. To store these spectra
(double column ASCII) use the standard windows dialog box to set the path and chose a file name. Average spectra and standard deviation
spectra of the i-th cluster are stored per default in separate files (corename_i - for average spectra and corename_std_i
for the standard deviation spectra).
Reference to the literature:
Lasch P, Hänsch W, Naumann D, Diem M.
Imaging of colorectal adenocarcinoma using FT-IR microspectroscopy and cluster analysis. Biochim Biophys Acta. 2004
1688(2):176-86.
|
Related web links:
Principles of fuzzy C-means clustering: Principles of FCM clustering are given in the following publication:
J.C. Bezdek. Pattern Recognition with Fuzzy Objective Function Algorithms, 1981 New York. Plenum Press.
FCM clustering is a non hierarchical clustering method. This clustering technique partitions objects into groups (cluster) whose members show a certain degree of similarity. Unlike k-means clustering, the output of FCM clustering is a membership function, which defines the degree of membership of a given spectrum to the clusters. The values of the membership function can vary between one (highest degree of cluster membership) and zero (no class membership), where the sum of the C cluster membership values for one object equals one.
Thus, this method departs from the classical two-valued (0 or 1) logic, and uses "soft" linguistic system variables and a continuous range of true values in the interval [0,1]. FCM imaging uses a fuzzy iterative algorithm to calculate the class membership grade for each spectrum. The iterations in FCM clustering are based on minimizing an objective function, which represents the distance from any given data point (spectrum) to the actual cluster center weighted by that data points membership grade.
The advantage of the fuzzy C-means clustering over k-means clustering is that both outliers and data, which display properties of more than one class can be characterized by assigning nonzero class membership values to several clusters. In the similarity maps assembled by FCM clustering the membership values are encoded by the colormap, that is by the color intensities in the case of single color colormaps.
When the function 'FCM imaging' was selected from the 'Multivariate imaging' menu bar the following window comes up:
The window for data preparation is the same as for other multivariate imaging approaches, such as HCA, PCA, VCA, or KMC imaging. Before FCM imaging can be started you have to prepare the data from a spectral multi file.
Reformatting data sets for FCM imaging: The following data manipulations are performed to prepare data sets for FCM:
- regions from the selected spectra are selected (data block of your choice),
- spectra are scanned for negative quality test results, or unselected regions of interest, and eliminated.
In the FCM window, select the number of spectral regions (min: 1; max: 4) and choose the data source block by selecting the appropriate radio button (e.g. of the derivative data block). Then, indicate the wavenumber limits of the spectral regions. These regions may NOT overlap, otherwise an error message will be given. Press 'goto FCM' or 'cancel' by pressing the appropriate button.
Important: Spectra with a negative Quality Test result, or unselected Regions of Interest are automatically excluded from FCM imaging.
Once data preparation has been finished, the following FCM imaging dialog box will appear:
How to start FCM imaging? Once data preparation has been finished, the FCM imaging dialog box appears. Indicate how many classes are assumed to be present in the data set ('number of clusters') and give an exit criterion ('stop criterion', default: 0.0005). Furthermore it is required to select a method to obtain interspectral distances. FCM imaging can be carried out using the following distance methods: Euclidean, standardized Euclidean, D-values (normalized Pearsons's correlation coefficients), and PCA. PCA means Euclidean distances in PCA space (first 12 principal components). FCM is usually done by a random initialization of the cluster centers. Please uncheck the checkbox 'random initialization' if you don't want this.
To start the FCM imaging function hit the 'FCM' button, to exit press 'cancel'. When the calculation is finished select a cluster that should be used to reassemble the image ('display which cluster'). The single cluster image is plotted in the axis of the preprocessed maps using the colormap 'black'. A composite image can be created in a separate window by pressing the button 'composite image'.
Button 'spectra': This option becomes available when the fuzzy C-means clustering calculations are finished. When this button is pressed, a new window comes up that offers additional options such as the calculation of cluster mean spectra or sorting individual map spectra by its cluster membership. By pressing any of the buttons (except button 'done') a new FCM imaging approach is initiated by using the settings of the FCM imaging dialog box.
save all spectra: all spectra used for FCM imaging are stored as double column ASCII data. Use the standard windows dialog box to set the path and create the ASCII data files. File names: corenamex_i: x-th spectrum of the i-th cluster.
disp averages: average spectra of the selected data block are calculated and plotted.
save averages: average and standard deviation spectra of the selected data block are calculated. To store these spectra (double column ASCII) use the standard windows dialog box to set the path and chose a file name. Average spectra and standard deviation spectra of the i-th cluster are stored per default in separate files (corename_i - for average spectra and corename_std_i for the standard deviation spectra).
Reference to the literature:
|
This function is used to prepare spectral data for principal component analysis (PCA) imaging. The PCA imaging routine itself is extensively
described in the chapter PCA imaging ('Multivariate Imaging' menu bar).
The window for data preparation is the same as for other multivariate imaging approaches, such as HCA, KMC or FCM imaging. To start PCA i
maging you can either prepare the data from spectral multi file (described here), or load results of a PCA carried out before (see chapter
PCA imaging ).
Reformatting data sets for PCA imaging: The following data manipulations are performed to prepare data sets for PCA:
- regions from the selected spectra are selected (data block of your choice),
- spectra are scanned for negative quality test results, or unselected regions of interest, and eliminated.
In the PCA window, select the number of spectral regions (min: 1; max: 4) and choose the data source block by selecting the appropriate
radio button (e.g. of the derivative data block). Then, indicate the wavenumber limits of the spectral regions. These regions may NOT
overlap, otherwise an error message will be given. Press 'goto PCA' or 'cancel' by pressing the appropriate button.
Important: Spectra with a negative Quality Test result,
or unselected Regions of Interest are automatically excluded from PCA imaging.
Once data preparation has been finished, the PCA imaging dialog box will appear:
PCA imaging
|
Principles of PCA: PCA is a linear transformation in which the (spectral) data are transferred into a new coordinate system. In
this new coordinate system, the largest data variance points to the direction of the first coordinate, which is also called the first
principal component (pc), the second largest variance on the second pc, and so forth. PCA can be thus considered a transformation that
re-arranges the data according to the data's intrinsic variance: most of the variance is contained in the lower-order principal components
while higher-order pc's are supposed to contain mainly noise. Reduction of dimensionality by PCA can be effectively achieved by omitting
higher-order principal components.
Related web links (Wikipedia):
Principal Component Analysis
How to start PCA imaging: One can start the PCA imaging function either from the 'Multivariate Imaging → PCA imaging →
create PCA maps from spectra' menu or from the menu bar'Multivariate Statistics → PCA imaging → load PCA data'. In
the latter case one have to load a PCA file (*.pca) obtained in earlier program sessions. Please refer to the chapter
Multivariate Statistics → PCA imaging → create PCA maps from spectra
if you want to produce PCA images directly from a hyperspectral data set.
Define the number of dimensions: to specify which PCs should be used for imaging, check the appropriate checkboxes of the column
'use value'. In the example above the principal components one and two are activated. The CytoSpec program permits the use of the
first 10 principal components.
Definition of individual score coefficients: first, select the principal components to be displayed from the popup menus in the upper
part of the PCA imaging window (PC x- or y-axis). Then, click into the score plot window to the right. The respective coordinates of this
action are transferred to the edit fields indicated as 1st to 10th score. Alternatively, it is possible to manually type the respective
coordinates into these boxes.
Normalization of the score coefficients: checking the checkbox 'normalize scores' causes normalization of distances between score
coefficients and 'mass centers' such that the maximum distance for all principal components equals one.
save PCs: if this option is chosen, the first 10 principal components are stored (see description of the button 'save' below
for details).
What does 'fix value' mean? This option permits to fix the coordinates of a given mass center in the n-th dimension, irrespective
of mouse manipulations in the plot to the right. This option may be useful when searching for an optimal contrast of a PCA image.
What happens if one of the buttons 'plot' is pressed? In this case all scores coordinate centers are set to zero and a PCA
image using the i-th score coefficients is produced (i.e. the i-th score coefficients are linearily converted into color scales).
imaging: using the actual coordinates of the mass centers, PCA images are plotted into the lower right panel of the main window.
load: opens a standard window for opening files of the format *.pca.
save: allows to save score coefficients and principal components. File extension will be *.pca. If the checkbox 'save PC's'
was checked, the first 10 principal components are stored as separate double column ASCII files. These files are stored in the same
directory as the *.pca-file.
cancel: closes the PCA imaging window. Data not stored are lost.
Note that spectra with negative Quality Test results, or
unselected Regions of Interest are excluded from the analysis and appear
in PCA images as black pixels.
Reference to the literature:
Lasch, P. & Naumann, D. FT-IR Microspectroscopic Imaging of
Human Carcinoma Thin Sections Based on Pattern Recognition Techniques. Cellular and Molecular Biology 1998 44(1). pp.
189-202
|
Principles of VCA: VCA (vertex component analysis) is an unsupervised method to rapidly unmix hyperspectral data. The algorithm
was initially developed by J. Nascimento and J. Dias. The idea of VCA can be summarized as follows: Given a set of mixed spectral
(multispectral or hyperspectral) vectors, linear spectral mixture analysis, or linear unmixing, aims at estimating the number of reference
substances, also called endmembers, their spectral signatures, and their abundance fractions. Unsupervised endmember extraction by VCA
exploits the following facts: the endmembers are the vertices of a simplex and the affine transformation of a simplex is also a simplex.
Furthermore, VCA assumes the presence of pure pixels in the data. The algorithm iteratively projects data onto a direction orthogonal to
the subspace spanned by the endmembers already determined. The new endmember signature corresponds to the extreme of the projection. The
algorithm iterates until all endmembers are found.
Related links
J. Nascimento and J. Dias, "Vertex Component
Analysis: A fast algorithm to unmix hyperspectral data", IEEE Transactions on Geoscience and Remote Sensing 2005 vol. 43,
no. 4, pp. 898-910
Unsupervised unmixing of hyperspectral imagery using the constrained positive matrix factorization by Yahya M.
Masalmah. July 2007. Dissertation, University of Puerto Rico. Chair: Miguel Velez-Reyes, Major Department: Computing and Information
Science and Engineering
To start VCA imaging one have to prepare the spectral data. In order to do so please select 'VCA imaging' from the 'Multivariate
imaging' menu bar.
The window for data preparation is the same as for other multivariate imaging approaches, such as HCA, KMC or FCM imaging.
Reformatting data sets for VCA imaging: The following data manipulations are performed to prepare data sets for VCA:
- regions from the selected spectra are selected (data block of your choice),
- spectra are scanned for negative quality test results, or unselected regions of interest, and eliminated.
In the VCA window, select the number of spectral regions (min: 1; max: 4) and choose the data source block by selecting the appropriate radio
button (e.g. of the derivative data block). Then, indicate the wavenumber limits of the spectral regions. These regions may NOT overlap,
otherwise an error message will be given. Press 'goto VCA' or 'cancel' by pressing the appropriate button.
Important: Spectra with a negative Quality Test result, or
unselected Regions of Interest are automatically excluded from VCA imaging.
Once data preparation has been finished, the following VCA imaging dialog box will appear:
|
signal-to-noise ratio: an exit criterion
standardized Euclidean distances: this checkbox permits to choose whether VCA is carried out in Euclidean or normalized Euclidean space
random initialization: permits to switch on, or off random initialization. Useful for testing purposes, only
number of endmembers: please indicate the number of endmembers
plot endmembers: spectral signatures of the endmembers are plotted into the spectral window of the main gui
store endmembers: allows to store endmember spectra as double column ASCII data
display which endmember: choose a endmember which abundance fraction is used for VCA imaging.
composite image: plots a composite image using abundance fractions of all endmembers
VCA: starts the VCA routine
cancel: press cancel to exit. Data not stored are lost
|
Example of an application of VCA imaging in vibrational spectroscopic imaging:
Chernenko T, Matthäus C, Milane L, Quintero L, Amiji M,
Diem M. Label-free Raman spectral imaging of intracellular delivery and degradation of polymeric nanoparticle systems. ACS Nano. 2009.
3(11):3552-9.
|
Theory - related links
M. E. Winter, M. R. Descour, and
S. S. Shen. N-FINDR: an algorithm for fast autonomous spectral end-member determination in hyperspectral data. volume 3753, pages 266-275,
Denver, CO, USA, October 1999. SPIE.
Winter, Michael E., "Fast Autonomous Spectral End-member Determination In Hyperspectral Data", Proceedings of the Thirteenth International
Conference on Applied Geologic Remote Sensing, Vol. II, pp 337-344, Vancouver, B.C., Canada, 1999.
To start n-findr imaging one have to prepare the spectral data. In order to do so please select 'n-findr imaging' from the 'Multivariate
imaging' menu bar.
The window for data preparation is the same as for other multivariate imaging approaches, such as HCA, KMC or VCA imaging.
Reformatting data sets for n-findr imaging: The following data manipulations are performed to prepare data sets for n-findr endmember
extraction:
- regions from the selected spectra are selected (data block of your choice),
- spectra are scanned for negative quality test results, or unselected regions of interest, and eliminated.
In the n-findr window, select the number of spectral regions (min: 1; max: 4) and choose the data source block by selecting the appropriate
radio button (e.g. of the derivative data block). Then, indicate the wavenumber limits of the spectral regions. These regions may NOT overlap,
otherwise an error message will be given. Press 'goto -n-findr' or 'cancel' by pressing the appropriate button.
Important: Spectra with a negative Quality Test result, or
unselected Regions of Interest are automatically excluded from n-findr endmember
extraction imaging.<
Once data preparation has been finished, the following n-findr imaging dialog box will appear:
|
max number of iterations: the exit criterion of the n-findr endmember extraction method.
standardized Euclidean distances: inactive
number of endmembers: please indicate the number of spectral endmembers
plot endmembers: spectral signatures of the endmembers are plotted into the spectral window of the main gui
store endmembers: allows to store endmember spectra as double collumn ASCII data
display which endmember: choose a endmember which abundance fraction is used for n-findr imaging.
composite image: plots a composite image using abundance fractions of all endmembers
n-findr: starts the n-findr routine
cancel: press cancel to exit. Data not stored are lost
|
Application of n-findr imaging in vibrational hyperspectral imaging:
Lau K, Hedegaard MA, Kloepper JE, Paus R, Wood BR, Deckert V.
Visualization and characterisation of defined hair follicle compartments by Fourier transform infrared (FTIR) imaging without labelling.
J Dermatol Sci. 2011 63(3):191-8.
Bergner N, Krafft C, Geiger KD, Kirsch M, Schackert G,
Popp J. Unsupervised unmixing of Raman microspectroscopic images for morphochemical analysis of non-dried brain tumor specimens. Anal Bioanal
Chem. 2012 403(3):719-25.
|
This function of the CytoSpec program is designed to re-assemble hyperspectral images on the basis of classification results of artificial
neural networks (ANN) classifiers. In this function, result files (*.res) of the Stuttgart Neural Network Simulator (SNNS) are analyzed
and directly converted into false-colored ANN maps. Furthermore, checks for activation thresholds and multiple activations can be carried out.
The Network Simulator was developed at the "Institut für Parallele und Verteilte Höchstleistungsrechner" (IPRV) of the
Universität Stuttgart (Germany). The SNNS can downloaded for free at
ftp://ftp.informatik.uni-stuttgart.de.
A tutorial of how to use the CytoSpec-SNNS interface is given here
|
xdim in ANN map: the number of measurement points in x-direction.
ydim in ANN map: the number of measurement points in y-direction.
threshold for activations: threshold which defines the minimal allowed output activation. Activations below this threshold are
set to zero and the black color is assigned to the corresponding pixel. If you want to omit this test then you can set this threshold
to 0.
threshold for multiple activations: threshold which defines the maximum allowed activation of the second-highest activated neuron.
If a spectrum meets this criterion, it is tested as negative and again the black color is assigned to corresponding pixel. One can omit
this test by setting the threshold to 1.
image: opens the standard windows file browser. Please select a path and a valid SNNS result file.
cancel: aborts the ANN imaging function
|
IMPORTANT: Please check carefully the sequence of the input patterns (spectra) when compiling the SNNS pattern file. Note that only the
pattern sequence will define the spatial (x,y) positions of individual spectra. Select the option 'include output patterns' and unselect the
option 'include input patterns' when saving '*.res' files (see screenshot of the 'result file format' window below).
Please check also the format of the SNNS result files. The *.res file should have the following format:
SNNS result file V1.4-3D
generated at Tue Mar 25 11:24:47 1997
No. of patterns : 980
No. of input units : 76
No. of output units: 4
startpattern : 1
endpattern : 980
teaching output included
#1.1
1 0 0 0
0.06227 0.82028 0.01888 0.00005
#2.1
1 0 0 0
0.97587 0.35621 0.00001 0.00089
#3.1
1 0 0 0
0.99435 0.28643 0.00001 0.00046 .....
#979.1
1 0 0 0
0 0.05502 0.98514 0.21558
#980.1
1 0 0 0
0 0.14128 0.81746 0.61632
In the example given above, 980 spectra obtained from a rectangular area (20 × 19 spectra) were analyzed. The number of pre-defined
classes in the teaching phase of ANN model development equaled 4.
The first line of the first pattern (#1.1) shows the a priori class assignment (target pattern), while the second line displays the ANN
test results for this particular spectrum. The maximum activation was found for the second output neuron (0.82028), indicating a posteriori
class assignment of this individual spectrum to class # two. CytoSpec automatically analyzes the posteriori assignments for all spectral
sub-pattern contained in the *.res file and assigns specific colors to each class. Images are produced by combining colors with spatial
(pixel) positions of the spectra assuming rectangular regions and equal distances between pixels in x- and y-direction, respectively.
The following types of ANNs were tested to be compatible:
- multilayer perceptron (MLP) networks consisting of three layers of neurons (input layer, hidden layer, output layer)
- ANNs with feed-forward propagation of activations, shortcut connections are allowed
- teaching functions: backpropagation, resilient backpropagation (rprop), quickpropagation (quickprop)
CytoSpec also permits basic tests for multiple activations (i.e. if the second-highest activation is larger than a defined threshold)
and for a required minima of activation. If one of these tests is negative the black color is assigned to the corresponding pixel. In
the command line window (and the log-file) you can find additional information
on the test results.
Reference to the literature:
Lasch, P. & Naumann, D. FT-IR Microspectroscopic
Imaging of Human Carcinoma Thin Sections Based on Pattern Recognition Techniques. Cellular and Molecular Biology 1998
44(1). pp. 189-202
Lasch P, Haensch W, Kidder L, Lewis EN. Naumann D.
Colorectal Adenocarcinoma Characterization by Spatially Resolved FT-IR Microspectroscopy. Appl. Spectrosc. 2002 56 (1).
1-9
|
The function called 'Synthon imaging' is basically an interface between CytoSpec and Synthon's
NeuroDeveloper (TM), a software for teaching and validating artificial neural network models with spectra from various origins (e.g. IR, Raman,
MS spectra). Based on neural network models, the interface can be used to re-assemble ANN images from CytoSpec's original data set. Spectral
pre-processing, features selection and ANN classification of a priori unknown spatially resolved IR maps can be easily performed in one
step. This is achieved by utilizing the runtime environment of the NeuroDeveloper software which does not require a software license from Synthon.
Spectral data can be therefore classified without the NeuroDeveloper software on the basis of predefined network libraries. The NeuroDeveloper is,
however, required if you wish to create and validate own neural network models.
Synthon GmbH, contact address:
Analytics and Pattern Recognition
Im Neuenheimer Feld
69120 Heidelberg
GERMANY
phone: +49 6221 50 257 900
fax: +49 6221 50 257 909
email: info@synthon-analytics.com
internet: http://www.synthon-analytics.de
|
|
To start the function select 'Synthon maps' from the 'Image manipulation' menu bar:
|
load allows to browse the directory structure and load the NeuroDeveloper network library (*.snt) file. After loading the
'image' and 'stats' buttons are activated.
image displays the ANN map in CytoSpec's main window
stats gives an overview on ANN classification statistics (see screenshot below)
use NeuroDeveloper winner assignments if this checkbox is checked, CytoSpec uses the NeuroDeveloper settings for ANN
classification. The NeuroDeveloper settings can be modified by unselecting this checkbox.
use ND WTA criterion the NeuroDeveloper settings for the Winner Takes All (WTA) criterion are used.
You can modify these values by deselecting this checkbox (see button 'define' and chapter below)
use ND 406040 criterion the NeuroDeveloper settings for the 40 / 60 / 40 (406040) criterion are
used. You can modify these values by deselecting this checkbox (see button 'define' and chapter below)
use ND extrapolation criterion the NeuroDeveloper settings for the extrapolation are used. This option can deactivated.
define opens a window for entering own WTA and 406040 criteria (see screenshot to the left).
cancel aborts the 'synthon maps' function
|
Spectra that have failed the tests appear within the ANN maps as black pixels.
The evaluation of the activations calculated by the network is performed with the analysis functions WTA and 40-20-40. For this evaluation
the scores and the distribution of the activations from the output neurons are taken into account.
br>
'WTA' criteria:
WTA stands for winner takes all, which means the classification depends on the highest output activation. A spectrum will only
be classified if its output is greater than the defined minimum activation of winner neuron (default 0.7) and the minimum distance to
next activation (default 0.3). Otherwise the classification will not be considered correctly and the spectrum remains unclassified.
'406040' criteria
The 40-20-40 function works differently. The activation of one neuron has to exceed 0.6 (default, above 60 percent of the activation range).
All other activations of further classes have to be below 0.4 (below 40 percent of the activation range). Otherwise, the pattern remains
unclassified.
'extrapolation'' criterion
A general problem with different classification methodologies is the potential misclassification due to undesired or unexpected extrapolation.
This occurs, when the training and validation datasets do not comprise all classes or the entire range of a feature needed for a given
classification problem. In this case, any classification method, including ANNs, would not be representative for the given problem. Data of
this type should rather be termed not classified. The NeuroDeveloper uses a distance value derived from the training and validation dataset,
to determine an extrapolation problem. The maximum distance of a pattern to its corresponding class is calculated and set to 100. During the
classification of a new pattern by the ANN, the distance of the new pattern is calculated and set into relation. In case the calculated
extrapolation value of the class, identified by the neural network, exceeds 100, an extrapolation occurs. The default value to determine
patterns as unclassified is proposed to be set to 200. The value should be set greater than 100, the smaller the value, the stricter the
threshold.
Please note: If the checkbox 'use NeuroDeveloper winner assignments' was checked, CytoSpec does not perform an analysis of
the WTA, 406040 and extrapolation results. The NeuroDeveloper software excludes spectra from further analysis in the following way:
- either both, the WTA, AND the 406040 criteria,
- or classification based on the extrapolation criterion failed.
The definition of 'failed classifications' in CytoSpec is different. CytoSpec defines spectra as unclassified if an individual
spectrum failed one of the three criteria. For this reasons, the classification statistics may depend on the program used for analysis.
Screenshot of the NeuroDeveloper(TM) classification statistics window:
A. Compilation of data sets for teaching and internal validation
1. | Load an IR data set and produce an IR spectral map (e.g. chemical map, HCA map) |
2. | Obtain the context menu of IR maps by clicking with the right mouse button over the
infrared spectral map. |
3. | Choose 'class 1' → and 'start' if you want to assign spectra to class 1.
Now, you are in the 'select spectra' mode. In this mode, the mouse cursor changes its
appearance (arrow plus cross). |
4. | You can select now an unlimited number of spectra by left mouse clicks (in this mode; spectra
will be not displayed). The spatial coordinates will be given in the command line
window. |
5. | To stop the selection mode, choose 'selection mode off' from the context menu.
Alternatively, you can immediately start to assign spectra to class 2 by selecting
'class 2' → and 'start' from the context menu. In this way, spectra can be
assigned to up to 10 distinct classes. |
6. | If all spectra are selected, stop the selection mode by 'selection mode off'. In the
normal 'show spectra' mode the mouse pointer will regain its normal appearance
(arrow). |
7. | In order to export spectra select the 'export' → 'x,y ASCII' from the 'File'
menu bar. A window with the title ' convert into a (x,y) ASCII data format' appears. Check
the checkbox 'export selection'. Please use the default settings for all other options. Make
sure, that the data block of original absorbance spectra is exported. |
8. | Press button 'export' and store the spectra in a folder of your choice. Spectra of class
1 can be identified by the extension '*_1.dat', spectra by class 2 are named '*_2.dat' and so
forth. |
9. | Steps 1-8 should be repeated for a number of maps. It is recommended to use consistent class
assignments for identical (histological) structures. |
10. | Split the spectral data into a subset for teaching (ca. 65 % of the spectra) and internal
validation (35%) |
Now you can load the spectral data into the NeuroDeveloper software. Perform class assignment and pre-processing. Teach and validate the
ANNs and store the network (see Synthon's NeuroDeveloper software manual for details).
The network file (*.snt) contains all relevant information for pre-processing and classification. This file, and Synthons's run-time
environment (NOT the NeuroDeveloper!) are required for classification.
B. Produce NeuroDeveloper maps (e.g. for external validation)
1. | Load an IR data set of absorbance spectra. It is recommended to produce first an IR map
(e.g. chemical map) from original spectra. |
2. | Select 'Synthon maps' from the 'Image manipulation' menu bar. A window entitled '
create NeuroDeveloper maps' will appear. Press the 'load' button and select one of
NeuroDeveloper's Network files (*.snt). |
3. | Spectra from the data block of original data are now written to a temporary file (in CytoSpec's
root folder, please make sure that sufficient free disk space is present). The data are then
pre-processed and classified by Synthon's run-time environment. After this, the classification
results are automatically transferred back to CytoSpec. When finished, you can immediately press
the 'image' button that causes CytoSpec to display the NeuroDeveloper map. If you wish to
modify the NeuroDeveloper exclusion criteria such as WTA, 406040, or extrapolation, uncheck the
respective checkboxes and press 'define'. Change the settings, close the window and press
'image'. Classification statistics are available by pressing the 'stats' button of
the 'create NeuroDeveloper maps' window. |
Selected references to the literature:
Lasch P, Diem M, Hänsch W & Naumann D. Artificial neural
networks as supervised techniques for FT-IR microspectroscopic imaging. Journal of Chemometrics 2007 Vol. 20(5):209-220
, (the author's personal copy can be downloaded from
Researchgate)
Lasch P, Stämmler M, Zhang M, Baranska M, Bosch A,
Majzner K,. FT-IR Hyperspectral Imaging and Artificial Neural Network Analysis for Identification of Pathogenic Bacteria. Analytical
Chemistry 2018 Vol. 90(15):8896-8904.
|
Principles of the function: This multivariate imaging method uses multivariate distances between internal or external reference
spectra and spectra contained in the active hyperspectral data set. The resulting array of distances has the dimension (xdim, ydim) with
xdim being the number of spectra in x-direction and ydim being the number of spectra in y-dimension. Distances are subsequently converted
to color scales. A 'distance image' can be then produced by plotting the colors as a function of the spatial coordinates.
Mathematical distances - related web links
Distance (Wikipedia)
When the function 'Imaging with distance values' was selected from the 'Multivariate imaging' menu bar the following window
comes up:
The window for data preparation is the same as for other multivariate imaging approaches, such as HCA, PCA, VCA, or KMC imaging. Before
this imaging function can be started you have to prepare the data from a spectral multi file.
Reformatting data sets for imaging with distance values: The following data manipulations are performed to prepare the hyperspectral
data set:
- regions from the selected spectra are selected (data block of your choice),
- spectra are scanned for negative quality test results, or unselected regions of interest, and eliminated.
In the window, select the number of spectral regions (min: 1; max: 4) and choose the data source block by selecting the appropriate
radio button (e.g. of the derivative data block). Then, indicate the wavenumber limits of the spectral regions. These regions may
NOT overlap, otherwise an error message will be given. To proceed press 'dist img' or hit 'cancel' to exit.
Important: Spectra with a negative Quality Test result,
or unselected Regions of Interest are automatically excluded from the
function 'imaging with distance values'.
Once data preparation has been finished, the following dialog box will appear:
use external spectrum: when this radiobutton is activated an external double column ASCII spectrum can be loaded. When the file was
loaded successfully the directory and the file name are displayed. Press 'image' to obtain distances between this file and the
active imaging data set and to produce a distance image.
use internal spectrum (default): interspectral distances and distance images are produced using an internal spectrum of the current
hyperspectral data set. The coordinates of this internal spectrum are displayed by the following two edit fields.
(x,y) coordinates: both edit fields display the (x,y) coordinates of the current internal reference spectrum. The coordinates can
be modified manually, or by clicking into one of the images.
distance method: choose between the following interspectral distances: Euclidean, standardized Euclidean and D-values (normalized
Pearsons's correlation coefficients).
external file: the file name and path of the external reference spectrum are shown
image distance layers The function 'imaging with distance values' allows to produce up to five different distance images.
Each of these images can be considered as a layer of a so-called composite image that is produced by a superposition of the
individual distance images, or maps. The following gui elements are useful to produce the composite image:
edit field: shows the color by which the layer will be displayed in the composite image. Gives also the (x,y) coordinate of the
internal spectrum (or the file name of the external reference spectrum). Modification of the content will have no effect on the
resulting composite image.
button: the composite image is produced
slider: changes the contrast of the individual layer in the composite image. The contrast can be varied between 0 (no contrast),
0.8 (default) and 1 (maximum contrast).
checkbox: deletes the individual layer from memory.
load spec (button): permits to load the external reference spectrum (double column ASCII).
image (button): interspectral distances between an internal/external reference spectrum an the spectra of the active hyperspectral
data set are obtained. Distances are employed to produce a single distance image which is plotted in the axis of the preprocessed maps
(main window) using the colormap 'black'.
composite image (button): the composite image is produced
clear data (button): all layers are cleared from memory
cancel (button): press this button to exit.
|
CytoSpec's function 'Create composite images': This is a new function of CytoSpec version 2.00.05. Composite images can be regarded
as simple overlays of individual pseudo-color images. Such overlays can be produced from any combination of chemical, or multivariate images
and allow visualizing the spatial distribution of different functional groups in one image, or superimposing chemical images and spatial
segmentation maps.
Compositing (Wikipedia)
How to create composite images?
- Create any type of pseudo-color representation from the spectral hypercube. Images can be produced by uni-variate methods
such as
chemical imaging
(intensity/absorbance-based, or from band positions
/ band-widths). Multivariate images, or segmentation
images are also suitable components of composite images.
- Select and adapt the colormap. Use the function
set colors
for chosing colormaps and adapting offset and contrast of the components, or channel images. When creating composite images,
it is recommended to utilize single-color colormaps such as blue-black, red-black, or yellow-black instead of standard
multi-color colormaps (jet, hot, etc.)
- When finished select the image as the first channel of the composite image. This can be done by choosing composite image
→ channel 1→ add from the context menu of the given image (see screenshot to the right).
- Create the next channel image according to the instructions given in bullet 2. Select this image as channel image #2.
- The procedure described above can be used to define up to six different channel images.
- When all components of the composite image are created, select plot composite image from the context menu
(see right). This will open a window displaying the composite image. Some of the parameters used used to create the individual
channel images will be given in the
report window of CytoSpec. The
composite image can be stored in a bitmap image format (*.bmp). Note that the function export map from the tools
menu of the composite image does not allow exporting z-data of the image.
|
|
|
Channel image #1
colormap red-black
|
Channel image #2
colormap green-black
|
Composite image created from channel images #1 and #2
|
|
Example of a composite image created from two channel images (data: cell.mat)
|
|
CytoSpec's function 'HCA of chemical images': This is a new function of CytoSpec version 2.00.05. Description to be continued
|