SWC-Advanced-Microscopy / StitchIt

Stitching of large tiled datasets
GNU Lesser General Public License v3.0
17 stars 7 forks source link

Write a stitching quality checker #149

Open raacampbell opened 5 years ago

raacampbell commented 5 years ago

It would be easier to have a MATLAB tool to preview the stitched images instead of loading in Icy. I envisage something like this:

>> im = stitchSection([1,1],1,'chessboard',true); %does not save to disk
>> stitcherChecker(im,thresholdForDisplay) %Bring up RGB

% re-stitch with different params

>> im = stitchSection([1,1],1,'chessboard',true); %does not save to disk
>> stitcherChecker(im,thresholdForDisplay) %Bring up second image and link axes to first

% Etc
raacampbell commented 5 years ago

It could work as follows: New function, chessboard, takes section and channel name. Stitches chessboard and returns image and structure with stitching parameters. This includes section and channel. If this is then fed back into chessboard, the same section is restitched. Modifying parameters alters stitch. The images can be visualised with the viewer tool. An output string to place into parameter files can be made.

raacampbell commented 5 years ago

cfbaa284805d0fd593f578b9fc736de910f80f6c We now have:

>> im=chessboardStitch([17,1],3);
>> im.params.voxelSize
ans = 
  struct with fields:

    X: 0.6730
    Y: 0.6580
    Z: 5

% Restitch with different Y voxel size
>> P=im.params;
>> P.params.voxelSize.Y=0.66;
>> im(2)=chessboardStitch([17,1],3,P);

% Compare the two images
>> exploreChessBoard(im)

This largely works but MATLAB is slow at panning and zooming larger images. Of course. The above currently does two subplots in one figure. Maybe separate figs are better?

raacampbell commented 5 years ago

With tool from BakingTray can do:

>> P.affineMat=affineMatGen('shear',[0,0.014],'rot',0.05);