Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
ee518dda
Commit
ee518dda
authored
12 years ago
by
felmer
Browse files
Options
Downloads
Patches
Plain Diff
add menu item 'Counts Feature Vectors'.
SVN: 28612
parent
19d829c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/api/v1/ScreeningClientApiTester.java
+37
-1
37 additions, 1 deletion
...gin/screening/client/api/v1/ScreeningClientApiTester.java
with
37 additions
and
1 deletion
screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/api/v1/ScreeningClientApiTester.java
+
37
−
1
View file @
ee518dda
...
@@ -54,10 +54,14 @@ import javax.swing.text.JTextComponent;
...
@@ -54,10 +54,14 @@ import javax.swing.text.JTextComponent;
import
org.apache.log4j.PropertyConfigurator
;
import
org.apache.log4j.PropertyConfigurator
;
import
ch.systemsx.cisd.common.ssl.SslCertificateHelper
;
import
ch.systemsx.cisd.openbis.dss.client.api.v1.IDataSetDss
;
import
ch.systemsx.cisd.openbis.dss.client.api.v1.IDataSetDss
;
import
ch.systemsx.cisd.openbis.generic.shared.api.v1.filter.TypeBasedDataSetFilter
;
import
ch.systemsx.cisd.openbis.generic.shared.api.v1.filter.TypeBasedDataSetFilter
;
import
ch.systemsx.cisd.openbis.plugin.screening.client.api.v1.ScreeningOpenbisServiceFacade.IImageOutputStreamProvider
;
import
ch.systemsx.cisd.openbis.plugin.screening.client.api.v1.ScreeningOpenbisServiceFacade.IImageOutputStreamProvider
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.ExperimentIdentifier
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.ExperimentIdentifier
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.FeatureVector
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.FeatureVectorDataset
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.FeatureVectorDatasetReference
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.IDatasetIdentifier
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.IDatasetIdentifier
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.ImageDatasetReference
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.ImageDatasetReference
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.ImageSize
;
import
ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.ImageSize
;
...
@@ -190,6 +194,16 @@ public class ScreeningClientApiTester
...
@@ -190,6 +194,16 @@ public class ScreeningClientApiTester
listPlates
();
listPlates
();
}
}
});
});
JMenuItem
listFeatureVectorsMenuItem
=
new
JMenuItem
(
"Counts Feature Vectors"
);
callApiMenu
.
add
(
listFeatureVectorsMenuItem
);
listFeatureVectorsMenuItem
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
loadFeatureVectors
();
}
});
}
}
void
setUp
(
String
[]
args
)
void
setUp
(
String
[]
args
)
...
@@ -197,9 +211,11 @@ public class ScreeningClientApiTester
...
@@ -197,9 +211,11 @@ public class ScreeningClientApiTester
setVisible
(
true
);
setVisible
(
true
);
if
(
args
.
length
==
3
)
if
(
args
.
length
==
3
)
{
{
String
serverUrl
=
args
[
2
];
SslCertificateHelper
.
trustAnyCertificate
(
serverUrl
);
facade
=
facade
=
ScreeningOpenbisServiceFacadeFactory
.
INSTANCE
.
tryToCreate
(
args
[
0
],
args
[
1
],
ScreeningOpenbisServiceFacadeFactory
.
INSTANCE
.
tryToCreate
(
args
[
0
],
args
[
1
],
args
[
2
]
);
serverUrl
);
}
else
}
else
{
{
Form
form
=
new
Form
(
this
,
"Connection to openBIS"
);
Form
form
=
new
Form
(
this
,
"Connection to openBIS"
);
...
@@ -320,6 +336,26 @@ public class ScreeningClientApiTester
...
@@ -320,6 +336,26 @@ public class ScreeningClientApiTester
JOptionPane
.
showMessageDialog
(
this
,
"Plates: "
+
plates
);
JOptionPane
.
showMessageDialog
(
this
,
"Plates: "
+
plates
);
}
}
private
void
loadFeatureVectors
()
{
List
<
Plate
>
plates
=
facade
.
listPlates
();
List
<
FeatureVectorDatasetReference
>
featureDatasets
=
facade
.
listFeatureVectorDatasets
(
plates
);
long
t0
=
System
.
currentTimeMillis
();
List
<
FeatureVectorDataset
>
features
=
facade
.
loadFeatures
(
featureDatasets
,
null
);
long
duration
=
System
.
currentTimeMillis
()
-
t0
;
int
featureVectors
=
0
;
int
featureColumns
=
0
;
for
(
FeatureVectorDataset
featureVectorDataSet
:
features
)
{
List
<
FeatureVector
>
featureVector
=
featureVectorDataSet
.
getFeatureVectors
();
featureColumns
+=
featureVectorDataSet
.
getFeatureCodes
().
size
();
featureVectors
+=
featureVector
.
size
();
}
JOptionPane
.
showMessageDialog
(
this
,
plates
.
size
()
+
" Plates\n"
+
features
.
size
()
+
" Feature Data Sets\n"
+
featureVectors
+
" Feature Vectors\n"
+
featureColumns
+
" Features\ntook "
+
duration
+
" msec"
);
}
private
void
loadImagesByDataSetCode
()
private
void
loadImagesByDataSetCode
()
{
{
Form
form
=
new
Form
(
this
,
"Parameters for Loading Images by Data Set"
);
Form
form
=
new
Form
(
this
,
"Parameters for Loading Images by Data Set"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment