Skip to content

Commit f5435e5

Browse files
committed
add DistributedAffineBlockSolverTestG
1 parent 0fcf8a9 commit f5435e5

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
package org.janelia.render.client.newsolver;
2+
3+
import java.io.IOException;
4+
import java.text.SimpleDateFormat;
5+
import java.util.ArrayList;
6+
import java.util.List;
7+
8+
import org.janelia.alignment.match.CanvasMatches;
9+
import org.janelia.alignment.spec.stack.StackMetaData;
10+
import org.janelia.alignment.util.LogbackTestTools;
11+
import org.janelia.render.client.RenderDataClient;
12+
13+
import static org.janelia.render.client.newsolver.DistributedAffineBlockSolverTest.*;
14+
15+
/**
16+
* Tests the {@link DistributedAffineBlockSolver} class.
17+
*/
18+
@SuppressWarnings({"SameParameterValue", "unused"})
19+
public class DistributedAffineBlockSolverTestG {
20+
21+
// --------------------------------------------------------------
22+
// The following methods support ad-hoc interactive testing with external render web services.
23+
// Consequently, they aren't included in the unit test suite.
24+
25+
private static final String SOURCE_STACK = "w60_s360_r00_gc_pa_mat_render";
26+
private static final List<Double> Z_VALUES_1 = List.of(1.0);
27+
private static final List<Double> Z_VALUES_2 = List.of(2.0);
28+
private static final String SOURCE_MATCH_COLLECTION = "w60_s360_r00_gc_pa_mat_render_match_cmB";
29+
30+
private static final boolean PRINT_PME_LINKS = false; // set to true to print Point Match Explorer links
31+
32+
// NOTE: project should differ from other tests, 'test_c...' instead of 'test_...'
33+
private static final String TEST_PROJECT = "test_g_mfov_as_tile";
34+
35+
private static final String TEST_G_Z1_STACK = "test_g_z1_mfovs";
36+
private static final String TEST_G_Z1_MATCH_COLLECTION = "test_g_z1_mfovs_match";
37+
38+
private static final String TEST_G_Z2_STACK = "test_g_z2_mfovs";
39+
private static final String TEST_G_Z2_MATCH_COLLECTION = "test_g_z2_mfovs_match";
40+
41+
public static void main(final String[] args) throws Exception {
42+
43+
// setupTestInputData(); // TODO: uncomment to setup test input data
44+
45+
final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
46+
final String alignSuffixWithTime = "_align_" + sdf.format(System.currentTimeMillis());
47+
48+
LogbackTestTools.setRootLogLevelToError(); // hide all logging
49+
50+
debugInconsistentAlignments(TEST_PROJECT,
51+
TEST_G_Z1_STACK,
52+
Z_VALUES_1,
53+
TEST_G_Z1_MATCH_COLLECTION,
54+
new char[]{'a'},
55+
alignSuffixWithTime,
56+
false);
57+
58+
debugInconsistentAlignments(TEST_PROJECT,
59+
TEST_G_Z2_STACK,
60+
Z_VALUES_2,
61+
TEST_G_Z2_MATCH_COLLECTION,
62+
new char[]{'a'},
63+
alignSuffixWithTime,
64+
false);
65+
}
66+
67+
@SuppressWarnings("unused")
68+
private static void setupTestInputData()
69+
throws IOException {
70+
71+
final RenderDataClient sourceDataClient = buildSourceProjectClient();
72+
final StackMetaData sourceStackMetaData = sourceDataClient.getStackMetaData(SOURCE_STACK);
73+
74+
setupStack(sourceDataClient, sourceStackMetaData, TEST_PROJECT, TEST_G_Z1_STACK, Z_VALUES_1, null);
75+
setupStack(sourceDataClient, sourceStackMetaData, TEST_PROJECT, TEST_G_Z2_STACK, Z_VALUES_2, null);
76+
77+
final RenderDataClient sourceMatchClient = buildClient(SOURCE_MATCH_COLLECTION);
78+
79+
List<CanvasMatches> sourceCmList = new ArrayList<>(sourceMatchClient.getMatchesWithPGroupId(String.valueOf(1.0),
80+
false));
81+
setupMatchCollection(sourceCmList, TEST_G_Z1_MATCH_COLLECTION,
82+
null, null, false, null);
83+
84+
sourceCmList = new ArrayList<>(sourceMatchClient.getMatchesWithPGroupId(String.valueOf(2.0),
85+
false));
86+
setupMatchCollection(sourceCmList, TEST_G_Z2_MATCH_COLLECTION,
87+
null, null, false, null);
88+
}
89+
90+
}

0 commit comments

Comments
 (0)