且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何更改线轮廓的约束?

更新时间:2023-11-26 23:45:28

"LinePlotDisplays"部分中可能描述了您要查找的命令:

The commands you seek are possibly described in the section on "LinePlotDisplays":

一个简单的例子是:

image spectrum := RealImage( "Test", 4, 512 )
spectrum = icol * sin( icol/iwidth * 10 * Pi() ) 
spectrum.ShowImage()

imageDisplay disp = spectrum.ImageGetImageDisplay(0)
disp.LinePlotImageDisplaySetDoAutoSurvey( 0, 0 )            // Switch auto-survey off!
disp.LinePlotImageDisplaySetContrastLimits( -50, 100 )      // Set limits (uncalibrated)
disp.LinePlotImageDisplaySetDisplayedChannels( 100, 200 )   // Set X-range in display (uncalibrated)


但是,如果您指的是图例上的右键菜单中的设置,即


However, if you are referring to the settings one gets from the right-click menu on the legend, i.e.

那么,恐怕,我对您没有任何帮助.

then, I'm afraid, I don't have any help for you.

在当前DigitalMicrograph中似乎没有脚本访问此功能.

但是,您可以通过脚本命令相对于彼此移动和缩放" LinePlot的各个切片. 帮助文档中实际上有一个示例脚本,我只是在此处复制粘贴:

You can, however, "shift and scale" individual slices of a LinePlot with respect to each other by script commands. There is actually an example script in the help documentation, which I'm just copy-pasting here:

number deltaX = 10
number deltaY = 20

number kLinePlotType = 3
image spec := GetFrontImage()
if ( !spec.ImageIsValid() ) Throw( "Invalid image" )
if ( 0 == spec.ImageCountImageDisplays() ) Throw( "No Image Display" )

imageDisplay disp = spec.ImageGetImageDisplay(0)
if ( kLinePlotType != disp.ImageDisplayGetDisplayType() ) Throw( "Not a LinePlot." )

number nSlices = disp.LinePlotImageDisplayCountSlices()

// get current reference slice index and its ID
number refSlice_idx = disp.LinePlotImageDisplayGetSlice()
object slice_ref = disp.ImageDisplayGetSliceIDByIndex( refSlice_idx )

for ( number i = 1; i < nSlices; i++ )
{
    object slice_src = disp.ImageDisplayGetSliceIDByIndex( i )
    number int_offset, int_scale
    number pos_offset, pos_scale

    // get current transform factors between slice and reference slice
    disp.LinePlotImageDisplayGetImageToGroupTransform( slice_src, slice_ref, int_offset, int_scale, pos_offset, pos_scale )
    pos_offset = ( i / nSlices ) * deltaX
    int_offset = ( i / nSlices ) * deltaY

    // set new transform factors between slice and reference slice
    disp.LinePlotImageDisplaySetImageToGroupTransform( slice_src, slice_ref, int_offset, int_scale, pos_offset, pos_scale )
}