Search code examples
image-processingimagej

Jump to specified location in dicom series (ImageJ)


I need to see specific points in a CT-scan (I've been given a mask representing a segmentation, so I know the coordinate in mm of my features of interest). This is what I am doing at the moment in ImageJ:

  • File/Import/Image Sequence, I select the first dcm file in the folder of the interest, and then I import the stack
  • I know my point of interest is at x=10, y=5, z=20 [mm]. So I put the cursor on my image, scroll down the stack with the mouse wheel until I see z=20 in ImageJ window, then move the cursor until I match the other coordinates.

Is there a way to automatically jump to the slice corresponding to the specified location?


Solution

  • Yes. I would either

    1. Write a Plugin in Java
    2. Write a macro

    I'd prefer Java because it provides more options when compared to the macro language.

    In Java the code would be

    imp.setSlice(20);
    int poi=imp.getProcessor().getPixelValue(10,5); //int I assume but could be double
    

    Although this is a very simple Plugin so you could also do the same in the macro language easily