Skip to content
Snippets Groups Projects
Commit 573d371b authored by Mark Winter's avatar Mark Winter
Browse files

Added workaround message for x-dimension issue

parent 60289fff
Branches
No related tags found
No related merge requests found
...@@ -188,18 +188,23 @@ public class LeverscIJ implements PlugInFilter ...@@ -188,18 +188,23 @@ public class LeverscIJ implements PlugInFilter
// Keep original format around to help with conversion // Keep original format around to help with conversion
imType = image.getType(); imType = image.getType();
int nslice = image.getNSlices(); imMeta = load_metadata();
if ( nslice <= 1 ) if ( imMeta.Dimensions[2] <= 1 )
{ {
IJ.error("Invalid Image", "Leversc does not support 2D images!");; IJ.error("Invalid Image", "Leversc does not support 2D images!");;
return; return;
} }
if ( ((imMeta.NumberOfChannels*imMeta.Dimensions[0]) % 4) != 0 )
{
IJ.error(String.format("The x dimension of images must be divisible by 4.\n We are working to handle this in LEVERSC directly.\n A workaround is to pad the image's x dimension to a multiple of 4."));
return;
}
int fignum = get_figunum(); int fignum = get_figunum();
if ( fignum <= 0 ) if ( fignum <= 0 )
return; return;
imMeta = load_metadata();
if ( !init_leversc(fignum) ) if ( !init_leversc(fignum) )
{ {
Path logpath = Paths.get(PlatformInfo.getUserHome(),".lever"); Path logpath = Paths.get(PlatformInfo.getUserHome(),".lever");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment