AAMToolbox viewing one population in shape space: Difference between revisions

From BanghamLab
Jump to navigation Jump to search
(Created page with 'Back to Tutorial pages<br> =<span style="color:Navy;">'''What''' is Shape Space?</span>= <br><br> ===<span style="color:FireBrick;…')
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Tutorials on the Shape modelling toolbox#1|Back to Tutorial pages]]<br>
[[Tutorials on the Shape modelling toolbox#1|Back to Tutorial pages]]<br>
=<span style="color:Navy;">'''What''' is Shape Space?</span>=
=<span style="color:Navy;">'''What''' is Shape Space?</span>=
<br><br>
===<span style="color:FireBrick;">Mean shape</span>===
===<span style="color:FireBrick;">Mean shape</span>===
{| border="0" cellpadding="5" cellspacing="3"
{| border="0" cellpadding="5" cellspacing="3"
|- valign="top"
|- valign="top"
|width="400pt"|The pink diamond shows the position of the mean cartoon shape plotted in shape space.<br><br>
|width="400pt"|The''' pink diamond''' shows the position of the '''mean''' cartoon shape plotted in shape space.<br><br>
Each spot represents one of the input point models (images).<br><br>
Each '''spot''' represents one of the''' input point models''' (images).<br><br>
Each point model represents 38 points i.e. 38*2=76 values in the normal two dimensional viewing space OR a single point in 72 dimensional space. However, we cannot visualise 78 dimensional space so we have used PCA to choose a view point (a rotation of the space) such that we can see the two principle components. We have then set all the other components to zero and focus on the important parameters.  
Each point model represents 38 points i.e. 38*2=76 values in the normal two dimensional viewing space OR a single point in 76 dimensional space. However, we cannot visualise 76 dimensional space so we have used PCA to choose a view point (a rotation of the space) such that we can see the two principle components. This allows us to visualise and '''focus on the significant (in the sense of accounting for the most variance) parameters'''. Of course, it might be another component that is most significant in biological terms. It is also quite possible that the biologically important parameters are correlated non-linearly in which case they could be invisible in this project because they are distributed into the new components as awkwardly as they were in the original data.  
|width="400pt"|[[File:Cartoons_shape_space_1_AAMToolbox.png|400px|Shape space]]<br>Shape Space: the principle component is plotted on the x-axis (abscissa) and the component that accounts for the second largest amount of variation is plotted on the y-axis (ordinate). Pink diamond shows the position of the mean shape. The other points  
|width="400pt"|[[File:Cartoons_shape_space_1_AAMToolbox.png|400px|Shape space]]<br>Shape Space: the principle component is plotted on the x-axis (abscissa) and the component that accounts for the second largest amount of variation is plotted on the y-axis (ordinate). Pink diamond shows the '''position of the mean shape'''. Each of the other points is a point model that was manually fitted to a sample image. In other words, each sample image (with several vertices) is a point in shape space.
|}
|}
===<span style="color:FireBrick;">Exploring the data in shape space</span>===
=<span style="color:Navy;">'''How''' do we view shape space?</span>=
From the AAMToolbox interface click the '''''View Shape Space''''' button.<br><br>
[[File:ShapeSpaceViewer_AAMToolbox.png|500px|Shape Space Viewer]]<br><br>
#First '''Add''' samples (Add button).
#'''Load''' the sample data (point models).
#'''Plot''' Data, optionally make the '''axis equal''' (to keep a balanced view)
#*Change Colour (far right button) to select a colour
#*Ellipse to draw an ellipse around most of the data
=<span style="color:Navy;">Exploring further.</span>=
===<span style="color:FireBrick;">Exploring the data in shape space, '''where are the samples'''?</span>===
{| border="0" cellpadding="5" cellspacing="3"
{| border="0" cellpadding="5" cellspacing="3"
|- valign="top"
|- valign="top"
|width="400pt"|Each pink circle marker represents a data sample. Right clicking on a marker opens a context menu. Here we have selected to view the associated original image and its point model (shown to the left). <br><br>
|width="200pt"|Each''' pink '''circle marker represents a data sample''''''. Right clicking on a marker opens a context menu. Here we have selected to view the associated original image and its point model (shown to the left). <br><br>
Showing the PC values causes them to be echoed to the command window.<br><br>
Showing the PC values causes them to be echoed to the command window.<br><br>
Ds
|width="400pt"|[[File:Cartoons_shape_space_2_AAMToolbox.png|400px|Shape space]]<br>Shape Space context menu for the markers. The top-left sample has been selected and the associated image/point model is shown on the left.
|width="400pt"|[[File:Cartoons_shape_space_2_AAMToolbox.png|400px|Shape space]]<br>Shape Space: the principle component is plotted on the x-axis (abscissa) and the component that accounts for the second largest amount of variation is plotted on the y-axis (ordinate). Pink diamond shows the position of the mean shape. The other points
|}
===<span style="color:FireBrick;">'''What is the '''distance''' between samples'''?</span>===
{| border="0" cellpadding="5" cellspacing="3"
|- valign="top"
|width="200pt"|Right clicking on a marker opens a context menu. Here we have selected to view the '''distance between the two''' visible markers. The distances (and squared distances) for each of the components is shown in the right. <br><br>
Showing the PC values causes them to be echoed to the command window.<br><br>
|width="400pt"|[[File:Cartoons_shape_space_3_AAMToolbox.png|400px|Shape space]]<br>Shape Space: '''distance between two points'''.
|}
===<span style="color:FireBrick;">Can we '''interpolate''' between samples?</span>===
{| border="0" cellpadding="5" cellspacing="3"
|- valign="top"
|width="200pt"|Here we add a 'vector' (arrow) from one point and another.<br><br>
Click on the Vectors button in the Shape Space Viewer interface and the vector will be displayed as an arrow. Click on a sequence of samples to create a path through shape space.<br><br>Select Menu:Vectors:Walk along vectors 'walk' along the vectors and see the sequence of results obtained by interpolation. In the sequence of images shown on the right the position in shape space is shown by the yellow disc together with the interpolated image.
|width="400pt"|[[File:Walk_through_shape_space_AAMToolbox.png|400px|Shape space]]<br>Shape Space: '''Yellow disc''' shows a position in shape space and on the right is the interpolated shape.  
|}
|}

Latest revision as of 12:35, 2 December 2012

Back to Tutorial pages

What is Shape Space?

Mean shape

The pink diamond shows the position of the mean cartoon shape plotted in shape space.

Each spot represents one of the input point models (images).

Each point model represents 38 points i.e. 38*2=76 values in the normal two dimensional viewing space OR a single point in 76 dimensional space. However, we cannot visualise 76 dimensional space so we have used PCA to choose a view point (a rotation of the space) such that we can see the two principle components. This allows us to visualise and focus on the significant (in the sense of accounting for the most variance) parameters. Of course, it might be another component that is most significant in biological terms. It is also quite possible that the biologically important parameters are correlated non-linearly in which case they could be invisible in this project because they are distributed into the new components as awkwardly as they were in the original data.

Shape space
Shape Space: the principle component is plotted on the x-axis (abscissa) and the component that accounts for the second largest amount of variation is plotted on the y-axis (ordinate). Pink diamond shows the position of the mean shape. Each of the other points is a point model that was manually fitted to a sample image. In other words, each sample image (with several vertices) is a point in shape space.

How do we view shape space?

From the AAMToolbox interface click the View Shape Space button.

Shape Space Viewer

  1. First Add samples (Add button).
  2. Load the sample data (point models).
  3. Plot Data, optionally make the axis equal (to keep a balanced view)
    • Change Colour (far right button) to select a colour
    • Ellipse to draw an ellipse around most of the data

Exploring further.

Exploring the data in shape space, where are the samples?

Each' pink circle marker represents a data sample'. Right clicking on a marker opens a context menu. Here we have selected to view the associated original image and its point model (shown to the left).

Showing the PC values causes them to be echoed to the command window.

Shape space
Shape Space context menu for the markers. The top-left sample has been selected and the associated image/point model is shown on the left.

What is the distance between samples?

Right clicking on a marker opens a context menu. Here we have selected to view the distance between the two visible markers. The distances (and squared distances) for each of the components is shown in the right.

Showing the PC values causes them to be echoed to the command window.

Shape space
Shape Space: distance between two points.

Can we interpolate between samples?

Here we add a 'vector' (arrow) from one point and another.

Click on the Vectors button in the Shape Space Viewer interface and the vector will be displayed as an arrow. Click on a sequence of samples to create a path through shape space.

Select Menu:Vectors:Walk along vectors 'walk' along the vectors and see the sequence of results obtained by interpolation. In the sequence of images shown on the right the position in shape space is shown by the yellow disc together with the interpolated image.

Shape space
Shape Space: Yellow disc shows a position in shape space and on the right is the interpolated shape.