at.tuwien.ifs.somtoolbox.apps.viewer.fileutils
Class PocketSOMFormatUtils

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.apps.viewer.fileutils.PocketSOMFormatUtils

public class PocketSOMFormatUtils
extends Object

This class is mainly used to convert legacy descriptions into the PocketSOMFormat

Created on Jan 21, 2005

Version:
$Id: PocketSOMFormatUtils.java 3586 2010-05-21 10:34:19Z mayer $
Author:
Robert Neumayer, Rudolf Mayer

Constructor Summary
PocketSOMFormatUtils()
           
 
Method Summary
static void convertMapFormat(GrowingLayer layer, String outputFileName)
          Writes the map information of the given GrowingLayer to the given file in PocketSOMFormat
static void convertMapFormat(String wgt, String unit, String map, String outputFileName)
          reads a given map description in SOMLibInputFormat and writes to the given file in PocketSOMFormat
static StringBuilder createPocketSomMapping(GrowingLayer layer)
           
static int getMaxNumberOfMappedElements(GrowingLayer layer)
          Gets the max number of mapped instances of a unit for the GrowingLayer.
static int getMaxNumberOfMappedElements(SOMLibFormatInputReader ir)
          get the max number of mapped instances of a unit for the given map
static void lightenMapFormat(String wgt, String unit, String map, String outputFileName, float factor)
          Deprecated. since streaming works this is not needed anymore (it never worked very well anyway)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PocketSOMFormatUtils

public PocketSOMFormatUtils()
Method Detail

getMaxNumberOfMappedElements

public static int getMaxNumberOfMappedElements(SOMLibFormatInputReader ir)
get the max number of mapped instances of a unit for the given map


getMaxNumberOfMappedElements

public static int getMaxNumberOfMappedElements(GrowingLayer layer)
Gets the max number of mapped instances of a unit for the GrowingLayer.


convertMapFormat

public static void convertMapFormat(String wgt,
                                    String unit,
                                    String map,
                                    String outputFileName)
reads a given map description in SOMLibInputFormat and writes to the given file in PocketSOMFormat

Parameters:
outputFileName - name of the PocketSOM formatted file to be created

createPocketSomMapping

public static StringBuilder createPocketSomMapping(GrowingLayer layer)

convertMapFormat

public static void convertMapFormat(GrowingLayer layer,
                                    String outputFileName)
Writes the map information of the given GrowingLayer to the given file in PocketSOMFormat

Parameters:
layer - The layer containing the map information
outputFileName - name of the PocketSOM formatted file to be created

lightenMapFormat

@Deprecated
public static void lightenMapFormat(String wgt,
                                               String unit,
                                               String map,
                                               String outputFileName,
                                               float factor)
Deprecated. since streaming works this is not needed anymore (it never worked very well anyway)

reads a given map description in SOMLibInputFormat and writes to the given file in PocketSOMFormat changing the size of the map according to factor

Parameters:
outputFileName - name of the PocketSOM formatted file to be created
factor - 0 an empty map, 1.0 for a full map