AmitkStudy

## AmitkStudy AmitkStudy |

## Synopsis

    #define             AMITK_STUDY_VIEW_CENTER             (stu)
    #define             AMITK_STUDY_VIEW_THICKNESS          (stu)
    #define             AMITK_STUDY_ZOOM                    (stu)
    #define             AMITK_STUDY_FOV                     (stu)
    #define             AMITK_STUDY_VIEW_START_TIME         (stu)
    #define             AMITK_STUDY_VIEW_DURATION           (stu)
    #define             AMITK_STUDY_CREATION_DATE           (stu)
    #define             AMITK_STUDY_FILENAME                (stu)
    #define             AMITK_STUDY_VOXEL_DIM               (stu)
    #define             AMITK_STUDY_VOXEL_DIM_VALID         (stu)
    #define             AMITK_STUDY_FUSE_TYPE               (stu)
    #define             AMITK_STUDY_VIEW_MODE               (stu)
    #define             AMITK_STUDY_CANVAS_VISIBLE          (stu, canvas)
    #define             AMITK_STUDY_CANVAS_TARGET           (stu)
    #define             AMITK_STUDY_CANVAS_ROI_WIDTH        (stu)
    #define             AMITK_STUDY_CANVAS_LINE_STYLE       (stu)
    #define             AMITK_STUDY_CANVAS_FILL_ROI         (stu)
    #define             AMITK_STUDY_CANVAS_LAYOUT           (stu)
    #define             AMITK_STUDY_CANVAS_MAINTAIN_SIZE    (stu)
    #define             AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(stu)
    #define             AMITK_STUDY_PANEL_LAYOUT            (stu)
    #define             AMITK_STUDY_LINE_PROFILE            (stu)
    enum                AmitkFuseType;
                        AmitkStudy;
    AmitkStudy*         amitk_study_new                     (AmitkPreferences *preferences);
    void                amitk_study_set_filename            (AmitkStudy *study,
                                                             const gchar *new_filename);
    void                amitk_study_set_creation_date       (AmitkStudy *study,
                                                             const gchar *new_date);
    void                amitk_study_set_view_thickness      (AmitkStudy *study,
                                                             const amide_real_t new_thickness);
    void                amitk_study_set_view_center         (AmitkStudy *study,
                                                             const AmitkPoint new_center);
    void                amitk_study_set_view_start_time     (AmitkStudy *study,
                                                             const amide_time_t new_start);
    void                amitk_study_set_view_duration       (AmitkStudy *study,
                                                             const amide_time_t new_duration);
    void                amitk_study_set_fuse_type           (AmitkStudy *study,
                                                             const AmitkFuseType new_fuse_type);
    void                amitk_study_set_view_mode           (AmitkStudy *study,
                                                             const AmitkViewMode new_view_mode);
    void                amitk_study_set_canvas_visible      (AmitkStudy *study,
                                                             const AmitkView view,
                                                             const gboolean visible);
    void                amitk_study_set_zoom                (AmitkStudy *study,
                                                             const amide_real_t new_zoom);
    void                amitk_study_set_fov                 (AmitkStudy *study,
                                                             const amide_real_t new_fov);
    void                amitk_study_set_canvas_target       (AmitkStudy *study,
                                                             const gboolean always_on);
    void                amitk_study_set_canvas_roi_width    (AmitkStudy *study,
                                                             gint roi_width);
    void                amitk_study_set_canvas_line_style   (AmitkStudy *study,
                                                             const GdkLineStyle line_style);
    void                amitk_study_set_canvas_fill_roi     (AmitkStudy *study,
                                                             const gboolean fill_roi);
    void                amitk_study_set_canvas_layout       (AmitkStudy *study,
                                                             const AmitkLayout layout);
    void                amitk_study_set_canvas_maintain_size
                                                            (AmitkStudy *study,
                                                             const gboolean maintain_size);
    void                amitk_study_set_canvas_target_empty_area
                                                            (AmitkStudy *study,
                                                             gint target_empty_area);
    void                amitk_study_set_panel_layout        (AmitkStudy *study,
                                                             const AmitkPanelLayout panel_layout);
    AmitkStudy*         amitk_study_recover_xml             (const gchar *study_filename,
                                                             AmitkPreferences *preferences);
    AmitkStudy*         amitk_study_load_xml                (const gchar *study_filename);
    gboolean            amitk_study_save_xml                (AmitkStudy *study,
                                                             const gchar *study_filename,
                                                             const gboolean save_as_directory);
    const gchar*        amitk_fuse_type_get_name            (const AmitkFuseType fuse_type);
    const gchar*        amitk_view_mode_get_name            (const AmitkViewMode view_mode);

