Changeset 7897


Ignore:
Timestamp:
02/24/12 10:30:50 (7 years ago)
Author:
kbriney
Message:

Fixed FileName attribute of UUID tag so that it gives only the file name and not the entire file path with the name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/prairie-ome-tiff/src/main/java/loci/apps/prairie/PrairieInjector.java

    r7894 r7897  
    3535package loci.apps.prairie; 
    3636 
     37import java.io.File; 
    3738import java.util.HashMap; 
    3839import java.util.Map; 
     
    6364 
    6465  public static void main(String[] args) throws Exception { 
    65 args = new String[] { "C:\\Users\\Kristin\\Documents\\Dropbox\\LOCI\\TestingFiles\\23Feb2012\\Test1\\TIFF-001_Cycle001_CurrentSettings_Ch1_000001.tif" }; 
     66args = new String[] { "C:\\Users\\Kristin\\Documents\\Dropbox\\LOCI\\TestingFiles\\24Feb2012\\Test2\\TSeries-09022010-170_Cycle001_CurrentSettings_Ch1_000001.tif"};//\\TIFF-001_Cycle001_CurrentSettings_Ch1_000001.tif" }; 
    6667//    System.setProperty("plugins.dir", "C:\\Program Files (x86)\\ImageJ\\plugins"); 
    6768//    new ImageJ(); 
     
    137138      meta.setTiffDataFirstZ(new NonNegativeInteger(z), 0, tiffDataIndex); 
    138139      meta.setTiffDataFirstT(new NonNegativeInteger(t), 0, tiffDataIndex);   
    139       meta.setUUIDFileName(file, 0, tiffDataIndex); 
     140       
     141      File f = new File(file); 
     142      String fileName = f.getName(); 
     143      meta.setUUIDFileName(fileName, 0, tiffDataIndex); 
    140144      String uuid = "urn:uuid:" + UUID.randomUUID().toString(); 
    141145      meta.setUUIDValue(uuid, 0, tiffDataIndex); 
Note: See TracChangeset for help on using the changeset viewer.