Skip to content

Commit 37b7dea

Browse files
fixed filename addition
1 parent 48623c3 commit 37b7dea

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/main/java/net/preibisch/mvrecon/process/export/Save3dTIFF.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class Save3dTIFF implements ImgExport, Calibrateable
5050
{
5151
public static boolean defaultUseXMLPath = true;
5252
public static String defaultPath = null;
53-
public static String defaultFN = "exp";
53+
public static String defaultFN = "";
5454

5555
String path, fnAddition;
5656
boolean compress;
@@ -85,11 +85,17 @@ public < T extends RealType< T > & NativeType< T > > boolean exportImage(
8585
public String getFileName( final String title )
8686
{
8787
String fileName;
88+
String add;
89+
90+
if ( fnAddition.length() > 0 )
91+
add = fnAddition + "_";
92+
else
93+
add = "";
8894

8995
if ( !title.endsWith( ".tif" ) )
90-
fileName = new File( path, fnAddition + "_" + title + ".tif" ).getAbsolutePath();
96+
fileName = new File( path, add + title + ".tif" ).getAbsolutePath();
9197
else
92-
fileName = new File( path, title ).getAbsolutePath();
98+
fileName = new File( path, add + title ).getAbsolutePath();
9399

94100
if ( compress )
95101
return fileName + ".zip";
@@ -192,7 +198,7 @@ public boolean queryParameters( final FusionExportInterface fusion )
192198
return false;
193199

194200
this.path = defaultPath = gd.getNextString().trim();
195-
this.fnAddition = defaultFN = gd.getNextString();
201+
this.fnAddition = defaultFN = gd.getNextString().trim();
196202
this.compress = Resave_TIFF.defaultCompress = gd.getNextBoolean();
197203

198204
return true;

0 commit comments

Comments
 (0)