Skip to content

Commit

Permalink
optimized CC
Browse files Browse the repository at this point in the history
  • Loading branch information
ekatrukha committed May 1, 2024
1 parent ecaf13f commit 0f12c2d
Show file tree
Hide file tree
Showing 11 changed files with 526 additions and 26 deletions.
6 changes: 4 additions & 2 deletions src/main/java/averagingND/GenNormCC.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import net.imglib2.util.Intervals;
import net.imglib2.view.IntervalView;
import net.imglib2.view.Views;

@Deprecated
public class GenNormCC {

/** dimensionality of images **/
Expand Down Expand Up @@ -59,7 +59,9 @@ public class GenNormCC {
* the boundaries are always strange **/
final double max_fraction_shift = 0.9;

/**
/** //ImagePlus imageIn = IJ.openVirtual("/home/eugene/Desktop/projects/UnequalTiffs/BB/001f.tif");
//Img< FloatType >img = FloatTiffImgWrap.wrapVirtualFloat(imageIn, MiscUtils.getDimensionsTextImageJ(imageIn));
//ImageJFunctions.show(img, "test_raw");
* @param image
* @param template
*/
Expand Down
11 changes: 1 addition & 10 deletions src/main/java/averagingND/ImageSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
import ij.ImagePlus;
import ij.WindowManager;
import ij.measure.Calibration;
import io.scif.config.SCIFIOConfig;
import io.scif.config.SCIFIOConfig.ImgMode;
import io.scif.img.ImgOpener;
import io.scif.img.SCIFIOImgPlus;

import net.imglib2.Cursor;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.converter.Converter;
Expand All @@ -27,10 +24,6 @@
import net.imglib2.img.imageplus.ImagePlusImg;
import net.imglib2.img.imageplus.ImagePlusImgFactory;
import net.imglib2.type.Type;
import net.imglib2.type.numeric.ARGBType;
import net.imglib2.type.numeric.ComplexType;
import net.imglib2.type.numeric.integer.UnsignedByteType;
import net.imglib2.type.numeric.integer.UnsignedShortType;
import net.imglib2.type.numeric.real.FloatType;
import net.imglib2.view.Views;

Expand Down Expand Up @@ -153,8 +146,6 @@ boolean initializeFromOpenWindows()
return true;
}


@SuppressWarnings("unchecked")
boolean loadAllImages()
{
int i;
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/averagingND/IterativeAveraging.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ public void run(String paramString) {
processIntermediate(0);
}

GenNormCC normCC = new GenNormCC();
//GenNormCC normCC = new GenNormCC();
MaskedNormCC normCC = new MaskedNormCC();
normCC.bVerbose = false;
normCC.bZeroMask = bZeroMask;
normCC.lim_fractions = lim_fractions;
Expand Down Expand Up @@ -268,7 +269,8 @@ public void run(String paramString) {
//currAverageImg = removeOneAverage(sumAndCount,imgs_shift.get(i));
//ImageJFunctions.show(currAverageImg, "aver"+Integer.toString(i+1));
//removeOneAverage
normCC.caclulateGenNormCC(Views.zeroMin(currAverageImg), imageSet.imgs.get(i), false);
//normCC.caclulateGenNormCC(Views.zeroMin(currAverageImg), imageSet.imgs.get(i), false);
normCC.caclulateMaskedNormCC(Views.zeroMin(currAverageImg), imageSet.imgs.get(i), false);

avrgCC+=normCC.dMaxCC;
listCC[i]=normCC.dMaxCC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import net.imglib2.RealPositionable;
import net.imglib2.realtransform.InverseRealTransform;
import net.imglib2.realtransform.InvertibleRealTransform;
import net.imglib2.realtransform.PolarToCartesianTransform2D;


public class LogPolarToCartesianTransform2D implements InvertibleRealTransform
{
Expand Down
Loading

0 comments on commit 0f12c2d

Please sign in to comment.