Skip to content

Commit c127cd5

Browse files
awalter17imagejan
authored andcommitted
Add default table service
1 parent 8e3bf8f commit c127cd5

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package net.imagej.table;
2+
3+
import java.util.List;
4+
5+
import net.imagej.Dataset;
6+
7+
import org.scijava.plugin.Plugin;
8+
import org.scijava.service.AbstractService;
9+
import org.scijava.service.Service;
10+
11+
@Plugin(type = Service.class)
12+
public class DefaultTableService extends AbstractService implements TableService{
13+
14+
@Override
15+
@SuppressWarnings("unchecked")
16+
public List<Table<?, ?>> getTables(Dataset img) {
17+
final Object tables = img.getProperties().get(TABLE_PROPERTY);
18+
if (tables != null && tables instanceof List)
19+
return (List<Table<?, ?>>) tables;
20+
return null;
21+
}
22+
23+
}

0 commit comments

Comments
 (0)