⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 truesize.cpp

📁 matlab的可执行程序
💻 CPP
📖 第 1 页 / 共 5 页
字号:
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: truesize/ParseInputs Line: 55 Col"
                  "umn: 1 The function \"truesize/ParseInputs\" was called"
                  " with more than the declared number of outputs (6).")));
        }
        mprhs[0] = mclCreateVararginCell(nrhs, prhs);
        mplhs[0]
          = Mtruesize_ParseInputs(
              &mplhs[1],
              &mplhs[2],
              &mplhs[3],
              &mplhs[4],
              &mplhs[5],
              nlhs,
              mprhs[0]);
        plhs[0] = mplhs[0].FreezeData();
        for (i = 1; i < 6 && i < nlhs; ++i) {
            plhs[i] = mplhs[i].FreezeData();
        }
    }
    MW_END_MLX();
}

//
// The function "truesize_Resize1" contains the normal interface for the
// "truesize/Resize1" M-function from file
// "e:\matlab6.5\toolbox\images\images\truesize.m" (lines 176-316). This
// function processes any input arguments and passes them to the implementation
// version of the function, appearing above.
//
static void truesize_Resize1(mwArray axHandle,
                             mwArray imHandle,
                             mwArray imSize) {
    Mtruesize_Resize1(axHandle, imHandle, imSize);
}

//
// The function "mlxTruesize_Resize1" contains the feval interface for the
// "truesize/Resize1" M-function from file
// "e:\matlab6.5\toolbox\images\images\truesize.m" (lines 176-316). The feval
// function calls the implementation version of truesize/Resize1 through this
// function. This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
void mlxTruesize_Resize1(int nlhs,
                         mxArray * plhs[],
                         int nrhs,
                         mxArray * prhs[]) {
    MW_BEGIN_MLX();
    {
        mwArray mprhs[3];
        int i;
        if (nlhs > 0) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: truesize/Resize1 Line: 176 Colu"
                  "mn: 1 The function \"truesize/Resize1\" was called wi"
                  "th more than the declared number of outputs (0).")));
        }
        if (nrhs > 3) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: truesize/Resize1 Line: 176 Colu"
                  "mn: 1 The function \"truesize/Resize1\" was called wi"
                  "th more than the declared number of inputs (3).")));
        }
        for (i = 0; i < 3 && i < nrhs; ++i) {
            mprhs[i] = mwArray(prhs[i], 0);
        }
        for (; i < 3; ++i) {
            mprhs[i].MakeDIN();
        }
        Mtruesize_Resize1(mprhs[0], mprhs[1], mprhs[2]);
    }
    MW_END_MLX();
}

//
// The function "truesize_Resize2" contains the normal interface for the
// "truesize/Resize2" M-function from file
// "e:\matlab6.5\toolbox\images\images\truesize.m" (lines 316-438). This
// function processes any input arguments and passes them to the implementation
// version of the function, appearing above.
//
static void truesize_Resize2(mwArray axHandle,
                             mwArray imHandle,
                             mwArray imSize) {
    Mtruesize_Resize2(axHandle, imHandle, imSize);
}

//
// The function "mlxTruesize_Resize2" contains the feval interface for the
// "truesize/Resize2" M-function from file
// "e:\matlab6.5\toolbox\images\images\truesize.m" (lines 316-438). The feval
// function calls the implementation version of truesize/Resize2 through this
// function. This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
void mlxTruesize_Resize2(int nlhs,
                         mxArray * plhs[],
                         int nrhs,
                         mxArray * prhs[]) {
    MW_BEGIN_MLX();
    {
        mwArray mprhs[3];
        int i;
        if (nlhs > 0) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: truesize/Resize2 Line: 316 Colu"
                  "mn: 1 The function \"truesize/Resize2\" was called wi"
                  "th more than the declared number of outputs (0).")));
        }
        if (nrhs > 3) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: truesize/Resize2 Line: 316 Colu"
                  "mn: 1 The function \"truesize/Resize2\" was called wi"
                  "th more than the declared number of inputs (3).")));
        }
        for (i = 0; i < 3 && i < nrhs; ++i) {
            mprhs[i] = mwArray(prhs[i], 0);
        }
        for (; i < 3; ++i) {
            mprhs[i].MakeDIN();
        }
        Mtruesize_Resize2(mprhs[0], mprhs[1], mprhs[2]);
    }
    MW_END_MLX();
}

