/* README: * This macro imports a VOL file into ImageJ using the information contained inside the corresponding PCR file. If no PCR is found, * the user can input the information required to perform the action manually or provide the PCR file. * * Execution: * runMacro("...path.../Import_VOL.ijm"); Opens a selected VOL file * * Changelog: * 2018.01.22 Created MR54 * 2021.03.12 Datos Ac update, Adapted Linenumbers to new header CC54 * */ // Select VOL file and extract PCR file name filePath = File.openDialog("Select VOL file to import"); tempPath = split(filePath,"."); pcrPath = tempPath[0]+".pcr"; pcrSizeX = 0; pcrSizeY = 0; pcrSizeZ = 0; while (pcrSizeX == 0 || pcrSizeY == 0 || pcrSizeZ == 0) { if (File.exists(pcrPath)) { // Extract import parameters from pcr file pcrContent = File.openAsString(pcrPath); pcrLines = split(pcrContent,"\n"); for (i=0; i