## Description

## Details

### AMITK_STUDY_VIEW_CENTER()

    #define AMITK_STUDY_VIEW_CENTER(stu)              (amitk_space_s2b(AMITK_SPACE(stu), AMITK_STUDY(stu)->view_center))

`stu` : |

### AMITK_STUDY_VIEW_THICKNESS()

    #define AMITK_STUDY_VIEW_THICKNESS(stu)           (AMITK_STUDY(stu)->view_thickness)

`stu` : |

### AMITK_STUDY_ZOOM()

    #define AMITK_STUDY_ZOOM(stu)                     (AMITK_STUDY(stu)->zoom)

`stu` : |

### AMITK_STUDY_FOV()

    #define AMITK_STUDY_FOV(stu)                      (AMITK_STUDY(stu)->fov)

`stu` : |

### AMITK_STUDY_VIEW_START_TIME()

    #define AMITK_STUDY_VIEW_START_TIME(stu)          (AMITK_STUDY(stu)->view_start_time)

`stu` : |

### AMITK_STUDY_VIEW_DURATION()

    #define AMITK_STUDY_VIEW_DURATION(stu)            (AMITK_STUDY(stu)->view_duration)

`stu` : |

### AMITK_STUDY_CREATION_DATE()

    #define AMITK_STUDY_CREATION_DATE(stu)            (AMITK_STUDY(stu)->creation_date)

`stu` : |

### AMITK_STUDY_FILENAME()

    #define AMITK_STUDY_FILENAME(stu)                 (AMITK_STUDY(stu)->filename)

`stu` : |

### AMITK_STUDY_VOXEL_DIM()

    #define AMITK_STUDY_VOXEL_DIM(stu)                (AMITK_STUDY(stu)->voxel_dim)

`stu` : |

### AMITK_STUDY_VOXEL_DIM_VALID()

    #define AMITK_STUDY_VOXEL_DIM_VALID(stu)          (AMITK_STUDY(stu)->voxel_dim_valid)

`stu` : |

### AMITK_STUDY_FUSE_TYPE()

    #define AMITK_STUDY_FUSE_TYPE(stu)                (AMITK_STUDY(stu)->fuse_type)

`stu` : |

### AMITK_STUDY_VIEW_MODE()

    #define AMITK_STUDY_VIEW_MODE(stu)                (AMITK_STUDY(stu)->view_mode)

`stu` : |

### AMITK_STUDY_CANVAS_VISIBLE()

    #define AMITK_STUDY_CANVAS_VISIBLE(stu, canvas)   (AMITK_STUDY(stu)->canvas_visible[canvas])

`stu` : |
`canvas` : |

### AMITK_STUDY_CANVAS_TARGET()

    #define AMITK_STUDY_CANVAS_TARGET(stu)            (AMITK_STUDY(stu)->canvas_target)

`stu` : |

### AMITK_STUDY_CANVAS_ROI_WIDTH()

    #define AMITK_STUDY_CANVAS_ROI_WIDTH(stu)         (AMITK_STUDY(stu)->canvas_roi_width)

`stu` : |

### AMITK_STUDY_CANVAS_LINE_STYLE()

    #define AMITK_STUDY_CANVAS_LINE_STYLE(stu)        (AMITK_STUDY(stu)->canvas_line_style)

`stu` : |

### AMITK_STUDY_CANVAS_FILL_ROI()

    #define AMITK_STUDY_CANVAS_FILL_ROI(stu)          (AMITK_STUDY(stu)->canvas_fill_roi)

`stu` : |

### AMITK_STUDY_CANVAS_LAYOUT()

    #define AMITK_STUDY_CANVAS_LAYOUT(stu)            (AMITK_STUDY(stu)->canvas_layout)

`stu` : |

### AMITK_STUDY_CANVAS_MAINTAIN_SIZE()

    #define AMITK_STUDY_CANVAS_MAINTAIN_SIZE(stu)     (AMITK_STUDY(stu)->canvas_maintain_size)

`stu` : |

### AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA()

    #define AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(stu) (AMITK_STUDY(stu)->canvas_target_empty_area)

`stu` : |

### AMITK_STUDY_PANEL_LAYOUT()

    #define AMITK_STUDY_PANEL_LAYOUT(stu)             (AMITK_STUDY(stu)->panel_layout)

`stu` : |

### AMITK_STUDY_LINE_PROFILE()

    #define AMITK_STUDY_LINE_PROFILE(stu)             (AMITK_STUDY(stu)->line_profile)

`stu` : |

### enum AmitkFuseType

    typedef enum {
      AMITK_FUSE_TYPE_BLEND,
      AMITK_FUSE_TYPE_OVERLAY,
      AMITK_FUSE_TYPE_NUM
    } AmitkFuseType;

### AmitkStudy

    typedef struct {
      AmitkObject parent;

      gchar * creation_date; /* when this study was created */

      /* canvas view parameters */
      AmitkPoint view_center; /* wrt the study coordinate space */
      amide_real_t view_thickness;
      amide_time_t view_start_time;
      amide_time_t view_duration;
      amide_real_t zoom;
      amide_real_t fov; /* field of view, in percent */
      AmitkFuseType fuse_type;
      AmitkViewMode view_mode;
      gboolean canvas_visible[AMITK_VIEW_NUM];
      gboolean canvas_target; /* target on/off */

      /* canvas preferences */
      gint canvas_roi_width;
      GdkLineStyle canvas_line_style;
      gboolean canvas_fill_roi;
      AmitkLayout canvas_layout;
      gboolean canvas_maintain_size;
      gint canvas_target_empty_area; /* in pixels */
      AmitkPanelLayout panel_layout;

      /* stuff calculated when file is loaded and stored */
      amide_real_t voxel_dim; /* prefered voxel/pixel dim, canvas wants this info */
      gboolean voxel_dim_valid;

      /* stuff that doesn't need to be saved */
      AmitkLineProfile * line_profile;
      gchar * filename; /* file name of the study */
    } AmitkStudy;

### amitk_study_new ()

    AmitkStudy*         amitk_study_new                     (AmitkPreferences *preferences);

`preferences` : |
Returns : |

### amitk_study_set_filename ()

    void                amitk_study_set_filename            (AmitkStudy *study,
                                                             const gchar *new_filename);

`study` : |
`new_filename` : |

### amitk_study_set_creation_date ()

    void                amitk_study_set_creation_date       (AmitkStudy *study,
                                                             const gchar *new_date);

`study` : |
`new_date` : |

### amitk_study_set_view_thickness ()

    void                amitk_study_set_view_thickness      (AmitkStudy *study,
                                                             const amide_real_t new_thickness);

`study` : |
`new_thickness` : |

### amitk_study_set_view_center ()

    void                amitk_study_set_view_center         (AmitkStudy *study,
                                                             const AmitkPoint new_center);

`study` : |
`new_center` : |

### amitk_study_set_view_start_time ()

    void                amitk_study_set_view_start_time     (AmitkStudy *study,
                                                             const amide_time_t new_start);

