HGGM-LIM / imagej-perfusion-plugin

Dynamic magnetic resonance perfusion quantification plugin.
GNU General Public License v3.0
2 stars 0 forks source link

Parametric maps only contain first slice perfusion image #1

Closed verburgniels closed 8 years ago

verburgniels commented 8 years ago

Although my hyperstack contains all slices of the perfusion image, the perfusion plugin only creates parametric maps of the first slice. How can I get to complete parametric map? I am using Fiji Life-Line version, 2015 December 22 with ImageJ 2.0.0 and Java 1.6.0

PeterMcGor commented 8 years ago

Hi; That's kind of weird. Are the z-axis and t-axis correctly set in your hyperstack? Please, could you provide the image in order to reproduce the issue? Probably is nothing serious.

verburgniels commented 8 years ago

Hi Peter,

Thanks for the quick response. I thought that as well and changed the Z and t axis with re-order Hyperstack which did not help. Here is my folder containing 1000 images in total.

Regards,

Niels DSCtest1.zip DSCtest2.zip DSCtest3.zip

rinze commented 8 years ago

On Tue, May 24, 2016 at 8:05 AM, verburgniels notifications@github.com wrote:

I am using Fiji Life-Line version, 2015 December 22 with ImageJ 2.0.0 and Java 1.6.0

​Not really sure, but I would say it could be a problem of ImageJ 2. As far as I know, we only tested the JPerfusion plugin on ImageJ 1.x versions. Could you please try that and let us know?​

verburgniels commented 8 years ago

Hi Rinze,

I am having trouble with installing your plugin in ImageJ. And if I use an older version of Fiji with ImageJ I get this error:

/Users/nielsverburg/Documents/Fiji_ImageJ1/Fiji.app/plugins/ImageJhyperstack/plugins/MRI-Perfusion/MRI_Perfusion/CreateHyperStack.java:13: cannot find symbol symbol : class DicomTools location: package ij.util import ij.util.DicomTools; ^ /Users/nielsverburg/Documents/Fiji_ImageJ1/Fiji.app/plugins/ImageJhyperstack/plugins/MRI-Perfusion/MRI_Perfusion/CreateHyperStack.java:29: cannot find symbol symbol : variable DicomTools location: class MRI_Perfusion.CreateHyperStack int nSlicesByFrame = (int)Double.parseDouble(DicomTools.getTag(img, "0020,0105")); ^ /Users/nielsverburg/Documents/Fiji_ImageJ1/Fiji.app/plugins/ImageJhyperstack/plugins/MRI-Perfusion/MRI_Perfusion/CreateHyperStack.java:32: cannot find symbol symbol : method duplicate() location: class ij.ImagePlus ImagePlus out = img.duplicate(); ^ 3 errors

Did you manage to make a complete parametric map using my images and ImageJ 1?

Thanks for all your help.

Regards

PeterMcGor commented 8 years ago

Hi Neils;

Well, looks like you are experiencing problems with a DICOM library, but our plugin do not use DICOM libraries... so I am afraid you are not using our plugin, ;-). Actually(from your error), you should be using this one http://imagej.net/MRI_Perfusion. Our plugin calculates the three parametric maps automatically plus the AIF and allows to fit the TAC's to a Gamma function.

Anyway, I attach the parametric maps and the AIF values from your study (obtained with our plugin this time). Please, let me know if you need help installing or using our plugin.

Best. Niels_Study.zip

verburgniels commented 8 years ago

Hi Peter,

You were right that I used MRI_Perfusion to create a hyperstack. But now that I am using the ImageJ option for a hyperstack I still get an error when running image-perfsion-plugin:

/Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:59: cannot find symbol symbol : class ImagePlusHyp location: class perfusion.JPerfusionTool_ ImagePlusHyp myHypStk; ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:60: cannot find symbol symbol : class VoxelT2 location: class perfusion.JPerfusionTool_ List nonAllVoxels=new ArrayList(), notFit = new ArrayList(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:61: cannot find symbol symbol : class MainFrame location: class perfusion.JPerfusionTool_ MainFrame mf; ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:63: cannot find symbol symbol : class EventUtils location: class perfusion.JPerfusionTool_ EventUtils eu; ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:70: cannot find symbol symbol : class AIF location: class perfusion.JPerfusionTool_ AIF aifO; ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:308: cannot find symbol symbol : class fitter location: class perfusion.JPerfusionTool_ private fitter getFitter(Object object) { ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:321: cannot find symbol symbol : class Voxel location: class perfusion.JPerfusionTool_ private Iterator getVoxelModel() { ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:60: cannot find symbol symbol : class VoxelT2 location: class perfusion.JPerfusionTool_ List nonAllVoxels=new ArrayList(), notFit = new ArrayList(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:60: cannot find symbol symbol : class VoxelT2 location: class perfusion.JPerfusionTool_ List nonAllVoxels=new ArrayList(), notFit = new ArrayList(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:112: cannot find symbol symbol : class ImagePlusHyp location: class perfusion.JPerfusionTool_ myHypStk = new ImagePlusHyp(hyStack); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:119: cannot find symbol symbol : class Voxel location: class perfusion.JPerfusionTool_ Iterator voxIterator = getVoxelModel(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:124: cannot find symbol symbol : class VoxelT2 location: class perfusion.JPerfusionTool_ VoxelT2 v = (VoxelT2) voxIterator.next(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:124: cannot find symbol symbol : class VoxelT2 location: class perfusion.JPerfusionTool_ VoxelT2 v = (VoxelT2) voxIterator.next(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:134: cannot find symbol symbol : variable EventUtils location: class perfusion.JPerfusionTool_ EventUtils.showPointsOverlays(notFit); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:138: cannot find symbol symbol : variable vecToStack location: class perfusion.JPerfusionTool_ vecToStack.paintParametricMap(myHypStk, nonAllVoxels, "Nada"); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:144: cannot find symbol symbol : class fitter location: class perfusion.JPerfusionTool_ fitter f = getFitter(mf.comboFitting.getSelectedItem()); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:145: cannot find symbol symbol : class VoxelT2 location: class perfusion.JPerfusionTool_ for (VoxelT2 v : nonAllVoxels) { ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:152: cannot find symbol symbol : class EventUtils location: class perfusion.JPerfusionTool_ eu = new EventUtils(hyStack, nonAllVoxels, mf.showCont, new Plot("AIF", "Time", "Contrast")); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:152: cannot find symbol symbol : constructor Plot(java.lang.String,java.lang.String,java.lang.String) location: class ij.gui.Plot eu = new EventUtils(hyStack, nonAllVoxels, mf.showCont, new Plot("AIF", "Time", "Contrast")); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:156: cannot find symbol symbol : class AIF location: class perfusion.JPerfusionTool_ aifO = new AIF(nonAllVoxels); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:199: cannot find symbol symbol : variable MathUtils location: class perfusion.JPerfusionTool_ double aifInt = MathUtils.interBad(AIF); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:200: cannot find symbol symbol : class VoxelT2 location: class perfusion.JPerfusionTool_ for (VoxelT2 v : nonAllVoxels) { ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:206: cannot find symbol symbol : variable vecToStack location: class perfusion.JPerfusionTool_ vecToStack.paintParametricMap(myHypStk, nonAllVoxels, "CBV"); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:211: cannot find symbol symbol : variable MathUtils location: class perfusion.JPerfusionTool_ double[][] matrixPAIF = MathUtils.pInvMon( MathUtils.lowTriangular(AIF)); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:211: cannot find symbol symbol : variable MathUtils location: class perfusion.JPerfusionTool_ double[][] matrixPAIF = MathUtils.pInvMon( MathUtils.lowTriangular(AIF)); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:212: cannot find symbol symbol : class VoxelT2 location: class perfusion.JPerfusionTool_ for (VoxelT2 v : nonAllVoxels){ ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:224: cannot find symbol symbol : variable vecToStack location: class perfusion.JPerfusionTool_ vecToStack.paintParametricMap(myHypStk, nonAllVoxels, "MTT"); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:226: cannot find symbol symbol : variable vecToStack location: class perfusion.JPerfusionTool_ vecToStack.paintParametricMap(myHypStk, nonAllVoxels, "CBF"); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:284: cannot find symbol symbol : variable MainFrame location: class perfusion.JPerfusionTool_ MainFrame.setParams(Macro.getOptions()); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:285: cannot find symbol symbol : variable MainFrame location: class perfusion.JPerfusionTool_ autoMode = MainFrame.getMode(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:287: cannot find symbol symbol : class MainFrame location: class perfusion.JPerfusionTool_ mf = new MainFrame(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:297: cannot find symbol symbol : class AIFManualSelection location: class perfusion.JPerfusionTool_ aifO.doAIFCalculation(new AIFManualSelection(aifO,nonAllVoxels )); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:302: cannot find symbol symbol : class AIFFromTextFile location: class perfusion.JPerfusionTool_ aifO.doAIFCalculation(new AIFFromTextFile(jfc.getSelectedFile())); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:310: cannot find symbol symbol : class GammaFitterACM location: class perfusion.JPerfusionTool_ return new GammaFitterACM(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:312: cannot find symbol symbol : class NoFitter location: class perfusion.JPerfusionTool_ return new NoFitter(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:314: cannot find symbol symbol : class GammaFitterSVD location: class perfusion.JPerfusionTool_ return new GammaFitterSVD(); ^ /Users/nielsverburg/Documents/FijiImageJ1/Fiji.app/plugins/imagej-perfusion-plugin-master/src/main/java/perfusion/JPerfusionTool.java:316: cannot find symbol symbol : class GammaFitterACM location: class perfusion.JPerfusionTool_ return new GammaFitterACM(); ^ 37 errors

I am working with Fiji 20100610, ImageJ 1.44b and Java 1.6. Apache commons-math3-3.2.jar is in the plugin folder as is your imagej-perfusion-plugin map.

Sorry for all the questions.

Regards,

Niels

PeterMcGor commented 8 years ago

Hi Neils;

Normally, you place the libraries,like Apache commons-math, within the "jars" folder but it should work anyway. Looks like a linking problem when the plugin is compiling with that specific Fiji version. I have never tested the plugin with a Fiji or ImageJ version previous to 2013. I have been trying with the last versions of ImageJ and Fiji (ImageJ 1.X) and works as I showed you yesterday. Are you restricted to Fiji 20100610, ImageJ 1.44b for any reason? I could fix this error but not immediately so probably is faster using a newer version of ImageJ.

Thank you for the feedback and let me know what you finally did.

Best.

verburgniels commented 8 years ago

Hi Peter,

Sorry to contact you again, but the plugin is still not working. Could you tell me which versions of Fiji and ImageJ you used?

The latest Fiji contains ImageJ2 so I just the last Fiji without ImageJ2 (life-line version 2013 July 15) which gave this error

(Fiji Is Just) ImageJ 1.47v; Java 1.6.0_65 [64-bit]; Mac OS X 10.10.5; 103MB of 1741MB (5%)

java.lang.NoClassDefFoundError: IllegalName: perfusion/JPerfusionTool_ at java.lang.ClassLoader.preDefineClass(ClassLoader.java:482) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at fiji.FijiClassLoader.loadClass(FijiClassLoader.java:225) at fiji.FijiClassLoader.loadClass(FijiClassLoader.java:217) at fiji.FijiClassLoader.loadClass(FijiClassLoader.java:212) at fiji.scripting.java.PlugInExecutor.tryRun(PlugInExecutor.java:139) at fiji.scripting.java.PlugInExecutor.tryRun(PlugInExecutor.java:105) at fiji.scripting.java.PlugInExecutor.run(PlugInExecutor.java:86) at fiji.scripting.java.Refresh_Javas.runPlugin(Refresh_Javas.java:379) at fiji.scripting.java.Refresh_Javas.compileAndRun(Refresh_Javas.java:126) at fiji.scripting.java.Refresh_Javas.runScript(Refresh_Javas.java:71) at common.RefreshScripts.run(RefreshScripts.java:287) at fiji.scripting.java.Refresh_Javas.run(Refresh_Javas.java:61) at ij.IJ.runUserPlugIn(IJ.java:195) at ij.IJ.runPlugIn(IJ.java:160) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at ij.Command.runPlugIn(Command.java:148) at ij.Command.runCommand(Command.java:97) at ij.Executer.run(Executer.java:64) at java.lang.Thread.run(Thread.java:695)

Regards,

Niels

verburgniels commented 8 years ago

Hi Peter,

It works!

Problem was I selected the default order when creating a hyperstack. But my data was ordered xytz instead of xyzt.

thanks again for all the help! great plugin!

best

Niels

PeterMcGor commented 8 years ago

Hi Neils;

Glad is finally working. Let me know if you have any doubt.

By the way, if you want to reproduce the results that I attached you yesterday just set the "Rel. threshold" parameter to 1.5

Best regards.

verburgniels commented 8 years ago

thanks. (hopefully) last question: TudorDicomTools to save the CBF to dicom gives an error because it can only save files up to 16-bit grayscale, while the result of your plugin is 32-bit. Is there another way to save the result as a DICOM or NIFTI?

cheers

niels

PeterMcGor commented 8 years ago

Hi Neils;

Easiest thing is to save the image as NIFTI using the ImageJ plugin.

Best.

verburgniels commented 8 years ago

Thanks