//
// The function "truesize_Resize3" contains the normal interface for the
// "truesize/Resize3" M-function from file
// "e:\matlab6.5\toolbox\images\images\truesize.m" (lines 438-583). This
// function processes any input arguments and passes them to the implementation
// version of the function, appearing above.
//
static void truesize_Resize3(mwArray axHandle,
                             mwArray imHandle,
                             mwArray imSize,
                             mwArray colorbarHandle) {
    Mtruesize_Resize3(axHandle, imHandle, imSize, colorbarHandle);
}

//
// The function "mlxTruesize_Resize3" contains the feval interface for the
// "truesize/Resize3" M-function from file
// "e:\matlab6.5\toolbox\images\images\truesize.m" (lines 438-583). The feval
// function calls the implementation version of truesize/Resize3 through this
// function. This function processes any input arguments and passes them to the
// implementation version of the function, appearing above.
//
void mlxTruesize_Resize3(int nlhs,
                         mxArray * plhs[],
                         int nrhs,
                         mxArray * prhs[]) {
    MW_BEGIN_MLX();
    {
        mwArray mprhs[4];
        int i;
        if (nlhs > 0) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: truesize/Resize3 Line: 438 Colu"
                  "mn: 1 The function \"truesize/Resize3\" was called wi"
                  "th more than the declared number of outputs (0).")));
        }
        if (nrhs > 4) {
            error(
              mwVarargin(
                mwArray(
                  "Run-time Error: File: truesize/Resize3 Line: 438 Colu"
                  "mn: 1 The function \"truesize/Resize3\" was called wi"
                  "th more than the declared number of inputs (4).")));
        }
        for (i = 0; i < 4 && i < nrhs; ++i) {
            mprhs[i] = mwArray(prhs[i], 0);
        }
        for (; i < 4; ++i) {
            mprhs[i].MakeDIN();
        }
        Mtruesize_Resize3(mprhs[0], mprhs[1], mprhs[2], mprhs[3]);
    }
    MW_END_MLX();
}

//
// The function "Mtruesize" is the implementation version of the "truesize"
// M-function from file "e:\matlab6.5\toolbox\images\images\truesize.m" (lines
// 1-55). It contains the actual compiled code for that M-function. It is a
// static function and must only be called from one of the interface functions,
// appearing below.
//
//
// function truesize(varargin)
//
static void Mtruesize(mwArray varargin) {
    mwLocalFunctionTable save_local_function_table_
      = &_local_function_table_truesize;
    mwArray ans = mwArray::UNDEFINED;
    mwArray msg = mwArray::UNDEFINED;
    mwArray resizeType = mwArray::UNDEFINED;
    mwArray imSize = mwArray::UNDEFINED;
    mwArray colorbarHandle = mwArray::UNDEFINED;
    mwArray imHandle = mwArray::UNDEFINED;
    mwArray axHandle = mwArray::UNDEFINED;
    //
    // %TRUESIZE Adjust display size of image.
    // %   TRUESIZE(FIG,[MROWS NCOLS]) adjusts the display size of an
    // %   image. FIG is a figure containing a single image or a single 
    // %   image with a colorbar. [MROWS MCOLS] is a 1-by-2 vector that
    // %   specifies the requested screen area (in pixels) that the
    // %   image should occupy.
    // %
    // %   TRUESIZE(FIG) uses the image height and width for 
    // %   [MROWS MCOLS]. This results in the display having one screen
    // %   pixel for each image pixel.
    // %
    // %   If you omit the figure argument, TRUESIZE works on the
    // %   current figure.
    // %
    // %   Remarks
    // %   -------
    // %   If the 'TruesizeWarning' toolbox preference is 'on', TRUESIZE
    // %   displays a warning if the image is too large to fit on the
    // %   screen. (The entire image is still displayed, but at less
    // %   than true size.) If 'TruesizeWarning' is 'off', TRUESIZE does
    // %   not display the warning. Note that this preference applies
    // %   even when you call TRUESIZE indirectly, such as through
    // %   IMSHOW.
    // %
    // %   See also IMSHOW, IPTSETPREF, IPTGETPREF.
    // 
    // %   Copyright 1993-2003 The MathWorks, Inc.
    // %   $Revision: 5.27 $  $Date: 2003/03/03 16:53:44 $
    // 
    // [axHandle, imHandle, colorbarHandle, imSize, resizeType, msg] = ...
    // ParseInputs(varargin{:});
    //
    axHandle
    = truesize_ParseInputs(
        &imHandle,
        &colorbarHandle,
        &imSize,
        &resizeType,
        &msg,
        mwVarargin(mwVa(varargin, "varargin").cell(colon())));
    //
    // if (~isempty(msg))
    //
    if (mclNotBool(isempty(mwVv(msg, "msg")))) {
        //
        // error(msg);
        //
        error(mwVarargin(mwVv(msg, "msg")));
    //
    // end
    //
    }
    //
    // 
    // switch resizeType
    //
    {
        mwArray v_ = mwVv(resizeType, "resizeType");
        if (switchcompare(v_, _mxarray0_)) {
            //
            // case 1
            // % Figure contains one image and nothing else
            // Resize1(axHandle, imHandle, imSize);
            //
            truesize_Resize1(
              mwVv(axHandle, "axHandle"),
              mwVv(imHandle, "imHandle"),
              mwVv(imSize, "imSize"));
        //
        // 
        // case 2
        //
        } else if (switchcompare(v_, _mxarray1_)) {
            //
            // % Figure contains other noncolorbar axes
            // % or uicontrols.
            // Resize2(axHandle, imHandle, imSize);
            //
            truesize_Resize2(
              mwVv(axHandle, "axHandle"),
              mwVv(imHandle, "imHandle"),
              mwVv(imSize, "imSize"));
        //
        // 
        // case 3
        //
        } else if (switchcompare(v_, _mxarray2_)) {
            //
            // % Figure contains one image and a colorbar.
            // Resize3(axHandle, imHandle, imSize, colorbarHandle);
            //
            truesize_Resize3(
              mwVv(axHandle, "axHandle"),
              mwVv(imHandle, "imHandle"),
              mwVv(imSize, "imSize"),
              mwVv(colorbarHandle, "colorbarHandle"));
        //
        // end
        //
        }
    }
    //
    // 
    // %--------------------------------------------
    // % Subfunction ParseInputs
    // %--------------------------------------------
    //
}

