Strain Mapping
Instructions for getting 2D strains from bead arrays and plotting them
Things you will need:
MATLAB (tested on version 7.0.1.24704 (R14) Service Pack 1
2D Strains version 2.1 (available at \\Cardprint\users\Software setups\2D Strain 2.1.1)
CD (coordinate data) file, containing reconstructed 3D coordinates (tested with output from PhNew 9.1).
Optional: Pressure during the frames contained within the CD file (save from windaq into a .csv file).
Optional: Fiber directions
1. Use PhNew to reconstruct 3D coordinates of the beads. An example of this file can be found in this directory under the name CDfile.txt.
2. Pick a reference triangle near the middle of the array. Write down the numbers of the beads, in clockwise order, viewed from the outside of the heart (see here for an example). Make sure the apex and base beads are not counted in the numbering. Save the three bead numbers into a single row of a tab delimited file, with a descriptive name like ‘ReferenceTriangle.txt’.
3. Project the 3D coordinates into a 2D plane. To do this, open MATLAB and run Project2D.m. This MATLAB script will project the data into the 2D plane defined by the reference triangle specified in the previous step. An example of the output is given in 2DCoords_for_Strain2D.txt. Check to make sure the output image looks correct. If the image looks strange, you may want to go back and try a different reference triangle.
4. Open Strains2D.
5. Go to Setup->Points per frame and enter the appropriate value
6. Go to Setup->Coordinate System/File Setup and choose the second selection: ‘Find coordinate system from apex/base points as first 2 lines of data file, and all frames have apex/base points first’’
7. Go to File->Open Coordinate File (time series). Open the projected file, in this example 2DCoords_for_Strain2D.txt.
8. Go to Analyze -> Find triangles in Array.
9. Go to Analyze -> Plot/edit triangles
10. In the plotting window, go to Data->Plot triangles found in bead array.
11. Now, manually add and remove triangles using Data->Add a triangle manually and Data->Delete triangles. Additions and deletions will not be reflected until you rerun Data->’Plot triangles found in bead array’. Ideally you will have maximum coverage of the array region using the smallest possible number of triangles. Expect to have approximately 30-50 triangles.
12. When you are satisfied, quit the Plotting window and go to File-> Write -> Triangle Info. An example of the output is given in triangles.txt.
13. Now, go back to MATLAB and run ProcessCardiacStrains.m. You will be asked if you have the pressure file (WinDAQ) available. If you do, it will be added to the plots that will be generated by this script. NOTE: It may take several minutes to create all of the strain maps.
Summary
In the designated output directory, you will find a text file with cardiac strains as a function of time in each triangle.
In addition, you will find a directory named 'grids' which contains text files showing the strains at interpolated grid points.
Lastly, you will find a directory named 'pics' which contains the strain maps at interpolated grid points.
To change plotting parameters, open ProcessCardiacStrains.m and alter the parameters at the beginning of the file.
The following is an example of the output images. Color represents the value of Lagrangian strain.