Posted by
Daniel Devlin-2 on
Feb 11, 2013; 10:32pm
URL: http://imagej.273.s1.nabble.com/FW-Saving-Tiff-files-tp5001723p5001734.html
Hi Curtis,
Had to get straight back to let you know I'm looking at the saved image. Thanks so much for the quick and helpful reply.
Thanks,
Daniel
________________________________________
From: ImageJ Interest Group [
[hidden email]] on behalf of Curtis Rueden [
[hidden email]]
Sent: 11 February 2013 19:39
To:
[hidden email]
Subject: Re: FW: Saving Tiff files
Hi Daniel,
> I keep getting an Access Denied message
If you attempt to open a directory for writing as a regular file, "access
denied" is a typical error message. So it may be that
FileSaver.saveAsTiff(String) does not support directory arguments.
Try something like:
saver.saveAsTiff(new File(picker.getSaveDirectory(),
myFileName).getAbsolutePath());
where "myFileName" is the desired file name.
Regards,
Curtis
On Mon, Feb 11, 2013 at 1:01 PM, Barry DeZonia <
[hidden email]> wrote:
> Hi Daniel,
>
> It sounds like the user of the code does not have user permissions to write
> data to the directory returned by picker.getSaveDirectory(). To test this
> try hardcoding a directory you know you can save to (like your user
> directory on the machine) and see what happens.
>
>
> On Mon, Feb 11, 2013 at 12:40 PM, Daniel Devlin <
>
[hidden email]> wrote:
>
> > Hi All,
> >
> >
> >
> > Could anyone help with the issue below?
> >
> >
> >
> > Thanks,
> >
> > Daniel
> >
> > ________________________________
> > From: Daniel Devlin
> > Sent: 11 February 2013 13:26
> > To:
[hidden email]
> > Subject: Saving Tiff files
> >
> > Hi All,
> >
> > I am a university student in Northern Ireland. I have created an
> > application with the purpose of trying to extract vessel maps from
> retinal
> > images. I am using the ImageJ library to open a tiff file as I didn't
> have
> > the resources to do this myself. I now have a greyscale image that is a
> 2D
> > integer array and I would like to save this. I have tried to assign an
> > Image to the ImageProcessor and save this but I keep getting an Access
> > Denied message. Any help would be greatly appreciated.
> >
> > Thanks,
> > Daniel
> >
> > P.S Here is the code to attempt the save.
> > //load.pc.getImage returns buffered image
> > Image image = load.pc.getImage();
> > ImagePlus imagePlus = new ImagePlus();
> > imagePlus.setImage(image);
> > imagePlus.setTitle(fileName);
> > FileSaver saver = new FileSaver(imagePlus);
> > saver.saveAsTiff(picker.getSaveDirectory());
> >
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> >
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html