![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
Save Data Browser Selection as TIFF Files
![](/sites/default/files/styles/thumbnail/public/default_images/Artboard%201_1.png?itok=jeHOCIXy)
![](/profiles/wavemetrics/themes/wavemetrics/images/icons/employee-icon.png)
hrodstein
// SaveDataBrowserSelectionAsTIFF(pathName)
// This function saves each 2D wave selected in the Data Browser as a TIFF file
// with a ".tif" extension.
// pathName is the name of an Igor symbolic path or "" to get a dialog.
// WARNING: Overwrites pre-existing files with conflicting names.
Function SaveDataBrowserSelectionAsTIFF(pathName)
String pathName // Name of an Igor symbolic path or "" to get a dialog
if (strlen(pathName) == 0)
NewPath/O/M="Choose a folder for saving TIFFs" SaveIndexedTIFFPath
if (V_flag != 0)
return -1 // User cancelled
endif
pathName = "SaveIndexedTIFFPath"
endif
Variable index = 0
do
String path = GetBrowserSelection(index)
if (strlen(path) == 0)
break
endif
Wave w = $path
if (WaveDims(w) == 2)
String fileName = NameOfWave(w) + ".tif"
ImageSave /O /T="TIFF" /P=$pathName w as fileName
endif
index += 1
while(1)
End
// This function saves each 2D wave selected in the Data Browser as a TIFF file
// with a ".tif" extension.
// pathName is the name of an Igor symbolic path or "" to get a dialog.
// WARNING: Overwrites pre-existing files with conflicting names.
Function SaveDataBrowserSelectionAsTIFF(pathName)
String pathName // Name of an Igor symbolic path or "" to get a dialog
if (strlen(pathName) == 0)
NewPath/O/M="Choose a folder for saving TIFFs" SaveIndexedTIFFPath
if (V_flag != 0)
return -1 // User cancelled
endif
pathName = "SaveIndexedTIFFPath"
endif
Variable index = 0
do
String path = GetBrowserSelection(index)
if (strlen(path) == 0)
break
endif
Wave w = $path
if (WaveDims(w) == 2)
String fileName = NameOfWave(w) + ".tif"
ImageSave /O /T="TIFF" /P=$pathName w as fileName
endif
index += 1
while(1)
End
![](/sites/default/files/forum.png)
Forum
![](/sites/default/files/support.png)
Support
![](/sites/default/files/gallery.png)
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More