01: package it.geosolutions.imageio.plugins.jhdf;
02:
03: import ncsa.hdf.object.Datatype;
04:
05: public class SubDatasetInfo {
06: private String name;
07: private int rank;
08: private long[] dims;
09: private long[] chunkSize;
10: private Datatype datatype;
11:
12: public SubDatasetInfo(final String name, final int rank,
13: long[] subDatasetDims, long[] subDatasetChunkSize,
14: final Datatype datatype) {
15: if (subDatasetDims.length != rank)
16: throw new RuntimeException(
17: "Wrong SubDatasetInfo initialization. subDatasetDims length != rank");
18: this .name = name;
19: this .dims = subDatasetDims;
20: this .rank = rank;
21: this .datatype = datatype;
22: this .chunkSize = subDatasetChunkSize;
23: }
24:
25: public long[] getChunkSize() {
26: return chunkSize;
27: }
28:
29: public void setChunkSize(long[] chunkSize) {
30: this .chunkSize = chunkSize;
31: }
32:
33: public long[] getDims() {
34: return dims;
35: }
36:
37: public void setDims(long[] dims) {
38: this .dims = dims;
39: }
40:
41: public final String getName() {
42: return name;
43: }
44:
45: public void setName(final String name) {
46: this .name = name;
47: }
48:
49: public final int getRank() {
50: return rank;
51: }
52:
53: public void setRank(final int rank) {
54: this .rank = rank;
55: }
56:
57: public Datatype getDatatype() {
58: return datatype;
59: }
60:
61: public void setDatatype(final Datatype datatype) {
62: this .datatype = datatype;
63: }
64:
65: public int getWidth() {
66: return (int) dims[rank - 1];
67: }
68:
69: public int getHeight() {
70: return (int) dims[rank - 2];
71: }
72: }
|