Skip to content

Commit

Permalink
Adopt universal label scheme z.id-rgn^z.id-rgn
Browse files Browse the repository at this point in the history
  • Loading branch information
billkarsh committed Feb 18, 2014
1 parent 81a52b0 commit ab20373
Show file tree
Hide file tree
Showing 57 changed files with 154 additions and 157 deletions.
11 changes: 4 additions & 7 deletions 00_DOC/HowTo_Montage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Inspect results

Each layer's montaging work is done within a folder 'temp0/z/montage' where z is a layer index.

Each montage job gets a master log file called 'temp0/z/montage/lsq.txt' as well as other reports in the montage folder listing suspicious results.
Each montage job gets a master log file called 'temp0/z/montage/lsqw_0.txt' as well as other reports in the montage folder listing suspicious results.

A quick summary report over all layers is obtained at the temp0 level using:

Expand All @@ -174,12 +174,9 @@ This creates 'MonSumy.txt' which shows for each layer's montage:
Fetch results
===============

Within each montage folder (temp0/z/montage) find key output files:
- MultLayAff.xml # TrakEM2 for this layer
- TAffineTable.txt # Table of affines labeled by {z,tile-id,rgn-id}.
Within each montage folder (temp0/z/montage) find key output folder:
- X_A_BIN # binary table of transforms and flags

To get an expanded version of TAffineTable.txt that links these data to other meta-data from the idb, you can cp/edit/run the script found at ???/Alignment_Projects/2_TFormTableEx/tformtableex.sht.

Currently this operates on one layer at a time.
This can be converted to text tables with tool ???/Alignment_Projects/1_XView/xvgo.sht.


4 changes: 2 additions & 2 deletions 0_GEN/Agenda.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ what's the interior.
matchparams, so one param file drives pipeline.

- MOS needs better name handling (that is, ween off of string labels
and onto idb z.id:rgn labels).
and onto idb z.id-rgn labels).

LSQ maybes:
- LSQ weight CPOINT by Q,R?
Expand Down Expand Up @@ -69,7 +69,7 @@ Saalfeld Notes:
recover correct connectivity in the cut zone by adding corr.
point pairs into the mix wherein the (x,y) coords are the same
for A::B, as are the {z,id} labels, but the rgn numbers differ.
For example: CPOINT2 z.id:1 x0 y0 z.id:2 x0 y0. Essentially, this
For example: CPOINT2 z.id-1 x0 y0 z.id-2 x0 y0. Essentially, this
describes a single point labelled two ways.

