Landmark list

Landmark list — List of 3D landmarks and their manipulation

Functions

Types and Values

Object Hierarchy


Description

A MiaLandmarklist comprises a series of anatomical landmarks stored as MiaLandmark. Functions are provided to manupilate and iterate the landmark list.

Functions

mia_landmarklist_new ()

MiaLandmarklist *
mia_landmarklist_new (const gchar *name);

Create a new landmark list with the given name.

Parameters

name

landmark list name

 

mia_landmarklist_insert ()

gboolean
mia_landmarklist_insert (MiaLandmarklist *self,
                         MiaLandmark *lm);

Insert the landmark lm into the landmark list if it doesn't already exists.

Parameters

self

a landmark list

 

lm

a landmark

 

Returns

TRUE if the landmark was successfully inserted, and FALSE if a landmark with the given name already existed in the list.


mia_landmarklist_get_landmark ()

MiaLandmark *
mia_landmarklist_get_landmark (MiaLandmarklist *self,
                               const gchar *key);

Retrive a landmark based on the given landmark name key

Parameters

self

a landmark list

 

key

a landmark name

 

Returns

the MiaLandmark if it exists in the list, otherwise NULL


mia_landmarklist_delete_landmark ()

void
mia_landmarklist_delete_landmark (MiaLandmarklist *self,
                                  const gchar *key);

Delete the landmark with name key from the list if it exists.

Parameters

self

a landmark list

 

key

a landmark name

 

mia_landmarklist_set_name ()

void
mia_landmarklist_set_name (MiaLandmarklist *self,
                           const gchar *name);

(Re-)set the name of the lansmark list to name .

Parameters

self

a landmark list

 

name

a name

 

mia_landmarklist_get_name ()

const gchar *
mia_landmarklist_get_name (MiaLandmarklist *self);

Retrive the name of the landmark list.

Parameters

self

a landmark list

 

Returns

The name of the landmark list. If not set, return an empty string.


mia_landmarklist_get_selected ()

const gchar *
mia_landmarklist_get_selected (MiaLandmarklist *self);

Get the currently selected landmark in self. No information is given whether the name actually exists within the landmark list.

Parameters

self

a landmark list

 

Returns

name of the currently selected landmark or an empty string.


mia_landmarklist_set_selected ()

void
mia_landmarklist_set_selected (MiaLandmarklist *self,
                               const gchar *selected);

Set the currently selected landmark based on the name of the passed landmark It is not tested whether the name actually exists.

Parameters

self

a landmark list

 

selected

a landmark name

 

mia_landmarklist_foreach ()

void
mia_landmarklist_foreach (MiaLandmarklist *self,
                          GHFunc callback,
                          gpointer user_data);

Iterate over the landmark ist and execute callback for each landmark.

Parameters

self

a landmark list

 

callback

a callback function GHFunc

 

user_data

User provided additional data.

[closure]

mia_landmarklist_clear_locations ()

void
mia_landmarklist_clear_locations (MiaLandmarklist *self);

Clear the 3D location information for all landmarks.

Parameters

self

a landmark list

 

mia_landmarklist_xmlio_write ()

gboolean
mia_landmarklist_xmlio_write (xmlNodePtr parent,
                              xmlNsPtr ns,
                              MiaLandmarklist *list);

This function adds the landmark list as child node to the given parent node.

Parameters

parent

the XML parent node the landmark list is to be attached to

 

ns

The XML namespace

 

list

The landmark list to write to the XML node

 

Returns

TRUE if the landmark list was successfully added to the parent node, FALSE otherwise


mia_landmarklist_test ()

gboolean
mia_landmarklist_test (void);

Run some basic tests on the landmark list implementation.

Returns

TRUE if successful.

Types and Values

MiaLandmarklist

typedef struct _MiaLandmarklist MiaLandmarklist;

MiaLandmarklist is an opaque structure to store landmarks in 3D space.