`study` : |
`new_start` : |

### amitk_study_set_view_duration ()

    void                amitk_study_set_view_duration       (AmitkStudy *study,
                                                             const amide_time_t new_duration);

`study` : |
`new_duration` : |

### amitk_study_set_fuse_type ()

    void                amitk_study_set_fuse_type           (AmitkStudy *study,
                                                             const AmitkFuseType new_fuse_type);

`study` : |
`new_fuse_type` : |

### amitk_study_set_view_mode ()

    void                amitk_study_set_view_mode           (AmitkStudy *study,
                                                             const AmitkViewMode new_view_mode);

`study` : |
`new_view_mode` : |

### amitk_study_set_canvas_visible ()

    void                amitk_study_set_canvas_visible      (AmitkStudy *study,
                                                             const AmitkView view,
                                                             const gboolean visible);

`study` : |
`view` : |
`visible` : |

### amitk_study_set_zoom ()

    void                amitk_study_set_zoom                (AmitkStudy *study,
                                                             const amide_real_t new_zoom);

`study` : |
`new_zoom` : |

### amitk_study_set_fov ()

    void                amitk_study_set_fov                 (AmitkStudy *study,
                                                             const amide_real_t new_fov);

`study` : |
`new_fov` : |

### amitk_study_set_canvas_target ()

    void                amitk_study_set_canvas_target       (AmitkStudy *study,
                                                             const gboolean always_on);

`study` : |
`always_on` : |

### amitk_study_set_canvas_roi_width ()

    void                amitk_study_set_canvas_roi_width    (AmitkStudy *study,
                                                             gint roi_width);

`study` : |
`roi_width` : |

### amitk_study_set_canvas_line_style ()

    void                amitk_study_set_canvas_line_style   (AmitkStudy *study,
                                                             const GdkLineStyle line_style);

`study` : |
`line_style` : |

### amitk_study_set_canvas_fill_roi ()

    void                amitk_study_set_canvas_fill_roi     (AmitkStudy *study,
                                                             const gboolean fill_roi);

`study` : |
`fill_roi` : |

### amitk_study_set_canvas_layout ()

    void                amitk_study_set_canvas_layout       (AmitkStudy *study,
                                                             const AmitkLayout layout);

`study` : |
`layout` : |

### amitk_study_set_canvas_maintain_size ()

    void                amitk_study_set_canvas_maintain_size
                                                            (AmitkStudy *study,
                                                             const gboolean maintain_size);

`study` : |
`maintain_size` : |

### amitk_study_set_canvas_target_empty_area ()

    void                amitk_study_set_canvas_target_empty_area
                                                            (AmitkStudy *study,
                                                             gint target_empty_area);

`study` : |
`target_empty_area` : |

### amitk_study_set_panel_layout ()

    void                amitk_study_set_panel_layout        (AmitkStudy *study,
                                                             const AmitkPanelLayout panel_layout);

`study` : |
`panel_layout` : |

### amitk_study_recover_xml ()

    AmitkStudy*         amitk_study_recover_xml             (const gchar *study_filename,
                                                             AmitkPreferences *preferences);

`study_filename` : |
`preferences` : |
Returns : |

### amitk_study_load_xml ()

    AmitkStudy*         amitk_study_load_xml                (const gchar *study_filename);

`study_filename` : |
Returns : |

### amitk_study_save_xml ()

    gboolean            amitk_study_save_xml                (AmitkStudy *study,
                                                             const gchar *study_filename,
                                                             const gboolean save_as_directory);

`study` : |
`study_filename` : |
`save_as_directory` : |
Returns : |

### amitk_fuse_type_get_name ()

    const gchar*        amitk_fuse_type_get_name            (const AmitkFuseType fuse_type);

`fuse_type` : |
Returns : |

### amitk_view_mode_get_name ()

    const gchar*        amitk_view_mode_get_name            (const AmitkViewMode view_mode);

`view_mode` : |
Returns : |