Ignore:
Timestamp:
12/20/11 23:56:21 (8 years ago)
Author:
aivar
Message:

Got 254 color palette working in histogram color bar.

Location:
trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/slim-plugin/src/main/java/imagej/slim/fitting/AbstractBaseFittedImage.java

    r7842 r7845  
    1010import java.awt.image.IndexColorModel; 
    1111 
    12 //import ij.process.MyFloatProcessor; //TODO IJ hack; update to IJ2 ImgLib 
    1312import ij.ImagePlus; 
    1413import ij.process.FloatProcessor; 
     
    4140        _image = new FloatProcessor(x, y); 
    4241        _image.setColorModel(imagej.slim.histogram.HistogramTool.getIndexColorModel()); 
    43         //TODO fill the image with a color that will be out of LUT range and paint black!: 
    44         _image.setValue(Float.NaN); //TODO 
    45         _image.fill(); //TODO 
     42        // fill the image with a value that will be out of LUT range and paint black. 
     43        _image.setValue(Float.NaN); 
     44        _image.fill(); 
    4645        _imagePlus = new ImagePlus(title, _image); 
    4746        _imagePlus.show(); 
     
    129128        for (int y = 0; y < values[0].length; ++y) { 
    130129            for (int x = 0; x < values.length; ++x) { 
    131                 if (InvalidDouble.isValue(values[x][y])) { 
     130                if (Double.isNaN(values[x][y])) { 
    132131                    ++num; 
    133132                } 
     
    138137        return num; 
    139138    }    
    140      
    141      
    142      
    143139     
    144140    /** 
     
    188184        for (int y = 0; y < values[0].length; ++y) { 
    189185            for (int x = 0; x < values.length; ++x) { 
    190                 values[x][y] = InvalidDouble.value(); 
     186                values[x][y] = Double.NaN; 
    191187            } 
    192188        } 
Note: See TracChangeset for help on using the changeset viewer.