//
// The function "Mtruesize_ParseInputs" is the implementation version of the
// "truesize/ParseInputs" M-function from file
// "e:\matlab6.5\toolbox\images\images\truesize.m" (lines 55-176). It contains
// the actual compiled code for that M-function. It is a static function and
// must only be called from one of the interface functions, appearing below.
//
//
// function [axHandle,imHandle,colorbarHandle,imSize,resizeType,msg] = ...
//
static mwArray Mtruesize_ParseInputs(mwArray * imHandle,
                                     mwArray * colorbarHandle,
                                     mwArray * imSize,
                                     mwArray * resizeType,
                                     mwArray * msg,
                                     int nargout_,
                                     mwArray varargin) {
    mwLocalFunctionTable save_local_function_table_
      = &_local_function_table_truesize;
    int nargin_ = nargin(-1, mwVarargin(varargin));
    mwArray axHandle = mwArray::UNDEFINED;
    mwArray otherKids = mwArray::UNDEFINED;
    mwArray invisUicontrolKids = mwArray::UNDEFINED;
    mwArray uimenuKids = mwArray::UNDEFINED;
    mwArray colorbarAxes = mwArray::UNDEFINED;
    mwArray figKids = mwArray::UNDEFINED;
    mwArray k = mwArray::UNDEFINED;
    mwArray h = mwArray::UNDEFINED;
    mwArray figHandle = mwArray::UNDEFINED;
    //
    // ParseInputs(varargin)
    // 
    // imSize = [];
    //
    *imSize = _mxarray3_;
    //
    // colorbarHandle = [];
    //
    *colorbarHandle = _mxarray3_;
    //
    // msg = '';
    //
    *msg = _mxarray4_;
    //
    // axHandle = [];
    //
    axHandle = _mxarray3_;
    //
    // imHandle = [];
    //
    *imHandle = _mxarray3_;
    //
    // resizeType = [];
    //
    *resizeType = _mxarray3_;
    //
    // 
    // if (nargin == 0)
    //
    if (nargin_ == 0) {
        //
        // axHandle = gca;
        //
        axHandle = gca(mwArray::DIN);
    //

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -