Exceptions within the RoiManager

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Exceptions within the RoiManager

CARL Philippe (LBP)
Dear all,
If I try open a picture in java, I can check for exceptions with a code
similar with this:
        ImagePlus imp = IJ.openImage(path_to_picture);
        If(imp == null)....
But if I try to open saved ROIs with a code like this:
        RoiManager Rm = RoiManager.getInstance();
        if(rm == null) rm = new RoiManager();
        rm.runCommand("Open", path_to_rois);
How could that check whether everything went smoothly?
Of course I could check wether the file path_to_rois really exists prior of
launching the runCommand("Open".
But are there better options for such a case?
I thank you very much in advance for your lightings.
My best regards,
Philippe

Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
67401 ILLKIRCH
Tel : +33(0)3 68 85 41 84

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html