Skip to content
Yuming Liu edited this page Jun 1, 2022 · 20 revisions

Frequently Asked Questions about CurveAlign

Q1: What is the difference between CT-FIRE and CurveAlign?

These two programs were developed with complementary but different main goals. CurveAlign was developed first and had the main goal of quantifying all fiber angles within a region of interest relative to a user defined boundary be it a straight line or a tumor boundary. As our research grew in investigating the role of collagen in cancer progression and invasion we wanted to investigate how individual fiber parameters could influence cancer and other diseases. Out of this need came the development of CT-FIRE to analyze individual fiber metrics such as length, width, angle, and curvature. Besides the relative angle quantification with respect to the boundary, the current version of CurveAlign can be used to extract other collagen fiber features, such as localized fiber density, fiber alignment, and the spatial relationship between fiber and the associated boundary. In addition, the extracted individual fibers extracted by CT-FIRE can be imported into the CurveAlign for additional feature extraction mentioned above. We have plans to integrate these programs further. For now, CurveAlign should be used for bulk assessment of collagen features including alignment/density and CT-FIRE for individual fiber quantification. Although both tools can only analyze 2D images or image stacks so far, 3D fiber analysis can hopefully be added soon.

Q2: How do I use CurveAlign?

The manual including a number of tutorials is a good start point for learning the basics of CurveAlign.

Q3: How do I manually draw a boundary in CurveAlign V4.0/V5.0?

From CurveAign Version 4.0 on, there is a separate button named "BD Creation" to launch the functions to manually or automatically create the boundary. tiff boundary is commonly used as the "Boundary Method" in CurveAlign V4.0. The steps to manually create the tiff boundary file are briefly listed below:

  1. Load one or multiple images into CurveAlign ;
  2. Choose the image to work on if multiple images are loaded;
  3. Click the "BD Creation" button, and in the prompted dialog window, choose the default option, i.e., "Manual Mask", then in the consequent dialog window, choose the default option,i.e., "freehand mode";
  4. Follow the instructions/message displayed in the message window highlighted in green at the bottom of the main GUI to start and finish the boundary creation. For the freehand mode, you can click any point in the image, and then drag to draw each boundary.
  5. When boundary creation is done, the corresponding mask will be automatically saved in a subfolder named "CA_Boundary" with the correct file name for later CurveAlign analysis.
  6. To draw boundary for another image loaded, repeat the above steps 2-5. In step (3), all the options are set to be identical for all the loaded images and only need to choose for the first image.
  7. To be noted, the above procedure is used for directly drawing boundaries on the image e.g. SHG image to be analyzed. If you need to draw boundaries from other images/channels or using other tools such as Fiji, make sure the created boundary file follows the correct naming convention and is saved in the correct folder. You can check the manual for details.

Q4: What are the definitions for orientation and alignment?

  1. Orientation based on a relative angle(angle between a fiber and its nearest boundary) when there is a boundary involved, unit is in degrees, ranging from 0-90 degrees. It is the mean value of the relative angles of the fibers with respect to the nearest boundaries.
  2. Orientation based on an absolute angle(angle between fiber and horizontal axis) when there is no boundary involved, unit is in degrees, ranging from 0-180 degrees. It is the mean orientation calculated by circular statistics. Specifically, angles are multiplied by 2 first to be converted to [0 360] range to make the angles circular, then calculate the mean value of the circular angles, lastly, the mean value is divided by 2 to yield the orientation.
  3. Alignment is defined as the mean resultant vector length in circular statistics, ranging from 0 to 1, where 1 means all fibers are aligned in one direction while smaller values mean fibers are less aligned. It is called normalized vector sum of orientation vectors. Actually, it is the length of the sum of orientation vectors divided by the number of angles. To be noted, alignment calculation is based on absolute angles mentioned in (2).

Q5: How long does it take to launch the standalone app?

It largely depends on the system configuration. It usually takes a little longer, e.g. a couple of minutes, if the app is run for the first time in a computer.

Q6: Mac users: How to allow the system to launch a Mac app from an unidentified developer?

Open Terminal and enter the following code to get your Anywhere option: sudo spctl --master-disable

To get rid of the Anywhere option, you'll need to go to Terminal again, and this time type: sudo spctl --master-enable

Refer to the following links for more details:

https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/mac

https://www.macworld.co.uk/how-to/mac-software/mac-app-unidentified-developer-3669596/

Q7 Mac users: how to launch the app?

Right click the APP(ctrl -click)----->Show Package Contents ----> Contents---->MacOS---->applauncher (right-click and choose open). It will save the path to the last opened image to a .mat file named "currentP_CA.mat" in the user's' folder at "/Users/account Name" for later use. If the .mat file is corrupted or the image path saved in this file is not readable anymore, the user might need to delete this file to restore the normal use. Typical error messages include: 1) Error using matlab.ui.internal.dialog.FileSystemChooser/PathParser (line 87) Invalid directory to operate on. 2) Error using save Unable to write file currentP_CA.mat: permission denied.

Q8 How to choose a proper fiber analysis mode? In Curvelets (or CT) fiber mode, how do I know I have a good value of the parameter (the fraction of the remaining coefficients)?

  1. Read our protocol paper carefully to choose the fiber analysis mode that is suitable to your images. Each mode may have its pros and cons.
  2. Make sure most representative fibers/patterns are tracked. You should pick up as many collagen signals as possible , but as little background noises as possible. If you miss many fibers or pick up background noises, you definitely need to adjust the parameters or choose a different analysis mode. As indicated in our protocol, for the curvelets (or CT) mode, when the collagen intensity has a big variation within the image, the dimmer fibers would be missed out, you may have to choose a smaller ROI where collagen intensity has an even distribution or choose individual fiber extraction mode (CT-FIRE) to track the fibers.
  3. For the curvelets analysis mode , besides the visual inspection (I would choose the parameter that yields more fibers and fewer noises), as a rule of thumb, when you get a good value of the fraction of the remaining coefficients, increasing the value would have little impact on the results (orientation and alignment).
  4. For the curvelets analysis mode, to analyze fibers at a different scale or group orientations within a different radius other than the default, the user can update the parameters in "Advanced Options" window (after opening an image, click the "Advanced" button to launch this).

Q9 Can this tool work for stained bright-field images?

This tool usually analyzes images with "pure" line-like structures. For stained images, a pre-processing step such as color deconvolution or shape based filtering are needed to first segment the line-like regions.

Q10 Is there a preferred image size or resolution?

For CurveAlign alignment analysis on default mode (CT-mode), the image size is better not larger than 1024 pixels x 1024 pixels. Using a smaller region (but not smaller than 128x128) are preferred so that all the fibers of interest are among the brightest regions. For the image resolution, as a rule of thumb, the user should recognize the individual fibers by eyes.

Q11 Can CurveAlign measure density?

There are 3 kinds of density measurement: 1) In the main program, the density is calculated as the number of objects(eg fibers, fiber segments, or curvelets) within an ROI or an image; 2) The main program also calculates the density with respect to each object: 2a-box density, e.g. "box density 32" is defined as the number of objects within a square whose center is the center of each specified object(eg fiber) with a distance of 32 pixels to each side; 2b-distance based density, e.g 'dist to nearest 4' is defined as the average distance (in pixels) of the object(eg fiber) to its nearest 4 objects(eg fibers); 3) In the "Density Estimation "module in the ROI manager, the density is calculated as the number of pixels whose intensity is above the background threshold within the user-specified region(s). To be noted, the minimum box size(MNS) is set to 32 by default; minimum nearest fibers(MNF) is set to 2 by default.