Capsim Block Documentation
This star inputs an image and transposes it.
| Port | Type | Name | |
|---|---|---|---|
| 0 | float | x |
| Port | Type | Name | |
|---|---|---|---|
| 0 | float | y |
| Num | Description | Type | Name | Default Value | |
|---|---|---|---|---|---|
| 0 | Image Width | int | width | 1 | |
| 1 | Image Height | int | height | 1 | |
| 2 | Operation: 0=Transpose, 1= flip | int | operation | 0 |
| Num | Type | Name | Initial Value | Description |
|---|---|---|---|---|
| 0 | float** | mat_PP | ||
| 1 | int | pointCount | 0 | |
| 2 | int | numberRowsInput | 0 | |
| 3 | int | widthOutput | 0 | |
| 4 | int | heightOutput | 0 |
int no_samples; int i,j; int factor; |
|---|
mat_PP = (float**)calloc(height+1,sizeof(float*)); for(i=0; i |
|---|
/*
* if the image has been inputted and is ready to be outputted, then
* output either a row at a time or a column at a time on
* each visit
*/
if(numberRowsInput == height) {
switch(operation) {
case 0:
if(widthOutput >= width) {
/*
* reset and collect another matrix again
*/
pointCount = 0;
numberRowsInput=0;
widthOutput = 0;
heightOutput = 0;
break;
}
for (i=0; i
|
|---|
/* free up allocated space */ for(i=0; i |
|---|
/* Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks)
Copyright (C) 1989-2002 XCAD Corporation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://capsimtmk.sourceforge.net
XCAD Corporation
Raleigh, North Carolina */
|
|---|
/* transpose.s */
/***********************************************************************
transpose()
************************************************************************
This star inputs an image and transposes it.
|
|---|