Skip to content

Commit dcc84e2

Browse files
committed
Translate some Python classes to Java
Thanks ChatGPT for the kickstart.
1 parent 30fb527 commit dcc84e2

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*-
2+
* #%L
3+
* Java bindings for itk-wasm.
4+
* %%
5+
* Copyright (C) 2023 ITK developers.
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package org.itk.wasm;
21+
22+
public class BinaryStream {
23+
public byte[] data;
24+
25+
public BinaryStream(byte[] data) {
26+
this.data = data;
27+
}
28+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*-
2+
* #%L
3+
* Java bindings for itk-wasm.
4+
* %%
5+
* Copyright (C) 2023 ITK developers.
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package org.itk.wasm;
21+
public enum InterfaceTypes {
22+
TextFile("InterfaceTextFile"),
23+
BinaryFile("InterfaceBinaryFile"),
24+
TextStream("InterfaceTextStream"),
25+
BinaryStream("InterfaceBinaryStream"),
26+
Image("InterfaceImage"),
27+
Mesh("InterfaceMesh"),
28+
PolyData("InterfacePolyData"),
29+
JsonObject("InterfaceJsonObject");
30+
31+
private String value;
32+
33+
private InterfaceTypes(String value) {
34+
this.value = value;
35+
}
36+
37+
public String getValue() {
38+
return value;
39+
}
40+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*-
2+
* #%L
3+
* Java bindings for itk-wasm.
4+
* %%
5+
* Copyright (C) 2023 ITK developers.
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package org.itk.wasm;
21+
22+
public class TextStream {
23+
public String data;
24+
25+
public TextStream(String data) {
26+
this.data = data;
27+
}
28+
}

0 commit comments

Comments
 (0)