Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

plug_ppm.c File Reference

#include "afni.h"

Go to the source code of this file.


Functions

char * IM_main (PLUGIN_interface *)
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init (int ncall)

Variables

PLUGIN_interface * global_plint = NULL

Function Documentation

char * IM_main PLUGIN_interface *   
 

Definition at line 69 of file plug_ppm.c.

References mri_free(), mri_read_ppm(), and PLUTO_popup_image().

Referenced by PLUGIN_init().

00070 {
00071    char * str ;
00072    MRI_IMAGE * im ;
00073 
00074    PLUTO_next_option(plint) ;
00075 
00076    str  = PLUTO_get_string(plint) ;
00077    im   = mri_read_ppm(str) ;
00078    if( im == NULL ) return "Can't open\nimage file" ;
00079 
00080    (void) PLUTO_popup_image(NULL,im) ;
00081    mri_free(im) ;
00082    return NULL ;
00083 }

DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface* PLUGIN_init int    ncall
 

Definition at line 37 of file plug_ppm.c.

References global_plint, IM_main(), and PLUTO_set_sequence().

00038 {
00039    PLUGIN_interface * plint ;     /* will be the output of this routine */
00040 
00041    if( ncall > 0 ) return NULL ;  /* only one interface */
00042 
00043    plint = PLUTO_new_interface( "Images" ,
00044                                 "Images" ,
00045                                 NULL ,
00046                                 PLUGIN_CALL_VIA_MENU , IM_main  ) ;
00047 
00048    global_plint = plint ;  /* make global copy */
00049 
00050    PLUTO_set_sequence( plint , "A:misc" ) ;
00051 
00052    PLUTO_add_option( plint ,
00053                      "Input" ,  /* label at left of input line */
00054                      "Input" ,  /* tag to return to plugin */
00055                      TRUE       /* is this mandatory? */
00056                    ) ;
00057 
00058    PLUTO_add_string( plint , "Filename" , 0 , NULL , 19 ) ;
00059 
00060    return plint ;
00061 }

Variable Documentation

PLUGIN_interface* global_plint = NULL [static]
 

Definition at line 19 of file plug_ppm.c.

Referenced by PLUGIN_init().

 

Powered by Plone

This site conforms to the following standards: