arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

ColorMapper.cpp

Go to the documentation of this file.
00001 //------------------------------------------------------------------------
00002 //
00003 //   Joe Kniss
00004 //     6-20-03
00005 //                   ________    ____   ___ 
00006 //                  |        \  /    | /  /
00007 //                  +---+     \/     |/  /
00008 //                  +--+|  |\    /|     < 
00009 //                  |  ||  | \  / |  |\  \ 
00010 //                  |      |  \/  |  | \  \ 
00011 //                   \_____|      |__|  \__\
00012 //                       Copyright  2003 
00013 //                      Joe Michael Kniss
00014 //                   <<< jmk@cs.utah.edu >>>
00015 //               "All Your Base are Belong to Us"
00016 //-------------------------------------------------------------------------
00017 
00018 /// ColorMapper.h
00019 ///  simian filter
00020 
00021 #include "ColorMapper.h"
00022 
00023 //////////////////////////////////////////////////////////////////////////
00024 /// construction
00025 //////////////////////////////////////////////////////////////////////////
00026 ColorMapper::ColorMapper()
00027 :SourceObj(),
00028  _mapId(GREY_SCALE_RGB),
00029  _windowRGB(1),
00030  _levelRGB(.5),
00031  _windowA(1),
00032  _levelA(.5),
00033  _autoRGB(false),
00034  _autoA(false)
00035 {
00036 
00037 }
00038 
00039 //////////////////////////////////////////////////////////////////////////
00040 /// destruction
00041 //////////////////////////////////////////////////////////////////////////
00042 ColorMapper::~ColorMapper()
00043 {
00044 
00045 }
00046 
00047 //////////////////////////////////////////////////////////////////////////
00048 /// set Input
00049 //////////////////////////////////////////////////////////////////////////
00050 void ColorMapper::setInput(NrroDataObjSP n)
00051 {
00052    setInputN(0,DataObjSP(n.getPtr()));
00053 }
00054 
00055 //////////////////////////////////////////////////////////////////////////
00056 /// get Output
00057 //////////////////////////////////////////////////////////////////////////
00058 NrroDataObjSP  ColorMapper::getOutput()
00059 {
00060    return NrroDataObjSP(dynamic_cast<NrroDataObj*>(getOutputN(0)));
00061 }
00062 
00063 //////////////////////////////////////////////////////////////////////////
00064 /// execute Definition
00065 //////////////////////////////////////////////////////////////////////////
00066 
00067 void ColorMapper::execDef()
00068 {
00069    switch(_mapId)
00070    {
00071    case GREY_SCALE_RGB:
00072       mapGrey( NrroDataObjSP(dynamic_cast<NrroDataObj*>(getOutputN(0))), 
00073                NrroDataObjSP(dynamic_cast<NrroDataObj*>(getInputN(0))));
00074       break;
00075    case RAINBOW_RGB:
00076       derr("execDef(), RAINBOW_RGB not implemented");
00077       break;
00078    default:
00079       derr("execDef(), color map unknow!!");
00080    }
00081 
00082 }
00083 
00084 //////////////////////////////////////////////////////////////////////////
00085 /// Grey scale
00086 //////////////////////////////////////////////////////////////////////////
00087 void ColorMapper::mapGrey(NrroDataObjSP out, NrroDataObjSP in)
00088 {
00089    NrroSP n = in->getData(0);
00090    
00091 
00092 }
00093 

Send questions, comments, and bug reports to:
jmk