Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Seismic
Open VDS
Commits
d8929d0a
Commit
d8929d0a
authored
Nov 01, 2021
by
Jørgen Lind
Browse files
Make it possible to run Java OpenVDSDemo with url and connection parameter
parent
42fb28ab
Pipeline
#74939
passed with stages
in 20 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
java/java/demo/OpenVdsDemo.java
View file @
d8929d0a
...
...
@@ -33,6 +33,15 @@ public class OpenVdsDemo {
}
static
void
process
(
String
[]
args
)
throws
Exception
{
String
url
=
null
;
String
connection
=
null
;
for
(
int
i
=
1
;
i
<
args
.
length
;
i
+=
2
)
{
if
(
args
[
i
].
equals
(
"--url"
))
url
=
args
[
i
+
1
];
if
(
args
[
i
].
equals
(
"--connection"
))
connection
=
args
[
i
+
1
];
}
int
output_width
=
1000
;
int
output_height
=
1000
;
int
axis_position
=
Integer
.
MIN_VALUE
;
...
...
@@ -41,13 +50,22 @@ public class OpenVdsDemo {
int
nXSamples
=
64
,
nYSamples
=
64
,
nZSamples
=
64
;
VolumeDataChannelDescriptor
.
Format
format
=
VolumeDataChannelDescriptor
.
Format
.
FORMAT_U8
;
System
.
out
.
println
(
"Create MemoryVdsGenerator..."
);
MemoryVdsGenerator
generator
=
new
MemoryVdsGenerator
(
nXSamples
,
nYSamples
,
nZSamples
,
format
);
VdsHandle
vds
;
if
(
url
!=
null
&&
!
url
.
isEmpty
())
{
System
.
out
.
println
(
"Open existing VDS with: "
+
url
);
vds
=
OpenVDS
.
open
(
url
,
connection
);
}
else
{
System
.
out
.
println
(
"Create MemoryVdsGenerator..."
);
vds
=
new
MemoryVdsGenerator
(
nXSamples
,
nYSamples
,
nZSamples
,
format
);
}
VolumeDataLayout
layout
=
generator
.
getLayout
();
VolumeDataLayout
layout
=
vds
.
getLayout
();
printLayout
(
layout
);
VolumeDataAccessManager
accessManager
=
generator
.
getAccessManager
();
VolumeDataAccessManager
accessManager
=
vds
.
getAccessManager
();
int
[]
axis_mapper
=
{
0
,
1
,
2
};
int
[]
sampleCount
=
new
int
[
3
];
...
...
@@ -105,7 +123,7 @@ public class OpenVdsDemo {
// Test of finalization. Normally manual call of release() is not needed:
// it is called from JniPointer.finalize()
System
.
out
.
println
(
"Release objects..."
);
generator
.
release
();
vds
.
release
();
System
.
out
.
println
(
"Finished"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment