Statistics
| Revision:

root / branches / piloto3d / libraries / libCq CMS for java.old / src-test / org / cresques / io / datastruct / TestHistogramTools.java @ 9523

History | View | Annotate | Download (1.61 KB)

1
/*
2
 * Created on 19-ago-2006
3
 *
4
 * To change the template for this generated file go to
5
 * Window>Preferences>Java>Code Generation>Code and Comments
6
 */
7
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 */
25
package org.cresques.io.datastruct;
26

    
27
import java.io.IOException;
28

    
29
import org.cresques.io.GeoRasterFile;
30

    
31
public class TestHistogramTools {
32

    
33

    
34
        public static void main (String[] args){
35
                int[][]                                                        histogram = new int[3][256];
36
                String                                                        grf = "/home/maquerol/prueba.jpg";        
37
                HistogramPersistence                                        tools = new HistogramPersistence();
38
                
39
                for (int i = 0 ; i < 3 ; i++)
40
                        for (int j = 0 ; j <= 255 ; j++)
41
                                histogram[i][j] = (int)(Math.random() * 100);
42
                
43
                try{
44
                        tools.makeRMFHistogram(histogram, grf,3);
45
                }catch(IOException ex){
46
                        System.err.println("Error");
47
                }
48
                System.out.println("Hecho!");
49
        }
50
        
51
}