- In dmesh, when finding corr points across layers, use even more
Expand Down
2 changes: 1 addition & 1 deletion 0_GEN/CThmScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ void CThmScan::DebugAngs(
{
char file[256];

sprintf( file, "angs_%d_%d_@_%d_%d.log", alyr, atil, blyr, btil );
sprintf( file, "angs_%d.%d^%d.%d.log", alyr, atil, blyr, btil );
FILE *f = fopen( file, "w" );

fprintf( f, "Deg\tR\tX\tY\n" );
Expand Down
6 changes: 3 additions & 3 deletions 0_GEN/CTileSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static TiXmlElement* XMLGetTiles(
int rgn, col, row, cam;

if( 6 == sscanf( ptch->Attribute( "title" ),
"%d.%d:%d_%d.%d.%d",
"%d.%d-%d_%d.%d.%d",
&z, &til.id, &rgn,
&col, &row, &cam ) ) {

Expand Down Expand Up @@ -1052,11 +1052,11 @@ void CTileSet::WriteTrakEM2Layer(

if( U.col != -999 ) {

sprintf( title, "%d.%d:1_%d.%d.%d",
sprintf( title, "%d.%d-1_%d.%d.%d",
U.z, U.id, U.col, U.row, U.cam );
}
else
sprintf( title, "%d.%d:1", U.z, U.id );
sprintf( title, "%d.%d-1", U.z, U.id );

fprintf( f,
"\t\t\t<t2_patch\n"
Expand Down
22 changes: 11 additions & 11 deletions 0_GEN/PipeFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void OpenPairLog( int alr, int atl, int blr, int btl )
{
char slog[256];

sprintf( slog, "pair_%d_%d_@_%d_%d.log",
sprintf( slog, "pair_%d.%d^%d.%d.log",
alr, atl, blr, btl );

freopen( slog, "a", stdout );
Expand Down Expand Up @@ -1006,7 +1006,7 @@ bool ReadThmPair(

if( M.Get( name ) ) {

sprintf( name, "ThmPair_%d_@_%d.txt", alr, blr );
sprintf( name, "ThmPair_%d^%d.txt", alr, blr );
f = fopen( name, "r" );

if( f ) {
Expand All @@ -1026,7 +1026,7 @@ bool ReadThmPair(
"%d\t%d\t%d\t%d\t%d"
"\t%lf\t%lf"
"\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf",
&tpr.atl, &tpr.btl, &tpr.acr, &tpr.bcr, &tpr.err,
&tpr.atl, &tpr.acr, &tpr.btl, &tpr.bcr, &tpr.err,
&tpr.A, &tpr.R,
&tpr.T.t[0], &tpr.T.t[1], &tpr.T.t[2],
&tpr.T.t[3], &tpr.T.t[4], &tpr.T.t[5] );
Expand All @@ -1048,8 +1048,8 @@ bool ReadThmPair(
}

fprintf( flog,
"ReadThmPair: No entry for %d_%d@%d_%d; cr:%d-%d\n",
alr, atl, blr, btl, acr, bcr );
"ReadThmPair: No entry for %d.%d-%d^%d.%d-%d\n",
alr, atl, acr, blr, btl, bcr );
}
else
fprintf( flog, "ReadThmPair: Can't open [%s].\n", name );
Expand Down Expand Up @@ -1088,7 +1088,7 @@ bool ReadAllThmPair(

if( M.Get( name ) ) {

sprintf( name, "ThmPair_%d_@_%d.txt", alr, blr );
sprintf( name, "ThmPair_%d^%d.txt", alr, blr );
f = fopen( name, "r" );

if( f ) {
Expand All @@ -1110,7 +1110,7 @@ bool ReadAllThmPair(
"%d\t%d\t%d\t%d\t%d"
"\t%lf\t%lf"
"\t%lf\t%lf\t%lf\t%lf\t%lf\t%lf",
&P.atl, &P.btl, &P.acr, &P.bcr, &P.err,
&P.atl, &P.acr, &P.btl, &P.bcr, &P.err,
&P.A, &P.R,
&P.T.t[0], &P.T.t[1], &P.T.t[2],
&P.T.t[3], &P.T.t[4], &P.T.t[5] );
Expand Down Expand Up @@ -1140,7 +1140,7 @@ bool ReadAllThmPair(
void WriteThmPairHdr( FILE *f )
{
fprintf( f,
"Atl\tBtl\tAcr\tBcr\tErr\tDeg\tR"
"Atl\tAcr\tBtl\tBcr\tErr\tDeg\tR"
"\tT0\tT1\tX\tT3\tT4\tY\n" );
}

Expand All @@ -1166,7 +1166,7 @@ void CreateJobsDir(

// Create ThmPair file
if( zb >= 0 ) {
sprintf( name + len, "/ThmPair_%d_@_%d.txt", za, zb );
sprintf( name + len, "/ThmPair_%d^%d.txt", za, zb );
FILE *f = FileOpenOrDie( name, "w", flog );
WriteThmPairHdr( f );
fclose( f );
Expand All @@ -1193,15 +1193,15 @@ void WriteThmPair(

if( M.Get( name ) ) {

sprintf( name, "ThmPair_%d_@_%d.txt", alr, blr );
sprintf( name, "ThmPair_%d^%d.txt", alr, blr );
FILE *f = fopen( name, "a" );

if( f ) {
fprintf( f,
"%d\t%d\t%d\t%d\t%d"
"\t%f\t%f"
"\t%f\t%f\t%f\t%f\t%f\t%f\n",
atl, btl, acr, bcr, tpr.err,
atl, acr, btl, bcr, tpr.err,
tpr.A, tpr.R,
tpr.T.t[0], tpr.T.t[1], tpr.T.t[2],
tpr.T.t[3], tpr.T.t[4], tpr.T.t[5] );
Expand Down
4 changes: 2 additions & 2 deletions 0_GEN/PipeFiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ typedef struct {
// entry: ThmPair.txt
TAffine T;
double A, R;
int atl, btl,
acr, bcr,
int atl, acr,
btl, bcr,
err;
} ThmPair;

Expand Down
6 changes: 3 additions & 3 deletions 1_Clean_ThmPairs/cleanthmpair.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Reset all ThmPair_N_@_M.txt files to headers-only state
// Reset all ThmPair_N^M.txt files to headers-only state
// in given range [zmin,zmax]. Current dir must be 'temp'
// at execution time.
//
Expand Down Expand Up @@ -109,11 +109,11 @@ static void WriteOne( int a, int b )
char name[256];
FILE *f;

sprintf( name, "%d/ThmPair_%d_@_%d.txt", a, a, b );
sprintf( name, "%d/ThmPair_%d^%d.txt", a, a, b );

f = FileOpenOrDie( name, "w", flog );

fprintf( f, "Atl\tBtl\tAcr\tBcr\tErr\tDeg\tQ\tR"
fprintf( f, "Atl\tAcr\tBtl\tBcr\tErr\tDeg\tQ\tR"
"\tT0\tT1\tX\tT3\tT4\tY\n" );

fclose( f );
Expand Down
8 changes: 4 additions & 4 deletions 1_Cross_CarveBlocks/cross_carveblocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ static void WriteTestblockFile()
fprintf( f, "# -blkmincorr=0.45\t;required min corr for alignment\n" );
fprintf( f, "# -blknomcorr=0.50\t;nominal corr for alignment\n" );
fprintf( f, "# -xyconf=0.75\t\t;search radius = (1-xyconf)*blkwide\n" );
fprintf( f, "# -abdbg\t\t\t;make diagnostic images and exit (Z@Z-1)\n" );
fprintf( f, "# -abdbg=k\t\t\t;make diagnostic images and exit (Z@k)\n" );
fprintf( f, "# -abdbg\t\t\t;make diagnostic images and exit (Z^Z-1)\n" );
fprintf( f, "# -abdbg=k\t\t\t;make diagnostic images and exit (Z^k)\n" );
fprintf( f, "# -abctr=0\t\t\t;debug at this a-to-b angle\n" );
fprintf( f, "\n" );
fprintf( f, "\n" );
Expand Down Expand Up @@ -242,8 +242,8 @@ static void WriteSubblocksFile()
fprintf( f, "# -blkmincorr=0.45\t;required min corr for alignment\n" );
fprintf( f, "# -blknomcorr=0.50\t;nominal corr for alignment\n" );
fprintf( f, "# -xyconf=0.75\t\t;search radius = (1-xyconf)*blkwide\n" );
fprintf( f, "# -abdbg\t\t\t;make diagnostic images and exit (Z@Z-1)\n" );
fprintf( f, "# -abdbg=k\t\t\t;make diagnostic images and exit (Z@k)\n" );
fprintf( f, "# -abdbg\t\t\t;make diagnostic images and exit (Z^Z-1)\n" );
fprintf( f, "# -abdbg=k\t\t\t;make diagnostic images and exit (Z^k)\n" );
fprintf( f, "# -abctr=0\t\t\t;debug at this a-to-b angle\n" );
fprintf( f, "\n" );
fprintf( f, "\n" );
Expand Down
4 changes: 2 additions & 2 deletions 1_Cross_ThisBlock/cross_thisblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ static void WriteMakeFile(
T.FromAToB( T, b.T );

fprintf( f,
"\tptest %d/%d@%d/%d"
"\tptest %d.%d^%d.%d"
" -Tab=%f,%f,%f,%f,%f,%f%s ${EXTRA}\n\n",
a.z, a.id, b.z, b.id,
T.t[0], T.t[1], T.t[2], T.t[3], T.t[4], T.t[5],
Expand All @@ -905,7 +905,7 @@ static void WriteThumbFiles( const vector<BlkZ> &vZ )
continue;

char name[128];
sprintf( name, "ThmPair_%d_@_%d.txt", gDat.za, vZ[iz].Z );
sprintf( name, "ThmPair_%d^%d.txt", gDat.za, vZ[iz].Z );
FILE *f = FileOpenOrDie( name, "w", flog );
WriteThmPairHdr( f );
fclose( f );
Expand Down
4 changes: 2 additions & 2 deletions 1_Cross_ThisBlock/subblocks.sht
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# -blkmincorr=0.45 ;required min corr for alignment
# -blknomcorr=0.50 ;nominal corr for alignment
# -xyconf=0.75 ;search radius = (1-xyconf)*blkwide
# -abdbg ;make diagnostic images and exit (Z@Z-1)
# -abdbg=k ;make diagnostic images and exit (Z@k)
# -abdbg ;make diagnostic images and exit (Z^Z-1)
# -abdbg=k ;make diagnostic images and exit (Z^k)
# -abctr=0 ;debug at this a-to-b angle


Expand Down
4 changes: 2 additions & 2 deletions 1_Cross_ThisBlock/testblock.sht
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# -blkmincorr=0.45 ;required min corr for alignment
# -blknomcorr=0.50 ;nominal corr for alignment
# -xyconf=0.75 ;search radius = (1-xyconf)*blkwide
# -abdbg ;make diagnostic images and exit (Z@Z-1)
# -abdbg=k ;make diagnostic images and exit (Z@k)
# -abdbg ;make diagnostic images and exit (Z^Z-1)
# -abdbg=k ;make diagnostic images and exit (Z^k)
# -abctr=0 ;debug at this a-to-b angle


Expand Down
2 changes: 1 addition & 1 deletion 1_DMesh/ApproximateMatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
//
// Return true and add one entry to guesses if successful.
//
// Also, output an entry in the ThmPair_lyrA_@_lyrB.txt file.
// Also, output an entry in the ThmPair_lyrA^lyrB.txt file.
//
// Discussion
// ----------
Expand Down
2 changes: 1 addition & 1 deletion 1_DMesh/ApproximateMatch_NoCR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
// Return true and add one entry to guesses if successful.
//
// Also, output an entry in the ThmPair_lyrA_@_lyrB.txt file.
// Also, output an entry in the ThmPair_lyrA^lyrB.txt file.
//
// Discussion
// ----------
Expand Down
4 changes: 2 additions & 2 deletions 1_DMesh/CGBL_dmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ bool CGBL_dmesh::SetCmdLine( int argc, char* argv[] )
// Decode labels in key

if( !key ||
(4 != sscanf( key, "%d/%d@%d/%d",
(4 != sscanf( key, "%d.%d^%d.%d",
&A.z, &A.id,
&B.z, &B.id )) ) {

printf( "main: Usage: ptest <za/ia@zb/ib>.\n" );
printf( "main: Usage: ptest <za.ia^zb.ib>.\n" );
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion 1_DMesh/CThmUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ void CThmUtil::RecordSumSqDif( const TAffine &T )

if( M.Get( name ) ) {

sprintf( name, "SmSqDf_%d_@_%d.log", A.z, B.z );
sprintf( name, "SmSqDf_%d^%d.log", A.z, B.z );

FILE *f;
int is;
Expand Down
8 changes: 4 additions & 4 deletions 1_DMesh/dmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static void FitAffine(

fprintf( f,
"AFFINE"
" %d.%d:%d %d.%d:%d"
" %d.%d-%d %d.%d-%d"
" %f %f %f %f %f %f\n",
GBL.A.z, GBL.A.id, argn,
GBL.B.z, GBL.B.id, brgn,
Expand Down Expand Up @@ -342,7 +342,7 @@ static void FitHmgphy(

fprintf( f,
"HMGPHY"
" %d.%d:%d %d.%d:%d"
" %d.%d-%d %d.%d-%d"
" %f %f %f %f %f %f %.12g %.12g\n",
GBL.A.z, GBL.A.id, argn,
GBL.B.z, GBL.B.id, brgn,
Expand Down Expand Up @@ -530,8 +530,8 @@ static void WritePOINTEntries(

fprintf( f,
"CPOINT2"
" %d.%d:%d %f %f"
" %d.%d:%d %f %f\n",
" %d.%d-%d %f %f"
" %d.%d-%d %f %f\n",
GBL.A.z, GBL.A.id, ma, pa.x, pa.y,
GBL.B.z, GBL.B.id, mb, pb.x, pb.y );

Expand Down
2 changes: 1 addition & 1 deletion 1_LSQi/lsq_Layers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static int ThmPair( const struct dirent* E )

int za, zb;

if( 2 == sscanf( E->d_name, "ThmPair_%d_@_%d", &za, &zb )
if( 2 == sscanf( E->d_name, "ThmPair_%d^%d", &za, &zb )
&& za == _L->z ) {

_L->zdown.insert( zb );
Expand Down
8 changes: 4 additions & 4 deletions 1_LSQw/lsq_Dropout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ void* _Scan( void* ithr )
RealZIDR( z, i, r, iz, ir );

if( FLAG_ISREAD( R.flag[ir] ) ) {
fprintf( q, "R %d.%d:%d\n", z, i, r );
fprintf( q, "R %d.%d-%d\n", z, i, r );
++D.read;
}
else if( FLAG_ISPNTS( R.flag[ir] ) ) {
fprintf( q, "P %d.%d:%d\n", z, i, r );
fprintf( q, "P %d.%d-%d\n", z, i, r );
++D.pnts;
}
else if( FLAG_ISKILL( R.flag[ir] ) ) {
fprintf( q, "K %d.%d:%d\n", z, i, r );
fprintf( q, "K %d.%d-%d\n", z, i, r );
++D.kill;
}
else if( FLAG_ISCUTD( R.flag[ir] ) ) {
fprintf( q, "C %d.%d:%d\n", z, i, r );
fprintf( q, "C %d.%d-%d\n", z, i, r );
++D.cutd;
}
}
Expand Down
4 changes: 2 additions & 2 deletions 1_LSQw/lsq_Error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void Stat::Topn( FILE *f, int SorD ) const
RealZIDR( z1, i1, r1, C.z1, C.i1 );
RealZIDR( z2, i2, r2, C.z2, C.i2 );

fprintf( f, "\t%d.%d:%d^%d.%d:%d",
fprintf( f, "\t%d.%d-%d^%d.%d-%d",
z1, i1, r1, z2, i2, r2 );
}
}
Expand Down Expand Up @@ -517,7 +517,7 @@ void StatG::Topn( FILE *f, int SorD ) const

const EG& G = veg[i];

fprintf( f, "\t%d.%d:%d^%d.%d:%d",
fprintf( f, "\t%d.%d-%d^%d.%d-%d",
G.z1, G.i1, G.r1, G.z2, G.i2, G.r2 );
}
}
Expand Down
4 changes: 2 additions & 2 deletions 1_LSQw/lsq_Magnitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ void Stat::Topn( FILE *f, int SorB ) const

int z, i, r;
RealZIDR( z, i, r, vei[ie].iz, vei[ie].i );
fprintf( f, "\t%d.%d:%d", z, i, r );
fprintf( f, "\t%d.%d-%d", z, i, r );
}
}
else
Expand Down Expand Up @@ -383,7 +383,7 @@ void StatG::Topn( FILE *f, int SorB ) const

const EG& G = veg[i];

fprintf( f, "\t%d.%d:%d", G.z, G.i, G.r );
fprintf( f, "\t%d.%d-%d", G.z, G.i, G.r );
}
}
else
Expand Down
Loading

0 comments on commit ab20373

Please sign in to comment.