/** Parses chunk data for header information. */ private void parseData() { int w = parser.parseInt(); int h = parser.parseInt(); int depth = parser.parseInt(1); ColorMode mode = ColorMode.fromData(parser.parseInt(1)); CompressionEngine compression = CompressionEngine.fromData(parser.parseInt(1)); FilterMethod filter = FilterMethod.fromData(parser.parseInt(1)); InterlaceMethod interlace = InterlaceMethod.fromData(parser.parseInt(1)); setProperties(w, h, depth, mode, compression, filter, interlace); }
/** * Creates the data byte array for this chunk. * * @return The data byte array. */ private byte[] createDataBytes() { ByteComposer composer = new ByteComposer(13); composer.composeInt(width); composer.composeInt(height); composer.composeInt(sampleDepth, 1); composer.composeInt(mode.dataValue(), 1); composer.composeInt(compressionEngine.dataValue(), 1); composer.composeInt(filterMethod.dataValue(), 1); composer.composeInt(interlaceMethod.dataValue(), 1); return composer.toArray(); }
@Override public void buildView(IModelForm form) { // Build the input parameters section. FormSection inputSection = form.addSection("Input", false); inputSection.addEntityComboField(_inputGrid, Grid3d.class); inputSection.addListSelectionField(_filterMethodProp.getKey(), FilterMethod.values()); FormSection parametersSection = form.addSection("Parameters", false); parametersSection.addTextField(_size); parametersSection.addTextBox(_kernelString); // Build the output parameters section. FormSection outputSection = form.addSection("Output", false); outputSection.addTextField(_outputGridName); outputSection.addTextBox(_outputComments); }
public int getNumFilters() { return FilterMethod.values().length; }