如何解决调整 FIB/SEM 图像中的图像对比度 - 不影响图像底部的文本栏
FIB/SEM 图像在图像底部有一个文本栏。 导入 GMS 时,任何对比度、伽玛、.. 调整也会影响文本栏。
是否可以分解图像并使数据处理仅影响实际图像而不影响文本栏?
解决方法
您在这里可以做的最好的事情是将实际的图像数组分成 2 个单独的图像,然后将文本栏部分显示为单独的 imageDisplay,您可以将其添加到数据的 imageDisplay 中。您可以相对于彼此移动/缩放它们,还可以锁定添加的显示,使其无法再通过鼠标移动。以下示例应该可以满足您的需求:
void CropAndMerge(Image img,number h){
number sx = img.ImageGetDimensionSize(0)
number sy = img.ImageGetDimensionSize(1)
image data := img.slice2(0,sx,1,sy-h,1).ImageClone() // note ":=",we sub-slice keeping tags and all
image anno = img.slice2(0,h,1) // note "=",we just want the data copy
imageDisplay disp
// Simple way to get imageDisplay. First show,then grab
// data.ShowImage()
// disp = data.ImageGetImageDisplay(0)
// Better alternative: No need to show
imageDocument doc = NewImageDocument( img.ImageGetName() )
doc.ImageDocumentAddImage( data )
// doc.ImageDocumentAddImage( anno ) // Use this to add 'side ordered' in case of page-view type. However,I'd rather not use page-mode.
disp = data.ImageGetImageDisplay(0)
disp.ImageDisplaySetColorTableByName( "Black Body Extended" ) // Just to show you can act on the display before actually showing it that way
// Add Annotation area as annotation on imageDisplay (all are components)
imageDisplay annoDisp = NewImageDisplay( anno,"best" )
disp.ComponentAddChildAtEnd( annoDisp )
// move out of the way
// ComponentPositionAroundPoint: Moves the annotation so the 'rel_x' horizontal point in the bounding rect is at 'new_x' (if bool horz is true),and for y accordinglye
number doVert = 1
number rel_y = 1.0 // bottom (relative coordinate!)
number new_y = sy // becomes bottom (absolute position)
annoDisp.ComponentPositionAroundPoint( 0,new_y,rel_y,doVert)
// make sure nobody messes with the annotation area
annoDisp.ComponentSetSelectable(0)
doc.ImageDocumentShow()
}
number sx = 1024
number sy = 1024
number h = 300
image in := realimage("Imported",4,sy)
in = (icol%100 + iradius*sin(irow/iheight*5*Pi() + itheta )**2)
in.slice2(0,1) = (icol+irow)%50>45?max(in)+100:0
//in.showimage()
CropAndMerge(in.imageClone(),h)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。