ImageJ 오버레이 ROI 줌 (ImageJ Overlay ROI zoom)


문제 설명

ImageJ 오버레이 ROI 줌 (ImageJ Overlay ROI zoom)

Using ImageJ I would like to create a Zoom function for a ROI at a given location. so far I have something like this: 

imp = IJ.getImage();
ip = imp.getProcessor();
//fill pixel array with ROI pixels
for(int i = 0; i < height; i++)
{
for(int j = 0; j < width; j++)
{
pixels[i][j] = (float)ip.getPixel(xPos + i, yPos + j);
}
}

I have a array of pixels, now I want to create a ROI containing these pixels enlarged in the corner of my image. I have been looking into the ROI api of ImageJ but cannot seem to get in the right direction. Any guidance would be great. I am looking to a function that would Fill a ROI with the pixels values I have. Thanks in advance.


참조 솔루션

방법 1:

You are probably looking for the class ImageRoi. This code will show the selected roi in the overlay in upper left corner (2x bigger).

ImageProcessor cropped = IJ.getImage().getProcessor().crop(); //image from currently selected roi
ImageProcessor scaled = cropped.resize(cropped.getWidth()*2,cropped.getHeight()*2);  //magnified image
Overlay overlay = new Overlay(new ImageRoi(0,0, scaled));    
IJ.getImage().setOverlay(overlay);

(by Elewis787Josef Borkovec)

참조 문서

  1. ImageJ Overlay ROI zoom (CC BY‑SA 3.0/4.0)

#image #image-processing #imagej #user-interface #java






관련 질문

이미지가 추가될 때 div 높이가 과도하게 늘어남 (div height overstretching when image is appended)

MS-Outlook 임베디드 이미지를 가져오고 MS-Access VBA를 사용하여 파일 시스템에 저장 (Getting MS-Outlook embedded images and saving them within the file system using MS-Access VBA)

Android 이미지 갤러리 이미지 자르기 및 ImageView 설정 (Android Image Gallery Crop Image and set ImageView)

Facebook은 드래그하여 이미지를 닫는 데 어떤 라이브러리를 사용합니까? (What library does Facebook use for dismiss image by dragging?)

이미지를 Picturebox(VB6의 이미지)에서 문자열(Base64)로 변환하는 방법은 무엇입니까? (How to convert Image from a Picturebox(Image in VB6) to String(Base64)?)

HTML, Canvas 및 WebGL 간의 품질 차이 (Quality differences between HTML, Canvas and WebGL)

TBitmapImage는 Inno Setup 6에서 크기 조정된 디스플레이의 크기보다 크게 렌더링됩니다. (TBitmapImage is rendered larger than its size on scaled display in Inno Setup 6)

이미지 URL이 실제 이미지를 가리키는지 확인합니다. 문제를 일으키는 URL의 공백 (Check if an image URL points to an actual image. Space in URL in causing issue)

android studio에서 인텐트를 통해 여러 콘텐츠를 보내는 방법 (how can i send multiple contents through intent in android studio)

Squarespace 사이트용 CSS로 이미지의 위치를 완벽하게 제어 (Fully Control The Location of an Image with CSS for Squarespace site)

iText7을 사용하여 PDFButtonFormField에 이미지를 추가할 때 종횡비를 유지하는 방법 (How to Maintain Aspect Ratio when Adding an Image to a PDFButtonFormField using iText7)

png 이미지에서 픽셀 색상 추출 (extracting pixel color from png image)







코멘트