public class OMEROImportFixture extends Object
OMEROMetadataStoreClient client = new OMEROMetadataStoreClient(sf); OMEROImportFixture fixture = new OMEROImportFixture(client); fixture.setUp(); fixture.setFile(ResourceUtils.getFile("classpath:tinyTest.d3d.dv")); fixture.setName(name); fixture.doImport(); List<Pixels> p = fixture.getPixels(); fixture.tearDown(); i.setName(name); i = userSave(i);This class is not thread safe.
OMEROMetadataStoreClient
Modifier and Type | Field and Description |
---|---|
protected OMEROMetadataStoreClient |
store |
Constructor and Description |
---|
OMEROImportFixture(OMEROMetadataStoreClient store,
OMEROWrapper reader) |
Modifier and Type | Method and Description |
---|---|
void |
doImport()
runs import by looping through all files and then calling:
ImportLibrary#open(String)
ImportLibrary#calculateImageCount(String)
ImportLibrary#importMetadata()
ImportLibrary#importData(long, String, ome.formats.testclient.ImportLibrary.Step)
|
List<omero.model.Pixels> |
fullImport(File f,
String name)
Provides one complete import cycle.
|
List<omero.model.Pixels> |
getPixels()
Accessor for the created pixels.
|
void |
setFile(File file) |
void |
setName(String name) |
void |
setUp()
checks for the necessary fields and initializes the
ImportLibrary |
void |
tearDown()
sets
ImportLibrary , OMEROMetadataStore , and file array to
null. |
protected OMEROMetadataStoreClient store
public OMEROImportFixture(OMEROMetadataStoreClient store, OMEROWrapper reader)
public void setUp() throws Exception
ImportLibrary
Exception
public void tearDown()
ImportLibrary
, OMEROMetadataStore
, and file array to
null. Also attempts to call FormatReader.close()
.public List<omero.model.Pixels> fullImport(File f, String name) throws Exception
Exception
public void doImport() throws Exception
ImportLibrary#open(String)
ImportLibrary#calculateImageCount(String)
ImportLibrary#importMetadata()
ImportLibrary#importData(long, String, ome.formats.testclient.ImportLibrary.Step)
step
- an action to take per plane. not null.Exception
public void setFile(File file)
public void setName(String name)
public List<omero.model.Pixels> getPixels() throws Exception
doImport()
Exception
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.