Getting started with macros in ImageJ

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 38

  • @luveni13
    @luveni13 Рік тому +3

    I wish I could give this a million likes, super helpful. Thank you so much!

  • @dorothyaidulis
    @dorothyaidulis 2 роки тому +2

    Mysterious macros demystified! A really clear demo Craig; thanks!

  • @waynefan6222
    @waynefan6222 2 роки тому +1

    This is very helpful, I used the recorder to troubleshoot an error in a macro written by someone else, thank you Craig!

  • @yasinkarakus1014
    @yasinkarakus1014 9 місяців тому

    Thank you so much Craig. You saved a lot of time of mine. Appreciated!

  • @jameslloyd9772
    @jameslloyd9772 2 роки тому +2

    Oh my goodness this is so useful and will save me so much time. Honestly I wish I knew about these earlier, but better late than never - thank you so much!!!

    • @CraigDaly
      @CraigDaly  2 роки тому

      Hi James, thanks for watching. C.

  • @andersoncamargo1791
    @andersoncamargo1791 Рік тому

    Thank you Prof. Craig!

  • @melaniep.117
    @melaniep.117 Рік тому +2

    I would love to see a follow-up video of how to modify a macro for batch processing. At the moment I'm writing a macro to go through a selected folder, run a set of actions on each image file in the folder, an save to a second folder. I'm learning through a lot of trial and error and stealing bits of code from other macros. But I would love to hear you explain that process too!

    • @kathiravan.e4494
      @kathiravan.e4494 Рік тому

      Hi I am struck in the same problem of creating a macro for batch channels if you have found a solution pls let me know how to do it :)

  • @liamwilson5167
    @liamwilson5167 9 місяців тому +1

    I love you Craig!

  • @yagmurcamd
    @yagmurcamd 2 роки тому +2

    Beautiful review,

  • @melaniep.117
    @melaniep.117 Рік тому

    Thank you! Such a good tutorial!

  • @rifaldyt
    @rifaldyt 2 роки тому +1

    amazing video sir 👏🏻 but i want to ask about image mask for unet segmentation. can the fiji apps automaticly masking multiple image in same time ? i have 1190 image dataset. thankyou sir 🤝

    • @CraigDaly
      @CraigDaly  2 роки тому +1

      Hi Rifaldy, thanks for watching. I haven't used the UNET segmentation plugin so I cant answer your question. Maybe one of the subscribers or viewers could pitch in here - anyone? It certainly sounds like a problem that needs a MACRO though. C.

  • @liamwilson5167
    @liamwilson5167 8 місяців тому

    still here, still loving you mate

  • @barboraparizkova4111
    @barboraparizkova4111 Рік тому +1

    Great video, thanks a lot Craig! However, I am still facing a problem with the macro recorder that keeps working with the name of a specific image and then it does not work when I open another one. Then, I have to rewrite all the commands. E.g. I create the macro when opening Image1 and then the commands look like that: run("Merge Channels...", "c1=[Image 1.czi - C=0] c2=[Image 1.czi - C=2] create keep"); etc.. so every time I want to apply for another image, I have to rewrite Image1 to Image2 etc in all the commands. Could you please help me how to apply the same macro for more images? Thank you very much!

    • @selrackleputon
      @selrackleputon 5 місяців тому

      Hello! I encountered the same problem, and I solved it pretty well by doing one first thing in the beggining of the macro: rename the file. Go to image -> rename and just put whatever name you want. This will make that, whichever name your image has, it's going to be transformed in the begginig, and then the rest of the code should work fine with the name you have chosen :) Later you can save the processed image with the name you want. Hope that this works!

  • @fahadp7454
    @fahadp7454 Рік тому

    Thanks a lot!

  • @silviacubela621
    @silviacubela621 2 роки тому

    Thank you very much Dr. Daly. We are doing quantification of the intensity for pancreatic murine slices: all the mouse is red and the beta cells are green, when we get a new beta cell, the red /green transitioning into yellow/reddish, any suggestion to do the quantification ? Appreciate your input, thank you
    Silvia

    • @CraigDaly
      @CraigDaly  2 роки тому

      Hi Silvia, it sounds like starting with a simple colour thresholding routine might be a first step. Make sure your images are converted to ‘Type RGB’ then apply ‘colour threshold’. Adjust the callipers to cover the yellow portion and read off the values. I presume as beta cell expression increases then your value will increase. I think I may have covered this in the colocalisation tutorial - can’t remember. Good luck. C.

    • @silviacubela621
      @silviacubela621 2 роки тому

      @@CraigDaly Thank you very much! sorry for the multiple questions, but what exactly are the callipers in image j? is very important for us because we are looking for the conversion from red to yellow to new green. Thank you again.

    • @CraigDaly
      @CraigDaly  2 роки тому +1

      @@silviacubela621 hi Silvia, email me at university of Glasgow. You’ll find me easily, send an example image and I will send some more detailed advice. Craig.

    • @silviacubela621
      @silviacubela621 2 роки тому

      @@CraigDaly will do it. Thank you very much

  • @Nuntiax
    @Nuntiax 2 роки тому

    Hi Craig; macros is interesting; please help me with this: I have to read a picture of temperature reading; the image comes from a 7 segment display; I must use this using macros for 10 readings or images; Please some hint to start; the images are already in grayscale; If the image indicates 37 degrees, I should print 37, what steps do you suggest? Thank you

    • @CraigDaly
      @CraigDaly  2 роки тому

      Hi, difficult to comment without seeing the image. I might begin by croping the image so that only the relevant segment is showing. How does the image indicate 37 degrees? Are you measuring intensity of the image or does the number 37 appear on the display. If it shows a number then you might need to find a character recognition plug in or ML algorithm since these are very good at recognising numbers.

  • @jiaxinpei7203
    @jiaxinpei7203 2 роки тому

    Hi Craig, thanks for sharing. Can I ask a question that, I need to split two channels and save them separately, but follow your video, my macro cannot find the window when it applied on another image different from the first one I used to record the macro, as the image’s name has changed. So do you have any idea why is that and how can I fix it, thanks

    • @CraigDaly
      @CraigDaly  2 роки тому

      Hi, sorry I cant quite picture what the problem is. Can you provide a bit more detail please. C

    • @jiaxinpei7203
      @jiaxinpei7203 2 роки тому

      @@CraigDaly sorry for the vague description. So all my images have two colour channels, and I want to split them and save the splited image from each channel separately. I recorded the process of processing the first image in macro, and “create” the macro. However when I try to run this macro for my second image, it went wrong as it can’t locate the correct image and save it as the image name was changed. So I’m wondering how to fix it!

    • @CraigDaly
      @CraigDaly  2 роки тому

      @@jiaxinpei7203 Hi, maybe you need to record a longer process when creating the macro. have you tried activating the 'record' function and going through all of your steps - more than I shown in the video. then stop the recording. Your Macro will be a bit bigger than the example. You will need to think about how to name the files so that they are fairly generic which will enable the macro to run on a different set of images. I hope I have better understood the issue now. Regards. Craig.

  • @quornnugget7799
    @quornnugget7799 2 роки тому

    Hi there! I have been having trouble with some stack manipulation. I need to split a stack and then manipulate the individual slices and then combine them back into a slice. This would be simple but I have 500+ slices per stack so I would need to loop them. Do you have any advice for this? I've been struggling figure out how to write this. (I have had a look at the loop video that you linked for someone else :))

    • @CraigDaly
      @CraigDaly  2 роки тому

      Hi, is it the same manipulation for every slice or slightly different for each one?

    • @quornnugget7799
      @quornnugget7799 2 роки тому

      Hi, it’s the same manipulation for every slice.

    • @CraigDaly
      @CraigDaly  2 роки тому

      @@quornnugget7799 Hi. If it is a simple manipulation like 'enhance contrast' then that can be applied to every slice when activated - it will ask you. If it is a more complex set of processes for each image then it will likely need to sit within a 'for loop' in the macro. Use Fiji for this rather than ImageJ as the macro editor in Fiji will provide you with the correct syntax for the for loop. Look for a UA-cam video on 'Fiji Macro For Loop'. C.

  • @captnwho
    @captnwho 7 місяців тому

    Hi, i am New in imagej and Hacer a question if could you answer please?
    İ am trying on one image that selecting multiple rois and want to for each roi apply crop, duplicate , add gray,Binary.......and skeletonise. Making it step bu step so bored. İ tried to make a macro but i failured. Can you help me please how can i handle. Thanks

  • @Bai_Su_Zhen
    @Bai_Su_Zhen 2 роки тому

    How to introduce a variable into a filepath? I have a bunch of folders named 001-100 and inside of them I have series of pictures which I import into ImageJ. So far I need to make 100 copies of the same command, manually rewriting the folder name in each of them which is annoying. I basically go: run("Image Sequence...", "open=C:/Users/Lenovo/Desktop/folder/folder2/001/test000.bmp but I need the 001 to be a variable going from 001 to 100 so it does the command for 001 and then repeats for 002 and so on. So far I'm completely lost.

    • @CraigDaly
      @CraigDaly  2 роки тому

      Hi, it sounds like you need a ‘for loop’. Check out this video;
      m.ua-cam.com/video/bg8FhY37btg/v-deo.html

  • @AnkitPatel-ij1bb
    @AnkitPatel-ij1bb 6 місяців тому

    Hi, I followed this to make the macro. But somehow, my macro is usingthe same image again and again. Could you please help? Thanks

    • @selrackleputon
      @selrackleputon 5 місяців тому

      Hello! I guess you started recording the macro before adding the image. Then, the first thing that your macro does is to load the same image. I suggest that you open your image before starting the macro, and then you start your processing that you want to do. As a tip, the first thing to do is rename your file in your macro to a temporary name, so all the images that you run with your macro will work with the same script. Once you finish, save the macro and install it as Craig shows, and then you can test your macro. You should be able to open your image first, and then run the macro and should work fine!