sliceO_Class::Icon_Name

 

This method return the name of the icon file that will be used to symbolize this instance in the 2D MODE ALL display.

 

 

Syntax

 

char * Icon_Name(

          void

) ;

 

 

Parameters

 

This method does not have a parameter.

 

 

Return value

 

This method return the name of an icon fle.

 

 

Remarks

 

The icon file must be of TARGA file format, withthe extension ".tga" and be present in the "Icons" sub-directory of the installation directory.

 

Requirements

 

Header:

          sliceO_include.hpp

 

Library:

          sliceO_Structures.lib

 

 

Example

 

Default method of the SliceO_Class class.

 

// ---------------------------------------------------------------------------

//

//          Icon_Name()

//

//          Get the name of the icon file for this class (NULL if none)

//

//          param:          void

//

//          return:          (char *)

//

// ----------------------------------------------------------------------------

char          *SliceO_Class::Icon_Name( void )

{

          return( "icon folder.tga" ) ;

}

 

 

Override method used for the "SliceO_Series" class.

 

// ----------------------------------------------------------------------------

//

//          Icon_Name()

//

//          Param:          (void)

//          Returns:          (char *)                    The name of the icon file

//

// ----------------------------------------------------------------------------

inline          char          *SliceO_Series::Icon_Name( void )

{

          // --- for 3D and cine, we need to look at all the children ---

          unsigned int type = Fct_Group_Test( this ) ;

 

          // --- volume if: same res, same inc, parallel, sorted, uniform

          if ( ! (type & ( FLAG_SLICE_RES

                           | FLAG_SLICE_INC

                           | FLAG_SLICE_PARALLEL

                           | FLAG_SLICE_SORTED

                           | FLAG_SLICE_UNIFORM

                           | FLAG_SLICE_SAME_D ) ) )

              return( "icon volume.tga" ) ;

 

                          

          // --- animation if: same res, same inc, parallel, all_d

          if ( ! (type & ( FLAG_SLICE_RES

                           | FLAG_SLICE_INC

                           | FLAG_SLICE_PARALLEL

                           | FLAG_SLICE_ALL_D ) ) )

              return( "icon cine.tga" ) ;

                          

          // --- scout we can identify easily ---

          if ( this->scan_type & SCAN_TYPE_SCOUT )

              return( "icon oblique.tga" ) ;

 

          return( "icon image.tga" ) ;

 

          return( NULL ) ;

}

 

See also