AmitkCanvas

## AmitkCanvas AmitkCanvas |

## Synopsis

    #define             AMITK_CANVAS_VIEW                   (obj)
    #define             AMITK_CANVAS_VIEW_MODE              (obj)
    enum                AmitkCanvasType;
    enum                AmitkCanvasTargetAction;
                        AmitkCanvas;
    GtkWidget*          amitk_canvas_new                    (AmitkStudy *study,
                                                             AmitkView view,
                                                             AmitkViewMode view_mode,
                                                             AmitkCanvasType type);
    void                amitk_canvas_set_study              (AmitkCanvas *canvas,
                                                             AmitkStudy *study);
    void                amitk_canvas_set_active_object      (AmitkCanvas *canvas,
                                                             AmitkObject *active_object);
    void                amitk_canvas_update_target          (AmitkCanvas *canvas,
                                                             AmitkCanvasTargetAction action,
                                                             AmitkPoint center,
                                                             amide_real_t thickness);
    void                amitk_canvas_set_time_on_image      (AmitkCanvas *canvas,
                                                             gboolean time_on_image);
    gint                amitk_canvas_get_width              (AmitkCanvas *canvas);
    gint                amitk_canvas_get_height             (AmitkCanvas *canvas);
    GdkPixbuf*          amitk_canvas_get_pixbuf             (AmitkCanvas *canvas);

## Description

## Details

### AMITK_CANVAS_VIEW()

    #define AMITK_CANVAS_VIEW(obj)       (AMITK_CANVAS(obj)->view)

`obj` : |

### AMITK_CANVAS_VIEW_MODE()

    #define AMITK_CANVAS_VIEW_MODE(obj)  (AMITK_CANVAS(obj)->view_mode)

`obj` : |

### enum AmitkCanvasType

    typedef enum {
      AMITK_CANVAS_TYPE_NORMAL,
      AMITK_CANVAS_TYPE_FLY_THROUGH
    } AmitkCanvasType;

### enum AmitkCanvasTargetAction

    typedef enum {
      AMITK_CANVAS_TARGET_ACTION_HIDE,
      AMITK_CANVAS_TARGET_ACTION_SHOW,
      AMITK_CANVAS_TARGET_ACTION_LEAVE
    } AmitkCanvasTargetAction;

### AmitkCanvas

    typedef struct {
      GtkVBox vbox;

      GtkWidget * canvas;
      GtkWidget * label;
      GtkWidget * scrollbar;
      GtkObject * scrollbar_adjustment;
      GnomeCanvasItem * arrows[4];
      GnomeCanvasItem * orientation_label[4];
      AmitkCanvasType type;

      AmitkVolume * volume; /* the volume that this canvas slice displays */
      AmitkPoint center; /* in base coordinate space */

      AmitkView view;
      AmitkViewMode view_mode;
      gint roi_width;
      AmitkObject * active_object;

      GList * slices;
      GList * slice_cache;
      gint max_slice_cache_size;
      gint pixbuf_width, pixbuf_height;
      gdouble border_width;
      GnomeCanvasItem * image;
      GdkPixbuf * pixbuf;

      gboolean time_on_image;
      GnomeCanvasItem * time_label;

      AmitkStudy * study;
      GList * undrawn_rois;
      GList * object_items;

      guint next_update;
      guint idle_handler_id;
      GList * next_update_objects;

      /* profile stuff */
      GnomeCanvasItem * line_profile_item;

      /* target stuff */
      GnomeCanvasItem * target[8];
      AmitkCanvasTargetAction next_target_action;
      AmitkPoint next_target_center;
      amide_real_t next_target_thickness;
    } AmitkCanvas;

### amitk_canvas_new ()

    GtkWidget*          amitk_canvas_new                    (AmitkStudy *study,
                                                             AmitkView view,
                                                             AmitkViewMode view_mode,
                                                             AmitkCanvasType type);

`study` : |
`view` : |
`view_mode` : |
`type` : |
Returns : |

### amitk_canvas_set_study ()

    void                amitk_canvas_set_study              (AmitkCanvas *canvas,
                                                             AmitkStudy *study);

`canvas` : |
`study` : |

### amitk_canvas_set_active_object ()

    void                amitk_canvas_set_active_object      (AmitkCanvas *canvas,
                                                             AmitkObject *active_object);

`canvas` : |
`active_object` : |

### amitk_canvas_update_target ()

    void                amitk_canvas_update_target          (AmitkCanvas *canvas,
                                                             AmitkCanvasTargetAction action,
                                                             AmitkPoint center,
                                                             amide_real_t thickness);

`canvas` : |
`action` : |
`center` : |
`thickness` : |

### amitk_canvas_set_time_on_image ()

    void                amitk_canvas_set_time_on_image      (AmitkCanvas *canvas,
                                                             gboolean time_on_image);

`canvas` : |
`time_on_image` : |

### amitk_canvas_get_width ()

    gint                amitk_canvas_get_width              (AmitkCanvas *canvas);

`canvas` : |
Returns : |

### amitk_canvas_get_height ()

    gint                amitk_canvas_get_height             (AmitkCanvas *canvas);

`canvas` : |
Returns : |

### amitk_canvas_get_pixbuf ()

    GdkPixbuf*          amitk_canvas_get_pixbuf             (AmitkCanvas *canvas);

`canvas` : |
Returns : |