commit 12f926de284cefeeb02f071be1ffe2f3530ff628 Author: Fischer Robert Date: Fri Oct 25 11:12:10 2024 +0200 initial commit diff --git a/Import_VOL_ImageJ.ijm b/Import_VOL_ImageJ.ijm new file mode 100644 index 0000000..0493b72 --- /dev/null +++ b/Import_VOL_ImageJ.ijm @@ -0,0 +1,73 @@ +/* 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