Batch Macro File Format Input

I have a project to place Stratec pQCT images on the NIH web site for use by anyone.

Problem: I need to change the image file names from the numerical CT# format to something that identifies the scan site and collection wave. When I do this ImageJ no longer recognizes the file type as Stratec (or anything else) and it will not open. However I can open it with the import function, by choosing Stratec pQCT.

This would be acceptable but the issue is also present in the batch macro tool, a necessity for me when analyzing.

If possible I need a file format (import Stratec pQCT) selection option for the input folder selection. I think this would be helpful to other image types as well

This one is a bit curly. There are two main ways to determine file type. The first is by filename conventions e.g. the extension (like .png, .tif). The other is by using a ‘magic number’ in the first few bytes of the image data. IIRC the Stratec files have a bunch of header fields that could be used to positively identify them, regardless of the file name. They are a bit unusual in their file name convention that always goes like I*.M*. @tjrantal and @rimadoma may be able to help.
You might be able to hack it by making sure your file names start with an I, and filename extensions start with an M.

I see that some time ago we added this to HandleExtraFileTypes:

		// Timo Rantalainen and Michael Doube: read Stratec pQCT files.
		// File name is IDDDDDDD.MHH, where D is decimal and H is hex.
		if (name.matches("[iI]\\d{7}\\.[mM]\\p{XDigit}{2}")) {
			return tryPlugIn("org.doube.bonej.pqct.Read_Stratec_File", path);
		}

This means if the filename matches the format as described then the pqct image is handled automatically. If not then ImageJ may try automatically with BioFormats.