Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
c1f185a6
Commit
c1f185a6
authored
Nov 26, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
acquired all channel images
parent
d93d350f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
CalibrationHardwareInterface.java
src/main/java/CalibrationHardwareInterface.java
+7
-3
No files found.
src/main/java/CalibrationHardwareInterface.java
View file @
c1f185a6
...
@@ -287,7 +287,7 @@ public class CalibrationHardwareInterface {
...
@@ -287,7 +287,7 @@ public class CalibrationHardwareInterface {
for
(
int
i
=
0
;
i
<
this
.
cameraIPs
.
length
;
i
++){
for
(
int
i
=
0
;
i
<
this
.
cameraIPs
.
length
;
i
++){
int
ip_index
=
ip_ports_list
.
get
(
i
)>>
2
;
int
ip_index
=
ip_ports_list
.
get
(
i
)>>
2
;
int
sensor_port
=
ip_ports_list
.
get
(
i
)
&
3
;
int
sensor_port
=
ip_ports_list
.
get
(
i
)
&
3
;
this
.
cameraIPs
[
i
]
=
this
.
cameraSubnet
+(
this
.
iBaseIP
+
ip_index
)
+
":"
+
sensor_port
;
this
.
cameraIPs
[
i
]
=
this
.
cameraSubnet
+(
this
.
iBaseIP
+
ip_index
)
+
":"
+
(
this
.
imgsrvPort
+
sensor_port
)
;
for
(
int
j
=
0
;
j
<
this
.
channelMap
.
length
;
j
++){
for
(
int
j
=
0
;
j
<
this
.
channelMap
.
length
;
j
++){
if
((
this
.
channelMap
[
j
][
0
]
==
ip_index
)
&&
(
this
.
channelMap
[
j
][
2
]
==
sensor_port
))
{
if
((
this
.
channelMap
[
j
][
0
]
==
ip_index
)
&&
(
this
.
channelMap
[
j
][
2
]
==
sensor_port
))
{
this
.
channelIPPort
[
j
]
=
i
;
this
.
channelIPPort
[
j
]
=
i
;
...
@@ -1258,7 +1258,8 @@ public class CalibrationHardwareInterface {
...
@@ -1258,7 +1258,8 @@ public class CalibrationHardwareInterface {
boolean
[]
IPs
=
new
boolean
[
this
.
cameraIPs
.
length
];
boolean
[]
IPs
=
new
boolean
[
this
.
cameraIPs
.
length
];
for
(
int
i
=
0
;
i
<
IPs
.
length
;
i
++)
IPs
[
i
]=
false
;
for
(
int
i
=
0
;
i
<
IPs
.
length
;
i
++)
IPs
[
i
]=
false
;
for
(
int
i
=
0
;
i
<
selectCameras
.
length
;
i
++)
if
(
i
<
this
.
channelMap
.
length
)
{
for
(
int
i
=
0
;
i
<
selectCameras
.
length
;
i
++)
if
(
i
<
this
.
channelMap
.
length
)
{
IPs
[
this
.
channelMap
[
i
][
0
]]=
true
;
// IPs[this.channelMap[i][0]]=true;
IPs
[
this
.
channelIPPort
[
i
]]
=
true
;
// since NC393
}
}
return
IPs
;
return
IPs
;
}
}
...
@@ -1439,7 +1440,7 @@ public class CalibrationHardwareInterface {
...
@@ -1439,7 +1440,7 @@ public class CalibrationHardwareInterface {
public
void
run
()
{
public
void
run
()
{
for
(
int
ipIndex
=
ipIndexAtomic
.
getAndIncrement
();
ipIndex
<
ipLength
;
ipIndex
=
ipIndexAtomic
.
getAndIncrement
()){
for
(
int
ipIndex
=
ipIndexAtomic
.
getAndIncrement
();
ipIndex
<
ipLength
;
ipIndex
=
ipIndexAtomic
.
getAndIncrement
()){
// for (int i=0;i<this.imagesIP.length;i++){
// for (int i=0;i<this.imagesIP.length;i++){
if
(
debugLevel
>
2
)
System
.
out
.
println
(
"getImages()3: ipIndex="
+
ipIndex
+
" acquireIPs.length="
+
acquireIPs
.
length
+
if
(
debugLevel
>
1
/*2*/
)
System
.
out
.
println
(
"getImages()3: ipIndex="
+
ipIndex
+
" acquireIPs.length="
+
acquireIPs
.
length
+
((
ipIndex
<
acquireIPs
.
length
)?
(
" acquireIPs[ipIndex]="
+
acquireIPs
[
ipIndex
]):
""
));
((
ipIndex
<
acquireIPs
.
length
)?
(
" acquireIPs[ipIndex]="
+
acquireIPs
[
ipIndex
]):
""
));
if
((
ipIndex
<
acquireIPs
.
length
)
&&
acquireIPs
[
ipIndex
])
{
if
((
ipIndex
<
acquireIPs
.
length
)
&&
acquireIPs
[
ipIndex
])
{
if
(
debugLevel
>
2
)
System
.
out
.
println
(
"getImages:"
+
imageURLs
[
ipIndex
]
);
if
(
debugLevel
>
2
)
System
.
out
.
println
(
"getImages:"
+
imageURLs
[
ipIndex
]
);
...
@@ -1480,6 +1481,7 @@ public class CalibrationHardwareInterface {
...
@@ -1480,6 +1481,7 @@ public class CalibrationHardwareInterface {
final
int
[]
channelIPPort
=
this
.
channelIPPort
;
final
int
[]
channelIPPort
=
this
.
channelIPPort
;
final
AtomicInteger
imageIndexAtomic
=
new
AtomicInteger
(
0
);
final
AtomicInteger
imageIndexAtomic
=
new
AtomicInteger
(
0
);
final
int
[]
motorsPosition
=
this
.
motorsPosition
;
final
int
[]
motorsPosition
=
this
.
motorsPosition
;
for
(
int
ithread
=
0
;
ithread
<
threads
.
length
;
ithread
++)
{
for
(
int
ithread
=
0
;
ithread
<
threads
.
length
;
ithread
++)
{
threads
[
ithread
]
=
new
Thread
()
{
threads
[
ithread
]
=
new
Thread
()
{
public
void
run
()
{
public
void
run
()
{
...
@@ -1497,6 +1499,7 @@ public class CalibrationHardwareInterface {
...
@@ -1497,6 +1499,7 @@ public class CalibrationHardwareInterface {
boolean
singleSensor
=
true
;
boolean
singleSensor
=
true
;
for
(
int
s
=
0
;
s
<
sensorPresent
[
iIP
].
length
;
s
++)
singleSensor
&=
!
sensorPresent
[
iIP
][
s
];
for
(
int
s
=
0
;
s
<
sensorPresent
[
iIP
].
length
;
s
++)
singleSensor
&=
!
sensorPresent
[
iIP
][
s
];
if
(
singleSensor
){
// no 10359 multiplexor
if
(
singleSensor
){
// no 10359 multiplexor
if
(
debugLevel
>
1
)
System
.
out
.
println
(
"DEBUG393: demuxing single sensor imageIndex="
+
imageIndex
+
" iIP="
+
iIP
);
images
[
imageIndex
]=
jp4_Instance
.
demuxClone
(
imagesIP
[
iIP
]);
images
[
imageIndex
]=
jp4_Instance
.
demuxClone
(
imagesIP
[
iIP
]);
}
else
{
}
else
{
int
subCam
=
channelMap
[
imageIndex
][
1
];
int
subCam
=
channelMap
[
imageIndex
][
1
];
...
@@ -1506,6 +1509,7 @@ public class CalibrationHardwareInterface {
...
@@ -1506,6 +1509,7 @@ public class CalibrationHardwareInterface {
}
}
// skip missing channels, then demux
// skip missing channels, then demux
for
(
int
s
=
0
;
s
<
channelMap
[
imageIndex
][
1
];
s
++)
if
(!
sensorPresent
[
iIP
][
s
])
subCam
--;
for
(
int
s
=
0
;
s
<
channelMap
[
imageIndex
][
1
];
s
++)
if
(!
sensorPresent
[
iIP
][
s
])
subCam
--;
if
(
debugLevel
>
1
)
System
.
out
.
println
(
"DEBUG393: demuxing imageIndex="
+
imageIndex
+
" iIP="
+
iIP
+
" subCam="
+
subCam
);
images
[
imageIndex
]=
jp4_Instance
.
demuxImage
(
imagesIP
[
iIP
],
subCam
);
images
[
imageIndex
]=
jp4_Instance
.
demuxImage
(
imagesIP
[
iIP
],
subCam
);
}
}
// this.images[i]=this.jp4_Instances[j].demuxImageOrClone(this.imagesIP[j],this.channelMap[i][1]);
// this.images[i]=this.jp4_Instances[j].demuxImageOrClone(this.imagesIP[j],this.channelMap[i][1]);
...
...
Write
Preview
Markdown
is supported
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