I’m sure it can be adapted to add user selections for not splitting in z, but the z split was what I found most int(label=“How many divisions (e.g. Here’s my solution for the stack splitting. Print(“Position (after): “+channel+”, “+slice+”, “+frame) Ĭall(“ij.”, locX + offsetX, locY + offsetY) Print("Position (before): “+channel+”, “+slice+”, "+frame) Stack.getPosition(channel, slice, frame) GetDimensions(w, h, channels, slices, frames) N = getNumber(“How many divisions (e.g., 2 means quarters)?”, 2) Now I just have to figure out how to recreate my two channel stacks for each part. I really have no idea what I am doing and am shocked it worked for me. I modified scripts uploaded by and Matthew above: I have called the Macro “ChopStack”. Hi all, I had a similar question (I wanted to divide a STACK into several parts - not just the image and I wanted to make sure everything was labelled uniquely in a logical manner). Too - if you want to then merge those images into a stack at the end… after the close() call - just add this line: run("Images to Stack", "name=Stack title= use") and all those tiles will be merged into a single stack. Introduction into Macro Programming page of the wiki.A helpful workshop on Scripting with Fiji - the slides are here.Here are some helpful links on Scripting in ImageJ/Fiji: You can adapt this script as you see fit. MakeRectangle(offsetX, offsetY, tileWidth, tileHeight) GetLocationAndSize(locX, locY, sizeW, sizeH) Ĭall("ij.", locX + offsetX, locY + offsetY) This macro chops an image into NxN tiles, where N is the number To split channels, go to Image > Color > Split Channels.Had answered a similar question on the listserv awhile back… He presented this macro that will divide up an image into equal parts chosen by the user - I just updated it a bit using Script Parameters: int(label="How many divisions (e.g., 2 means quarters)?") n.Select keep source images to keep original images open. Determine which image will be which channel (red, green, blue, cyan etc.) and merge using the dropdown menu. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |