• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AlcFree函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中AlcFree函数的典型用法代码示例。如果您正苦于以下问题:C++ AlcFree函数的具体用法?C++ AlcFree怎么用?C++ AlcFree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AlcFree函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: RecSecFree

/*!
* \ingroup	Reconstruct
* \brief	Free's the given section.
* \param	sec			Section to free.
*/
void		RecSecFree(RecSection *sec)
{
  REC_DBG((REC_DBG_SEC|REC_DBG_LVL_FN|REC_DBG_LVL_1),
	  ("RecSecFree FE 0x%lx\n",
	   (unsigned long )sec));
  if(sec)
  {
    REC_DBG((REC_DBG_SEC|REC_DBG_LVL_3),
	    ("RecSecFree 01 %d\n",
	     sec->linkcount));
    if(--(sec->linkcount) <= 0)
    {
      if(sec->imageFile)
      {
	AlcFree(sec->imageFile);
      }
      if(sec->transform)
      {
	REC_DBG((REC_DBG_SEC|REC_DBG_LVL_3),
		("RecSecFree 02 %d\n",
		 sec->transform->linkcount));
	(void )WlzFreeAffineTransform(sec->transform);
      }
      if(sec->obj)
      {
	REC_DBG((REC_DBG_SEC|REC_DBG_LVL_3),
		("RecSecFree 03 %d\n",
		 sec->obj->linkcount));
	(void )WlzFreeObj(sec->obj);
      }
      if(sec->transObj)
      {
	REC_DBG((REC_DBG_SEC|REC_DBG_LVL_3),
		("RecSecFree 04 %d\n",
		 sec->transObj->linkcount));
        (void )WlzFreeObj(sec->transObj);
      }
      if(sec->cumTransform)
      {
	REC_DBG((REC_DBG_SEC|REC_DBG_LVL_3),
		("RecSecFree 05 %d\n",
		 sec->cumTransform->linkcount));
	(void )WlzFreeAffineTransform(sec->cumTransform);
      }
      if(sec->cumTransObj && (sec->cumTransObj->linkcount > 0))
      {
	REC_DBG((REC_DBG_SEC|REC_DBG_LVL_3),
		("RecSecFree 05 %d\n",
		 sec->cumTransObj->linkcount));
        (void )WlzFreeObj(sec->cumTransObj);
      }
      AlcFree(sec);
    }
  }
  REC_DBG((REC_DBG_SEC|REC_DBG_LVL_FN|REC_DBG_LVL_1),
	  ("RecSecFree FX\n"));
}
开发者ID:VirtualFlyBrain,项目名称:Woolz,代码行数:62,代码来源:ReconstructSection.c


示例2: WlzDistMetricDirGM

/*!
* \return	Woolz error code.
* \ingroup	WlzFeatures
* \brief	Computes any combination of the directed Hausdorff, mean
*		nearest neighbour, median nearest neighbour and minimum
*		nearest neighbour distances
*		between the vertices of the given geometric models.
*		See WlzDistMetricDirVertex2D() for details of the metrics.
* \param	model0			First geometric model.
* \param	model1			Second geometric model.
* \param	dstDistH		Destination pointer for the directed
*					Hausdorff distance, may be NULL.
* \param	dstDistM		Destination pointer for the directed
*					mean nearest neighbour distance, may
*					be NULL.
* \param	dstDistN		Destination pointer for the directed
*					median nearest neighbour distance, may
*					be NULL.
* \param	dstDistI		Destination pointer for the minimum
*					nearest neighbour distance, may
*					be NULL.
*/
WlzErrorNum 	WlzDistMetricDirGM(WlzGMModel *model0, WlzGMModel *model1,
			        double *dstDistH, double *dstDistM,
				double *dstDistN, double *dstDistI)
{
  int		nV[2];
  WlzVertexP	vP[2];
  WlzVertexType vType[2];
  WlzErrorNum	errNum = WLZ_ERR_NONE;

  vP[0].v = vP[1].v = NULL;
  if((model0 == NULL) || (model1 == NULL))
  {
    errNum = WLZ_ERR_DOMAIN_NULL;
  }
  else if(model0->type != model1->type)
  {
    errNum = WLZ_ERR_DOMAIN_TYPE;
  }
  else
  {
    vP[0] = WlzVerticesFromGM(model0, NULL, NULL, nV + 0, vType + 0, &errNum); 
  }
  if(errNum == WLZ_ERR_NONE)
  {
    vP[1] = WlzVerticesFromGM(model1, NULL, NULL, nV + 1, vType + 1, &errNum); 
  }
  if(errNum == WLZ_ERR_NONE)
  {
    if(vType[0] != vType[1])
    {
      errNum = WLZ_ERR_DOMAIN_TYPE;
    }
  }
  if(errNum == WLZ_ERR_NONE)
  {
    switch(vType[0])
    {
      case WLZ_VERTEX_D2:
	errNum = WlzDistMetricDirVertex2D(nV[0], vP[0].d2, nV[1], vP[1].d2,
				          dstDistH, dstDistM, dstDistN,
					  dstDistI);
	break;
      case WLZ_VERTEX_D3:
	errNum = WlzDistMetricDirVertex3D(nV[0], vP[0].d3, nV[1], vP[1].d3,
				          dstDistH, dstDistM, dstDistN,
					  dstDistI);
	break;
      default:
        errNum = WLZ_ERR_DOMAIN_DATA;
	break;
    }
  }
  AlcFree(vP[0].v);
  AlcFree(vP[1].v);
  return(errNum);
}
开发者ID:VirtualFlyBrain,项目名称:Woolz,代码行数:78,代码来源:WlzDistMetric.c


示例3: AlcPtr3Calloc

/*!
* \return	Error code.
* \ingroup	AlcArray
* \brief	Allocates a 3 dimensional array of pointers to void.
* \note		Should be free'd using Alc3Free().
* \note		Array size is limited only by address space.
* \param	dest 			Destination for allocated array
*					pointer.
* \param	mElem 	 		Number of 2D arrays.
* \param	nElem 	 		Number of 1D arrays.
* \param	oElem 	 		Number of elements in each 1D
*					array.
*/
AlcErrno	AlcPtr3Calloc(void *****dest, size_t mElem, size_t nElem,
			       size_t oElem)
{
  size_t	index0,
  		index1;
  void		**dump0 = NULL,
  		***dump1 = NULL,
		****dump2 = NULL;
  AlcErrno	alcErrno = ALC_ER_NONE;

  if((dest) == NULL)
  {
    alcErrno = ALC_ER_NULLPTR;
  }
  else if((mElem < 1) || (nElem < 1) || (oElem < 1))
  {
    alcErrno = ALC_ER_NUMELEM;
  }
  else if(((dump0 = (void **)AlcCalloc(mElem * nElem * oElem,
  				       sizeof(void *))) == NULL) ||
          ((dump1 = (void ***)AlcMalloc(mElem * nElem *
	                                sizeof(void **))) == NULL) ||
          ((dump2 = (void ****)AlcMalloc(mElem * sizeof(void ***))) == NULL))
  {
    alcErrno = ALC_ER_ALLOC;
  }
  if(alcErrno == ALC_ER_NONE)
  {
    *(dest) = dump2;
    for(index0 = 0; index0 < mElem; ++index0)
    {
      for(index1=0; index1 < nElem; ++index1)
      {
	dump1[index1] = dump0;
	dump0 += oElem;
      }
      (*(dest))[index0] = dump1;
      dump1 += nElem;
    }
  }
  else
  {
    if(dest)
    {
      *(dest) = NULL;
    }
    AlcFree(dump2);
    AlcFree(dump1);
    AlcFree(dump0);
  }
  return(alcErrno);
}
开发者ID:VirtualFlyBrain,项目名称:Woolz,代码行数:65,代码来源:AlcArray.c


示例4: WlzBoundaryToPolyObjArray

/*!
* \return	Woolz error code.
* \ingroup	WlzBoundary
* \brief	decomposes a boundary into it's component polygons.
* \param	bndObj		Given boundary.
* \param	dstNumObjs	Destination pointer for the number of polygons.
* \param	dstObjArray	Destination pointer for the array of polygons.
*/
WlzErrorNum WlzBoundaryToPolyObjArray(
  WlzObject	*bndObj,
  int		*dstNumObjs,
  WlzObject	***dstObjArray)
{
  WlzErrorNum	errNum=WLZ_ERR_NONE;
  WlzDomain	domain;
  WlzValues	values;
  WlzObject	*obj, **objs;
  WlzPolygonDomain	**polyArray;
  int 		i, numPolys;

  /* check inputs */
  if( bndObj == NULL ){
    errNum = WLZ_ERR_OBJECT_NULL;
  }
  else if((dstNumObjs == NULL) || (dstObjArray == NULL)){
    errNum = WLZ_ERR_PARAM_NULL;
  }
  else {
    /* generate array of poly domains */
    errNum = WlzBoundObjToPolyDomArray(bndObj, &numPolys, &polyArray);
  }

  /* convert to polygon objects */
  if( errNum == WLZ_ERR_NONE ){
    if((objs = (WlzObject **) AlcMalloc(sizeof(WlzObject *)*numPolys)) == NULL){
      errNum = WLZ_ERR_MEM_ALLOC;
      for(i=0; i < numPolys; i++){
	WlzFreePolyDmn(polyArray[i]);
      }
      AlcFree(polyArray);
      numPolys = 0;
    }
    else {
      for(i=0; i < numPolys; i++){
	domain.poly = polyArray[i];
	values.core = NULL;
	obj = WlzMakeMain(WLZ_2D_POLYGON, domain, values,
			  NULL, NULL, &errNum);
	objs[i] = WlzAssignObject(obj, NULL);
	WlzFreePolyDmn(polyArray[i]);
      }
      AlcFree(polyArray);
    }
  }
  
  *dstNumObjs = numPolys;
  *dstObjArray = objs;
  return errNum;
}
开发者ID:dscho,项目名称:Woolz,代码行数:59,代码来源:WlzBoundaryUtils.c


示例5: HGU_XmFileListItemFree

void HGU_XmFileListItemFree(
  void	*entry)
{
  HGU_XmFileListCallbackStruct	*cbs;

  if( entry ){
    cbs = (HGU_XmFileListCallbackStruct *) entry;
    if( cbs->file ){
      AlcFree(cbs->file);
    }
    AlcFree(cbs);
  }
  return;
}
开发者ID:ma-tech,项目名称:HGUX,代码行数:14,代码来源:HGU_XmFileList.c


示例6: HGU_XmFileListWriteHeader

void HGU_XmFileListWriteHeader(
  FILE	*fp)
{
  BibFileRecord		*bibfileRecord;
  time_t		tmpTime;
  char			*tmpS, tmpBuf[256];
  char  		*dateS = NULL;
  char  		*hostS = NULL;
  char  		*userS = NULL;
  static char		unknownS[] = "unknown";

  /* write some sort of identifier */
  bibfileRecord = 
    BibFileRecordMake("Ident", "0",
		      BibFileFieldMakeVa("Text",
					 "HGU_Xm Image File List",
					 "Version",	"1.0",
					 NULL));
  BibFileRecordWrite(fp, NULL, bibfileRecord);
  BibFileRecordFree(&bibfileRecord);

  /* now a comment with user, machine, date etc. */
  tmpS = getenv("USER");
  (void )sprintf(tmpBuf, "User: %s", tmpS?tmpS:unknownS);
  userS = AlcStrDup(tmpBuf);

  tmpTime = time(NULL);
  tmpS = ctime(&tmpTime);
  *(tmpS + strlen(tmpS) - 1) = '\0';
  (void )sprintf(tmpBuf, "Date: %s", tmpS?tmpS:unknownS);
  dateS = AlcStrDup(tmpBuf);

  tmpS = getenv("HOST");
  (void )sprintf(tmpBuf, "Host: %s", tmpS?tmpS:unknownS);
  hostS = AlcStrDup(tmpBuf);

  bibfileRecord = 
    BibFileRecordMake("Comment", "0",
		      BibFileFieldMakeVa("Text", userS,
					 "Text", dateS,
					 "Text", hostS,
					 NULL));
  BibFileRecordWrite(fp, NULL, bibfileRecord);
  BibFileRecordFree(&bibfileRecord);
  AlcFree(userS);
  AlcFree(dateS);
  AlcFree(hostS);

  return;
}
开发者ID:ma-tech,项目名称:HGUX,代码行数:50,代码来源:HGU_XmFileList.c


示例7: WlzGreyValueFreeWSp

/*!
* \return	void
* \ingroup	WlzAccess
* \brief	Free's the given grey value work space created by
* 		WlzGreyValueMakeWSp().
* \param	gVWSp			Given grey value work space.
*/
void		WlzGreyValueFreeWSp(WlzGreyValueWSpace *gVWSp)
{
  WLZ_DBG((WLZ_DBG_LVL_1),
  	   ("WlzGreyValueFreeWSp FE %p\n",
	    gVWSp));
  if(gVWSp)
  {
    (void )WlzFreeAffineTransform(gVWSp->invTrans);
    AlcFree((void *)(gVWSp->gTabTypes3D));
    AlcFree(gVWSp);
  }
  WLZ_DBG((WLZ_DBG_LVL_FN|WLZ_DBG_LVL_1),
  	  ("WlzGreyValueFreeWSp FX\n"));
}
开发者ID:ma-tech,项目名称:Woolz,代码行数:21,代码来源:WlzGreyValue.c


示例8: WlzEffAmFreeHead

/*!
* \return	<void>
* \ingroup	WlzExtFF
* \brief	Free's entries in the Amira file header data structure
*		before freeing the header data structure itself.
* \param	head			The given file header data structure.
*/
static void	WlzEffAmFreeHead(WlzEffAmHead *head)
{
  WlzEffAmMaterial *e0;

  AlcFree(head->imageData);
  if(head)
  {
    e0 = head->materials;
    while(e0)
    {
      AlcFree(e0->name);
      e0 = e0->next;
    }
  }
}
开发者ID:dscho,项目名称:Woolz,代码行数:22,代码来源:WlzExtFFAm.c


示例9: AlcPtr2Malloc

/*!
* \return	Error code.
* \ingroup	AlcArray
* \brief	Allocates a 2 dimensional non-zero'd array of pointers
*		to void.
* \note		Should be free'd using Alc2Free().
* \note		Array size is limited only by address space.
* \param	dest 		 	Destination for allocated array
*					pointer.
* \param	mElem 	 		Number of 1D arrays.
* \param	nElem 	 		Number of elements in each 1D
*					array.
*/
AlcErrno	AlcPtr2Malloc(void ****dest, size_t mElem, size_t nElem)
{
  size_t	index;
  void 		**dump0 = NULL;
  void   	***dump1 = NULL;
  AlcErrno	alcErrno = ALC_ER_NONE;
 
  /* Template doesn't work for pointer types. */
  if(dest == NULL)
  {
    alcErrno = ALC_ER_NULLPTR;
  }
  else if((mElem < 1) || (nElem < 1))
  {
    alcErrno = ALC_ER_NUMELEM;
  }
  else if(((dump0 = (void **)AlcMalloc(mElem * nElem *
  				       sizeof(void *))) == NULL) ||
          ((dump1 = (void ***)AlcMalloc(mElem * sizeof(void **))) == NULL))
  {
    alcErrno = ALC_ER_ALLOC;
  }
  if(alcErrno == ALC_ER_NONE)
  {
    *dest = dump1;
    for(index = 0; index < mElem; ++index)
    {
      (*dest)[index] = dump0;
      dump0 += nElem;
    }
  }
  else
  {
    if(dest)
    {
      *dest = NULL;
    }
    if(dump0)
    {
      AlcFree(dump0);
    }
    if(dump1)
    {
      AlcFree(dump1);
    }
  }
  return(alcErrno);
}
开发者ID:VirtualFlyBrain,项目名称:Woolz,代码行数:61,代码来源:AlcArray.c


示例10: WlzFreeContour

/*! 
* \ingroup      WlzAllocation
* \brief        Free's a WlzContour data structure.
*
* \return       Error number, values: WLZ_ERR_NONE, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE and from WlzUnlink().
* \param    ctr				Contour to be freed.
* \par      Source:
*                WlzFreeSpace.c
*/
WlzErrorNum	WlzFreeContour(WlzContour *ctr)
{
  WlzErrorNum	errNum = WLZ_ERR_NONE;

  if(ctr == NULL)
  {
    errNum = WLZ_ERR_DOMAIN_NULL;
  }
  else if(ctr->type != WLZ_CONTOUR)
  {
    errNum = WLZ_ERR_DOMAIN_TYPE;
  }
  else
  {
    if(WlzUnlink(&(ctr->linkcount), &errNum))
    {
      if(ctr->model && WlzUnlink(&(ctr->model->linkcount), &errNum))
      {
        (void )WlzGMModelFree(ctr->model);
      }
      AlcFree((void *)ctr);
    }
  }
  return(errNum);
}
开发者ID:omsai,项目名称:Woolz,代码行数:34,代码来源:WlzFreeSpace.c


示例11: WlzFreeValues

/*! 
* \ingroup      WlzAllocation
* \brief        Free a values structure, currently only WlzRagRValues
and WlzRectValues DO NOT call this function with any
other values structure types!
*
* \return       Error number, values: WLZ_ERR_NONE, WLZ_ERR_VALUES_DATA.
* \param    values	Values union to be freed.
* \par      Source:
*                WlzFreeSpace.c
*/
WlzErrorNum WlzFreeValues(WlzValues values)
{
  WlzErrorNum	errNum = WLZ_ERR_NONE;

  /* check the object pointer and linkcount */
  if (values.v == NULL){
    return( WLZ_ERR_NONE );
  }

  if( WlzUnlink(&(values.v->linkcount), &errNum) ){
			
    /* if there is a freeptr then free it */
    if (values.v->freeptr != NULL){

      /* it is illegal for a table to point to itself */
      if( values.v->original_table.v != NULL ){
	return( WLZ_ERR_VALUES_DATA );
      }
      (void )AlcFreeStackFree(values.v->freeptr);

    }
    
    if( values.v->original_table.v ){
      errNum = WlzFreeValues( values.v->original_table );
    }

    AlcFree((void *) values.v);
  }

  return( errNum );
}
开发者ID:omsai,项目名称:Woolz,代码行数:42,代码来源:WlzFreeSpace.c


示例12: WlzRsvFilterFreeFilter

/*!
* \return	void
* \ingroup      WlzValueFilters
* \brief	Free a recursive filter.
* \param	ftr			Filter to free.
*/
void		WlzRsvFilterFreeFilter(WlzRsvFilter *ftr)
{
  if(ftr != NULL)
  {
    AlcFree(ftr);
  }
}
开发者ID:omsai,项目名称:Woolz,代码行数:13,代码来源:WlzRsvFilter.c


示例13: REC_DBG

/*!
* \return	New registration section.
* \ingroup	Reconstruct
* \brief	Makes a registration section using the given member values.
* \param	index			Section index.
* \param	iterations		Number of iterations to find
*                                       section transform.
* \param	correlation		Section correlation value.
* \param	imageFile		Image file path, this is duplicated
*					so that the original may be freed
*					The image file path must not be NULL.
* \param	transform		Section transform, if NULL an identity
* 					transform is created.
* \param	obj			Woolz object corresponding to the given
* 					image file. This may be NULL without
* 					causing the object to be read from the
* 					associated file.
*/
RecSection	*RecSecMake(int index, int iterations, double correlation,
			    char *imageFile,
			    WlzAffineTransform *transform, WlzObject *obj)
{
  RecSection	*sec = NULL;
  char		*newImageFile = NULL;
  WlzAffineTransform	*newTransform = NULL;
  WlzErrorNum	wlzErr = WLZ_ERR_NONE;

  REC_DBG((REC_DBG_SEC|REC_DBG_LVL_FN|REC_DBG_LVL_1),
	  ("RecSecMake FE %d %d %g 0x%lx 0x%lx 0x%lx\n",
	   index, iterations, correlation,
	   (unsigned long )imageFile, (unsigned long )transform,
	   (unsigned long )obj));
  if(imageFile)
  {
    newImageFile = AlcStrDup(imageFile);
  }
  if(newImageFile && (transform == NULL))
  {
    newTransform = WlzAffineTransformFromPrimVal(WLZ_TRANSFORM_2D_AFFINE,
    					         0.0, 0.0, 0.0,
					         1.0, 0.0, 0.0,
					         0.0, 0.0, 0.0, 0, &wlzErr);
  }
  if(newImageFile && (newTransform || transform) && (wlzErr == WLZ_ERR_NONE))
  {
    sec = (RecSection *)AlcMalloc(sizeof(RecSection));
  }
  if(sec == NULL)
  {
    if(newImageFile)
    {
      AlcFree(newImageFile);
    }
    if(newTransform)
    {
      WlzFreeAffineTransform(newTransform);
    }
  }
  else
  {
    sec->linkcount = 0;
    sec->index = index;
    sec->iterations = iterations;
    sec->correl = correlation;
    sec->obj = WlzAssignObject(obj, NULL);
    sec->imageFile = newImageFile;
    sec->transform = WlzAssignAffineTransform(transform? transform:
    							 newTransform, NULL);
    sec->transObj = NULL;
    sec->cumTransform = NULL;
    sec->cumTransObj = NULL;
  }
  REC_DBG((REC_DBG_SEC|REC_DBG_LVL_FN|REC_DBG_LVL_1),
	  ("RecSecMake FX 0x%lx\n",
	   (unsigned long )sec));
  return(sec);
}
开发者ID:VirtualFlyBrain,项目名称:Woolz,代码行数:77,代码来源:ReconstructSection.c


