The purpose of this standalone MATLAB package is to allow users to quickly and automatically quantify the alignment of periodic structures (e.g. collagen fibers) in an image, with respect to a user-specified boundary or an absolute reference. The program reads in image files, finds the locations and orientations of edges via the Fast Discrete Curvelet Transform (http://curvelet.org/), and returns the orientation data along with descriptive statistics and other optional outputs. The output may be displayed on the screen and/or written to .csv files. A reduced version containing only the functions to generate and minimally process the orientation data is available for use with Octave.
The optional accessory program, CurvePrep, is for easy preparation of images to be analyzed with the CurveAlign program. It is available as a MATLAB m-file or a standalone for Mac or PC.
Standalone for Mac OS:
1. Download and install the MATLAB Compiler Runtime (MCR) MCR 7.17 2012a
3. Launch the program from the Terminal command prompt or by double clicking the binary file CurveAlign
Standalone for Windows:
1. Download and install Matlab MCR 7.17 2012a 64 bit or 32 bit, depending on your platform.
2. Download and run CurveAlign
Download and unzip the file CurveAlign_MATLAB.zip. Then go to curvelet.org and register to sign a licensing agreement and download the CurveLab 2.1.2 MATLAB package. Place the contents of the folder fdct_wrapping_matlab into the CurveAlign folder. With MATLAB's Current Folder set to the CurveAlign folder, enter "CurveAlign" at the command prompt to launch the GUI.
- Output files are saved under filenames indicating the source of the data and the type of output, e.g. ImageFile1_hist.csv or ImageFile1_stats.csv
- The values in a ____stats.csv file are not labeled, but are always written in the following order (from top to bottom): mean angle, median angle, standard deviation, coefficient of alignment
- The coefficient of alignment (Absolute Measurement) is a unitless value indicating how well the measured angles are grouped about the mean. A value of 1 would indicate that all of the edges in the image are oriented in the exact direction of the mean angle. This number is meant to provide an "at a glance" metric for how aligned the edges in an image are.
- When first starting out, try running a few different images with a range threshold values, using the "Show Reconstructed Image"/"Show Curvelets" option, to determine the appropriate threshold value for your images. (However, it is not advisable to always view the reconstructed images as it will increase processing time.) EXAMPLE
- Increasing the threshold value will (in most cases) improve the quality of the results, but it will also increase processing time.
- If adjusting the threshold does not yield satisfactory results, try resizing the image. In general, images that are 512x512 do not run as well as other sizes. The best results are generally obtained using 1024x1024 images.
Reduced version (March 2012 Release):
Download and unzip the file CurveAlign_Octave.zip. Then go to curvelet.org and register to sign a licensing agreement and download the CurveLab 2.1.2 MATLAB package. Place the contents of the folder fdct_wrapping_matlab into the CurvMeasure folder. To run, load an image file and enter the command "[object, Ct] = newCurv(img,keep)" at the prompt, where "object" is the name of the output data structure containing the locations and orientations of the measured edges, "Ct" is the data structure containing the curvelet coefficients, "img" is the name of the image file and "keep" is the threshold (see above for description). If the "keep" argument is omitted, the default value of .001 is used. The output of this function is a 1 x n struct array with fields "center", indicating the center point of the curvelet, and "angle", indicating its orientation. (n = number of measured edges)
The optional function "group5" takes a vector of angle values and rearranges them such that the standard deviation of the group is minimized, allowing for a more accurate determination of alignment. The function call is as follows: "angs = group5(angles)", where "angles" is the input vector of angle values and "angs" is the output vector of angle values.
The reduced version does not include any of the GUI elements or additional analysis functions.
CurvePrep is an optional supplement to CurveAlign. CurvePrep can be used to convert image stacks into series of single images with one click, and to isolate regions of an image for easier analysis with CurveAlign.