Macro: converting to TIFF

Hello,
I have a lot of .nd2 z stack images. I need to convert them to single channel z stack .tif files. Each .nd2 z stack has four channels.
The four output .tif files from each image would need four different filenames; C1…, C2…, etc, with the input .nd2 filename making up the rest of the .tif filename

Any help making a macro to separate the channels and convert to .tif files on the several hundred images I have would be greatly appreciated.

I’m not familiar with .nd2 files but if they are a version of .ndp files that come off a nanozoomer there is a plugin that does what you want
http://www.imnc.in2p3.fr/pagesperso/deroulers/software/ndpitools/

Thanks for your reply.
The .nd2 files are what we get when acquiring with NIS Elements. They are not a problem and I can open them without trouble. The output is the important part. I’ve seen macros for batch processing images and saving with a unique filename, what I’m having trouble with is splitting the 1 .nd2 file into 4 channels (4 different files) and saving them individually all with unique names.

I’ve done this in the past, Where I took an RGB Image and split it by (Hue, Saturation and Brightness). Fiji then names the window “Hue”, “Saturation”, or “brightness” elsewhere in the Macro I define “t” as the original file name, then as it processes…you can to the following

selectWindow(“Saturation”);
rename(t+ “Saturation”);
//The add your process and output specific tasks.

1 Like