src/main/java/org/stowers/microscopy/ijplugins/utils/NucleusPixels.java
protected void makePatch() {

        int w = xmax - xmin + 1;
        int h = ymax - ymin + 1;

        patchPixels= new float[w*h];

        for (int i = 0; i < patchPixels.length; i++) {
            patchPixels[i] = (float)mean;
        }
        for (Map.Entry<Integer, Double> entry : sortedMap.entrySet()) {
            int index0 = entry.getKey();
            int x0 = index0 %  ipWidth;
            int y0 = index0 / ipWidth;

            int x = x0 - xmin;
            int y = y0 - ymin;
            int index = y*w + x;

            float v = entry.getValue().floatValue();
//            System.out.println(x0 + " " + y0 + " " + index0 + " " + x + " " + y + " " + index + " " + w + " " + h);
            patchPixels[index] = v;
        }
        patchIp = new FloatProcessor(w, h, patchPixels);
        String z = Long.toString(System.currentTimeMillis());

    }
/* Make an image out of the pixels from the segmented regions
     Use the class variables to so this
     */
Make an image out of the pixels from the segmented regions
Use the class variables to so this
Make an image out of the pixels from the segmented regions Use the class variables to so this
protected void makePatch() {
        int w = xmax - xmin + 1;
        int h = ymax - ymin + 1;
        patchPixels= new float[w*h];
        for (int i = 0; i < patchPixels.length; i++) {
            patchPixels[i] = (float)mean;
        }
        for (Map.Entry<Integer, Double> entry : sortedMap.entrySet()) {
            int index0 = entry.getKey();
            int x0 = index0 %  ipWidth;
            int y0 = index0 / ipWidth;
            int x = x0 - xmin;
            int y = y0 - ymin;
            int index = y*w + x;
            float v = entry.getValue().floatValue();
            patchPixels[index] = v;
        }
        patchIp = new FloatProcessor(w, h, patchPixels);
        String z = Long.toString(System.currentTimeMillis());
    }
protected void makePatch ( ) { int w = xmax - xmin + 1 ; int h = ymax - ymin + 1 ; patchPixels = new float [ w * h ] ; for ( int i = 0 ; i < patchPixels . length ; i ++ ) { patchPixels [ i ] = ( float ) mean ; } for ( Map . Entry < Integer , Double > entry : sortedMap . entrySet ( ) ) { int index0 = entry . getKey ( ) ; int x0 = index0 % ipWidth ; int y0 = index0 / ipWidth ; int x = x0 - xmin ; int y = y0 - ymin ; int index = y * w + x ; float v = entry . getValue ( ) . floatValue ( ) ; patchPixels [ index ] = v ; } patchIp = new FloatProcessor ( w , h , patchPixels ) ; String z = Long . toString ( System . currentTimeMillis ( ) ) ; }
Make an image out of the pixels from the segmented regions
Use the class variables to so this
Make an image out of the pixels from the segmented regions Use the class variables to so this
//            System.out.println(x0 + " " + y0 + " " + index0 + " " + x + " " + y + " " + index + " " + w + " " + h);