示例14: WlzJavaArray1DFree

/************************************************************************
* Function:	WlzJavaArray1DFree				
* Returns:	void						
* Purpose:	Free's a temporary native 1D array.			
* Global refs:	-						
* Parameters:	void *aDat:		Array data structure.	
*		int aSz:		Array size.		
*		int dSKey:		Data structure identification.
*		jboolean isCpy:		Copy flag for JNI functions.
************************************************************************/
void		WlzJavaArray1DFree(void *aDat, int aSz,
			      int dSKey, jboolean isCpy)
{
  if(isCpy && aDat && (aSz > 0))
  {
    AlcFree(aDat);
  }
}
开发者ID:dscho,项目名称:Woolz,代码行数:18,代码来源:WlzJavaArray1D.c


示例15: freechain

static int freechain(WlzLLink *l)
{
  if (l != NULL) {
    freechain(l->l_link);
    AlcFree((char *) l);
  }

  return( 0 );
}
开发者ID:dscho,项目名称:Woolz,代码行数:9,代码来源:WlzLabel.c


示例16: WlzMakeMain

/*!
* \return	Integer array with values and coordinates from 3D object.
* \ingroup	WlzValueUtils
* \brief	Allocates a new array (4 ints per value: 0 = value,
* 		1 = x coordinate, 2 = y coordinate and 3 = z coordinate.
* \param	obj			Given object which must be a valid
* 					3D domain object with integer values.
* \param	dstNAry			Destination pointer for the number of
* 					values, must not be NULL.
* \param	dstErr			Destination error pointer, may be NULL.
*/
static int	*WlzCompDispMakeValAry3D(WlzObject *obj, int *dstNAry,
				         WlzErrorNum *dstErr)
{
  int		idO,
  		idP,
		nAry;
  int		*ary,
  		*array = NULL;
  WlzObject	*obj2D;
  WlzPlaneDomain *pDom;
  WlzErrorNum	errNum = WLZ_ERR_NONE;

  if((nAry = WlzVolume(obj, &errNum)) <= 0)
  {
    errNum = WLZ_ERR_DOMAIN_DATA;
  }
  if(errNum == WLZ_ERR_NONE)
  {
    if((array = AlcMalloc(nAry * 4 * sizeof(int))) == NULL)
    {
      errNum = WLZ_ERR_MEM_ALLOC;
    }
  }
  if(errNum == WLZ_ERR_NONE)
  {
    ary = array;
    pDom = obj->domain.p;
    for(idP = pDom->plane1; (errNum == WLZ_ERR_NONE) && (idP <= pDom->lastpl);
        ++idP)
    {
      idO = idP - pDom->plane1;
      obj2D = WlzMakeMain(WLZ_2D_DOMAINOBJ,
			  *(obj->domain.p->domains + idO),
			  *(obj->values.vox->values + idO),
			  NULL, NULL, &errNum);
      if(errNum == WLZ_ERR_NONE)
      {
	errNum = WlzCompDispSetAry(&ary, obj2D, idP, 3);
	WlzFreeObj(obj2D);
      }
    }
  }
  if(errNum != WLZ_ERR_NONE)
  {
    AlcFree(ary);
    ary = NULL;
  }
  else
  {
    *dstNAry = nAry;
    if(dstErr != NULL)
    {
      *dstErr = errNum;
    }
  }
  return(array);
}
开发者ID:dscho,项目名称:Woolz,代码行数:68,代码来源:WlzCompDispIncGrey.c


示例17: HGU_XmFileListDestroyMenuItems

WlzErrorNum HGU_XmFileListDestroyMenuItems(
  MenuItem	*items)
{
  WlzErrorNum	errNum=WLZ_ERR_NONE;
  int		i;

  /* check inputs */
  if( items == NULL ){
    errNum = WLZ_ERR_PARAM_NULL;
  }
  else {
    for(i=0; items[i].name != NULL; i++){
      AlcFree(items[i].name);
    }
    AlcFree(items);
  }

  return errNum;
}
开发者ID:ma-tech,项目名称:HGUX,代码行数:19,代码来源:HGU_XmFileList.c


示例18: WlzFree3DWarpTrans

