imodcurvature(1) General Commands Manual imodcurvature(1)NAMEimodcurvature - Measures radius of curvature of model objectsSYNOPSISimodcurvature options input_model output_modelDESCRIPTIONThis program will compute the local radius of curvature of objects in a model and encode that value into the model as a color or a 2D or 3D point size. It can compute either a 2D or a 3D radius of curvature by fitting circles or spheres to contours; it can also fit cylinders. For fitting in 2D, it computes the radius of curvature at each point in a contour by fitting to a segment of the contour centered on the point; the length of this segment is set by a parameter called the window length. This parameter should be varied to explore the tradeoff between averaging over larger areas and having a less noisy result. This 2D fitting should be very reliable because the search for the cen- ter and radius of the circle is initialized by an explicit solution for the circle through three widely spaced points along the contour. How- ever, the 2D fitting will produce a gradient of curvatures in a spheri- cal object because the radius of cross-sections decreases away from the equator. The 3D fitting is activated by specifying a parameter for the range in Z over which to fit. The objects to be fit must contain a mesh (pro- duced by Imodmesh) so that connections between contours can be deduced. This mesh should connect all contours rather than skipping Z levels; otherwise the contours that are not on the Z levels included in the meshing cannot be analyzed. For 3D fitting, the program computes the radius for each point by sampling points from contours above and below the point in Z. The fit of 4 parameters to these sample points may be somewhat less reliable because it is still initialized by the explicit solution for a circle fit to the central contour. No fit is done to a point unless there is at least one contour above and one con- tour below the point in Z. Here one may need to explore the effects of varying both the window length and the Z range. Fitting to cylinders instead of spheres is activated by specifying an angular increment for searching different orientations. At each possi- ble orientation for the cylinder axis, the sampled points are projected into a plane and then a circle is fit to those points. Cylinder fits thus involve finding 5 parameters, so they may even less reliable than spherical fits. Nevertheless, they will give more meaningful values for tubular regions, which have a high curvature around the tube and a low curvature along its length. A limitation here is that the fit will not generally include points from both sides of a long contour and will not be possible for some portions of the tops and bottoms of struc- tures. The exhaustive orientation search is computationally ineffi- cient and will make the program run much longer than for spherical fits (hours instead of minutes). If contours are in arbitrary planes rather than in Z planes, the 2D curvature can be determined, but only if they are individually rotated into the best-fitting plane, using the-rooption. A radius of curvature is encoded into the model only if it falls within the range of the lower and upper criteria set with the-rcoption. In addition, a criterion for the root mean square error of the fit may be set with the-fcoption, in which case a radius is encoded only if the fit gave an error less than this criterion. The radius value can be used to set a color, a 3D point size, or a 2D symbol size for each individual point that meets the criteria. One or a few colors can be specified with the-cooption, or a full false- color palette can be used with the-paoption. In addition, the curva- ture values can be stored directly in the model, in which case 3dmod will display the values in false color by default. This method allows dynamic control over the display. With either method for color dis- play, the model needs to be remeshed to see the colors in the model view of 3dmod. The 3D points are useful for seeing the exact values of the radius by opening the Surface/Contour/Point dialog in 3dmod. They could also be useful for visualizing the fit in the 3dmod Zap window, provided that one selects the option in the Edit Object dialog to show the spheres only on their central section. These spheres will impair the display in the model view window, however. An alternative is to encode the radius as circular symbols; however, they will only have the right size at the particular zoom specified with the-syoption.OPTIONSImodcurvature uses the PIP package for input (see the manual page for pip). Options can be specified either as command line arguments (with the -) or one per line in a command file (without the -). Options can be abbreviated to unique letters; the currently valid abbreviations for short names are shown in parentheses.-in(-i)OR-InputFileFilenameName of input model file. If it is not entered with this option it must be entered with the first non-option argument.-OutputFileFilenameName of output model file. If it is not entered with this option it must be entered with the second non-option argument.-wl(-w)OR-WindowLengthFloatingpointLength in pixels over which to fit a circle to the contour data around a point. The default is the sum of the lower and upper radius criteria (i.e., the mean diameter). The radius will not be determined in contours less than this length for closed con- tour objects, or less than half this length for open contour objects. In the latter case, the window will be reduced for fitting to points near the ends of the contour.-zr(-z)OR-ZRangeToFitFloatingpointRange of contours in Z to include for fitting to a sphere. The value should specify the actual distance in Z after Z-scaling, if any. The default is 0 to fit just one contour at a time to a circle.-cyOR-CylinderSearchAngleFloatingpointIf this option is entered, points will be fit to a cylinder instead of a sphere by doing an exhaustive search of all possi- ble orientations. The value entered is the angular increment for this search. Increments of 5 to 10 degrees are useful. Computation time will increase inversely with the square of this increment. A value of 10 is recommended for initial testing, and a value of 5 for final computations.-rcOR-RadiusCriterionTwofloatsLower and upper criteria for radius of curvature. When the radius at a point is within this range, it will be encoded into the model.-fc(-f)OR-FitCriterionFloatingpointCriterion for root mean squared error of the local fit to a cir- cle. If a non-zero value is entered, then the RMS error must be less than the given value for a radius of curvature to be encoded at that point. With the default value of 0, the curva- ture will be encoded regardless of the error of the fit.-ob(-o)OR-ObjectsToDoListofintegerrangesList of objects to encode-roOR-RotateToXYPlaneRotate contours that are not all in one X/Y plane into the best- fitting X/Y plane. Circles will be fit to the rotated contour. This option cannot be used with the -zr option for spherical fitting.-stOR-StoreValuesStore the radius of curvature values directly in the model. They can then be visualized as intensity variations or in false color by activating the option to "Show stored values" in the Values panel of the model view Object Edit window of 3dmod. This option allows dynamic adjustment of the displayed colors. These radius values will be scaled by the pixel size defined in the model, unlike all other radius values, which are in pixels.-kappa(-k)OR-KappaValuesStore curvature values, which are the inverse of the radius of curvature, in the model. This curvature is commonly referred to as kappa. To keep values from becoming too small, they will be multiplied by 1000 if the pixel size is greater than 0.05. Thus, for typical pixel sizes in nanometers, the curvatures will be in reciprocal microns. This measure could be advantageous if you are interested in seeing the values for regions with little or no curvature while still seeing distinctions among regions with moderate curvature. The curvature value goes to zero, while radius of curvature becomes very large and compresses the dynamic range.-psOR-PointSizeUse spherical point size to encode radius of curvature. Each point that meets the criterion will be given a point size equal to the radius of curvature; other points will have individual point sizes set to 0.-syOR-SymbolZoomFloatingpointUse circular symbols to encode radius of curvature, where the circles will have the right size when the image is displayed with the given zoom factor.-coOR-ColorThreeintegersUse this entry to specify one or more colors to change points to when their radius of curvature meets the criteria. Enter r,g,b values between 0 and 255. When multiple colors are entered, the behavior is controlled by the -di option. (Successive entries accumulate)-di(-d)OR-DivideRangeWhen multiple colors are entered, by default they will be applied to successive objects being analyzed. If this option is entered, then the range of radii between the low and high crite- rion will be subdivided by the number of colors, and points within each subrange will be assigned to a different color.-paOR-UsePaletteFilenameUse a 256-color false color palette for the colors. Enter a filename to read a color table from a file, or "s", "standard", or any abbreviation thereof for the standard palette from 3dmod, or "i", "inverted", or any abbreviation thereof for an inverted palette from 3dmod. This option will automatically subdivide the radius range into 256 levels. A color table file can have one of two forms. One form starts with a line with 256, then has 256 lines with red, green, and blue values from 0-255. The other form starts with the number of lines to follow; then each following line has a red, green, and blue value (0-255) plus an arbitrary integer indicating the relative location of that value along the 256-color range. These location values must be in order. If the colors being specified are to be equally spaced, the location values can simply be sequential values.-saOR-SampleSpacingFloatingpointSpacing of sample points along contour for fitting (default 2)-me(-m)OR-MeanStoredIntegerUse this option to get an output of the mean value stored in the model for each object (1) or for each contour (2).-ve(-v)OR-VerboseThe verbose output will show the number of points being fit, the center and radius, and the root mean squared error for each point being fit. It could be useful for getting a sense of the RMS errors.-tcOR-TestCircleFitsTest circle fitting by fitting a circle to each contour in object 1 and putting a point with the given location and radius in a new object.-tsOR-TestSphereFitsTwointegersTest sphere fitting by making a new object with the points being fit to and the fitted sphere for the given contour and point number. If cylinder fitting is being done instead, 3 spheres will be shown along the axis of the fitted cyclinder, and the results for each search angle will be printed. If the -ve option is given, the program will also output the projection points at each search angle.-siOR-SignedValuesTextstringIf "+", radii and curvatures will be stored as positive values when the contour follows a locally clockwise path as viewed from the +z axis, and negative for counterclockwise. If "-", these signs will be reversed. SignedValues are not allowed in combi- nation with ZRangeToFit (-zr) or CylinderSearchAngles (-cy) .-help(-h)OR-usagePrint help output-StandardInputRead parameter entries from standard inputAUTHORDavid MastronardeSEEALSO3dmod, imodmeshBUGSEmail bug reports to mast at colorado dot edu. IMOD 4.10.22 imodcurvature(1)