Hi all,
I am trying to save a stack of ~5000 .tif images using File > Save As > Image Sequence. However, I am having a problem using the "Use slice labels as file names" option (I only end up with one saved file since most of each filename is cut off). It seems that there is a character limit for the slice labels (~60 characters). Does anyone know if there is a way to increase this? Thanks in advance for your help! Best,Alicia -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Alicia,
> It seems that there is a character limit for the slice labels (~60 > characters). I do not know if ImageJ imposes such a limitation. However, if you are on Windows, beware that all file paths must be 260 characters or less [1]. So even if the slice label length could be increased, you might run into problems with such long file names for other reasons. Regards, Curtis [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath On Thu, Jun 11, 2015 at 12:50 PM, Alicia < [hidden email]> wrote: > Hi all, > I am trying to save a stack of ~5000 .tif images using File > Save As > > Image Sequence. However, I am having a problem using the "Use slice labels > as file names" option (I only end up with one saved file since most of each > filename is cut off). It seems that there is a character limit for the > slice labels (~60 characters). Does anyone know if there is a way to > increase this? > Thanks in advance for your help! > Best,Alicia > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Alicia-2
Hi Alicia,
you are right, the StackWriter plugin uses ImageStack.getShortSliceLabel which truncates long slice labels to 60 characters. You could write a short macro that loops over the slices and uses getMetadata("Label") to retrieve the full slice labels. Unfortunately, this won't be as comfortable as the StackWriter, e.g. it will be much more difficult to ask the user in advance if it would overwrite a file. Michael ____________________________________________________________ On Thu, June 11, 2015 19:50, Alicia wrote: > Hi all, > I am trying to save a stack of ~5000 .tif images using File > Save As > > Image Sequence. However, I am having a problem using the "Use slice labels > as file names" option (I only end up with one saved file since most of > each filename is cut off). It seems that there is a character limit for > the slice labels (~60 characters). Does anyone know if there is a way to > increase this? > Thanks in advance for your help! > Best,Alicia > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Curtis and Michael, Thanks for your quick responses! Michael, that's a great idea. It will be easy enough to just add a line or two to my current macro to get the full slice labels. I didn't realize I could use getMetadata("Label") to do that. Thanks again, Alicia From: Michael Schmid-3 [via ImageJ] <[hidden email]> To: acla345 <[hidden email]> Sent: Thursday, June 11, 2015 1:28 PM Subject: Re: Saving a stack of .tif images with long filenames
Hi Alicia,
you are right, the StackWriter plugin uses ImageStack.getShortSliceLabel which truncates long slice labels to 60 characters. You could write a short macro that loops over the slices and uses getMetadata("Label") to retrieve the full slice labels. Unfortunately, this won't be as comfortable as the StackWriter, e.g. it will be much more difficult to ask the user in advance if it would overwrite a file. Michael ____________________________________________________________ On Thu, June 11, 2015 19:50, Alicia wrote: > Hi all, > I am trying to save a stack of ~5000 .tif images using File > Save As > > Image Sequence. However, I am having a problem using the "Use slice labels > as file names" option (I only end up with one saved file since most of > each filename is cut off). It seems that there is a character limit for > the slice labels (~60 characters). Does anyone know if there is a way to > increase this? > Thanks in advance for your help! > Best,Alicia > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > ImageJ mailing list: http://imagej.nih.gov/ij/list.html If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/Saving-a-stack-of-tif-images-with-long-filenames-tp5013132p5013136.html
To start a new topic under ImageJ, email [hidden email] To unsubscribe from ImageJ, click here. NAML |
Free forum by Nabble | Edit this page |