/*! 
* \ingroup      WlzAllocation
* \brief        Free a 3D warp transform.
*
* \return       Error number, values: WLZ_ERR_NONE and from WlzFreePlaneDomain().
* \param    obj	3D warp transform object to be freed.
* \par      Source:
*                WlzFreeSpace.c
*/
WlzErrorNum	WlzFree3DWarpTrans(Wlz3DWarpTrans *obj)
{
  WlzErrorNum	errNum = WLZ_ERR_NONE;

  if(obj == NULL)
  {
     errNum = WLZ_ERR_OBJECT_NULL;
  }
  else
  {
    if(obj->intptdoms)
    {
      (void )AlcFree(obj->intptdoms);
    }
    if(obj->pdom)
    {
      errNum = WlzFreePlaneDomain(obj->pdom);
    }
    (void )AlcFree(obj);
  }
  return(errNum);
}
开发者ID:omsai,项目名称:Woolz,代码行数:31,代码来源:WlzFreeSpace.c


示例19: WlzFreeIndexedValues

/*!
* \return	Woolz error code.
* \ingroup	WlzAllocation
* \brief	Frees an indexed valuetable.
* \param	ixv			Given indexed valuetable.
*/
WlzErrorNum	WlzFreeIndexedValues(WlzIndexedValues *ixv)
{
  WlzErrorNum	errNum = WLZ_ERR_NONE;

  if(ixv == NULL)
  {
    errNum = WLZ_ERR_VALUES_NULL;
  }
  else if(ixv->type != WLZ_INDEXED_VALUES)
  {
    errNum = WLZ_ERR_VALUES_TYPE;
  }
  else
  {
    (void )AlcVectorFree(ixv->values);
    if(ixv->rank > 0)
    {
      AlcFree(ixv->dim);
    }
    AlcFree(ixv);
  }
  return(errNum);
}
开发者ID:omsai,项目名称:Woolz,代码行数:29,代码来源:WlzFreeSpace.c


示例20: switch

/*!
* \return	New affine transform initialized to the identity transform.
* \ingroup	WlzTransform
* \brief	Allocates and initialises space for a 2D or 3D affine
*               transform. Sufficient space is always allocated for a
*               3D transform.
*		The transform should be freed using WlzFreeAffineTransform().
* \param	type			Transform type.
* \param	dstErr			Destination error pointer, may
*                                       be null.
*/
WlzAffineTransform *WlzMakeAffineTransform(WlzTransformType type,
  				           WlzErrorNum *dstErr)
{
  WlzAffineTransform *trans=NULL;
  WlzErrorNum	errNum = WLZ_ERR_NONE;

  switch(type)
  {
    case WLZ_TRANSFORM_2D_AFFINE:
    case WLZ_TRANSFORM_2D_REG:
    case WLZ_TRANSFORM_2D_TRANS:
    case WLZ_TRANSFORM_2D_NOSHEAR:
    case WLZ_TRANSFORM_3D_AFFINE:
    case WLZ_TRANSFORM_3D_REG:
    case WLZ_TRANSFORM_3D_TRANS:
    case WLZ_TRANSFORM_3D_NOSHEAR:
      break;
    default:
      errNum = WLZ_ERR_TRANSFORM_TYPE;
      break;
  }
  if(errNum == WLZ_ERR_NONE)
  {
    if(((trans = (WlzAffineTransform *)
                 AlcCalloc(1, sizeof(WlzAffineTransform))) == NULL) ||
       (AlcDouble2Calloc(&trans->mat, 4, 4) != ALC_ER_NONE))
    {
      if(trans)
      {
        AlcFree(trans);
	trans = NULL;
      }
      errNum = WLZ_ERR_MEM_ALLOC;
    }
  }
  if(errNum == WLZ_ERR_NONE)
  {
    trans->type = type;
    /* Initialize to the identity transform */
    trans->mat[0][0] = 1.0;
    trans->mat[1][1] = 1.0;
    trans->mat[2][2] = 1.0;
    trans->mat[3][3] = 1.0;
  }
  if(dstErr)
  {
    *dstErr = errNum;
  }
  return(trans);
}
开发者ID:VirtualFlyBrain,项目名称:Woolz,代码行数:61,代码来源:WlzMakeAffineTransform.c



注:本文中的AlcFree函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AlcMalloc函数代码示例发布时间:2022-05-30
下一篇:
C++ AlarmsSet函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap