edu.washington.biostr.sig.volume
Class AtlasElement

java.lang.Object
  extended by edu.washington.biostr.sig.volume.AtlasElement
All Implemented Interfaces:
Serializable, Comparable<AtlasElement>

public class AtlasElement
extends Object
implements Serializable, Comparable<AtlasElement>

Encapsulate most of the information needed to specify an entry in an Atlas.
The major information is a unique id, color, abbreviation, the key in the atlas and a full name. It can also support arbitrary information through the use of a dictionary called info.

Version:
1.1
Author:
Eider Moore
See Also:
Serialized Form

Constructor Summary
AtlasElement(Element xml)
          Parse the XML element of the form:
<Area abbrev="itps" id="H79" name="intraparietal sulcus">
 <color b="0" g="0" r="255"/>
</Area>
AtlasElement(int value, String abbreviation, int color, String name, String uniqueId, Map<String,String> info)
          Create an AtlasElement for a new Structure.
 
Method Summary
 int compareTo(AtlasElement o)
           
 boolean equals(Object obj)
           
 String getAbbreviation()
           
 int getColor()
           
 String getInfo(String key)
           
 int getInt()
           
 String getName()
           
 String getSurfaceFile()
           
 String getUniqueId()
           
 int hashCode()
           
 void setColor(int color)
           
 void setSurfaceFile(String surface)
           
 String toString()
           
 Element toXML(Document doc)
          Create an XML Element for this node.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtlasElement

public AtlasElement(Element xml)
Parse the XML element of the form:
<Area abbrev="itps" id="H79" name="intraparietal sulcus">
 <color b="0" g="0" r="255"/>
</Area>

Parameters:
xml -

AtlasElement

public AtlasElement(int value,
                    String abbreviation,
                    int color,
                    String name,
                    String uniqueId,
                    Map<String,String> info)
Create an AtlasElement for a new Structure.

Parameters:
value - The value in the volume that is keyed to this element.
abbreviation - The preferred abbreviation for this structure.
color - The preferred color.
name - The name of this structure.
uniqueId - A unique id, idealily it should be translatable to a structure in some common atlas.
info - The dictionary of optional information.
Method Detail

toXML

public Element toXML(Document doc)
Create an XML Element for this node. it will be the same format as that supported by the constructor.

Parameters:
doc -
Returns:
A new element

getColor

public int getColor()
Returns:
Get the color expressed as an int with ARGB (8 bits per channel).

getAbbreviation

public String getAbbreviation()
Returns:
the abbreviation.

toString

public String toString()
Overrides:
toString in class Object

getUniqueId

public String getUniqueId()
Returns:
The unique id.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getInfo

public String getInfo(String key)
Parameters:
key - A key in the dictonary.
Returns:
The value in the dictonary for key.

getInt

public int getInt()
Returns:
The value used to represent this in the volume.

compareTo

public int compareTo(AtlasElement o)
Specified by:
compareTo in interface Comparable<AtlasElement>

getName

public String getName()
Returns:
The long name for this structure.

setColor

public void setColor(int color)

getSurfaceFile

public String getSurfaceFile()

setSurfaceFile

public void setSurfaceFile(String surface)


Copyright © 2006 University of Washington. All Rights Reserved.