Lines Matching refs:node_info
116 *node_info; member
196 *node_info; in ClassifyImageColors() local
239 node_info=cube_info->root; in ClassifyImageColors()
245 if (node_info->child[id] == (NodeInfo *) NULL) in ClassifyImageColors()
247 node_info->child[id]=GetNodeInfo(cube_info,level); in ClassifyImageColors()
248 if (node_info->child[id] == (NodeInfo *) NULL) in ClassifyImageColors()
256 node_info=node_info->child[id]; in ClassifyImageColors()
259 for (i=0; i < (ssize_t) node_info->number_unique; i++) in ClassifyImageColors()
260 if (IsPixelInfoEquivalent(&pixel,node_info->list+i) != MagickFalse) in ClassifyImageColors()
262 if (i < (ssize_t) node_info->number_unique) in ClassifyImageColors()
263 node_info->list[i].count++; in ClassifyImageColors()
266 if (node_info->number_unique == 0) in ClassifyImageColors()
268 node_info->extent=1; in ClassifyImageColors()
269 node_info->list=(PixelInfo *) AcquireQuantumMemory( in ClassifyImageColors()
270 node_info->extent,sizeof(*node_info->list)); in ClassifyImageColors()
273 if (i >= (ssize_t) node_info->extent) in ClassifyImageColors()
275 node_info->extent<<=1; in ClassifyImageColors()
276 node_info->list=(PixelInfo *) ResizeQuantumMemory( in ClassifyImageColors()
277 node_info->list,node_info->extent,sizeof(*node_info->list)); in ClassifyImageColors()
279 if (node_info->list == (PixelInfo *) NULL) in ClassifyImageColors()
286 node_info->list[i]=pixel; in ClassifyImageColors()
287 node_info->list[i].red=(double) GetPixelRed(image,p); in ClassifyImageColors()
288 node_info->list[i].green=(double) GetPixelGreen(image,p); in ClassifyImageColors()
289 node_info->list[i].blue=(double) GetPixelBlue(image,p); in ClassifyImageColors()
291 node_info->list[i].black=(double) GetPixelBlack(image,p); in ClassifyImageColors()
292 node_info->list[i].alpha=(double) GetPixelAlpha(image,p); in ClassifyImageColors()
293 node_info->list[i].count=1; in ClassifyImageColors()
294 node_info->number_unique++; in ClassifyImageColors()
338 static void DefineImageHistogram(const Image *image,NodeInfo *node_info, in DefineImageHistogram() argument
352 if (node_info->child[i] != (NodeInfo *) NULL) in DefineImageHistogram()
353 DefineImageHistogram(image,node_info->child[i],histogram); in DefineImageHistogram()
354 if (node_info->level == (MaxTreeDepth-1)) in DefineImageHistogram()
359 p=node_info->list; in DefineImageHistogram()
360 for (i=0; i < (ssize_t) node_info->number_unique; i++) in DefineImageHistogram()
438 static void DestroyColorCube(const Image *image,NodeInfo *node_info) in DestroyColorCube() argument
451 if (node_info->child[i] != (NodeInfo *) NULL) in DestroyColorCube()
452 DestroyColorCube(image,node_info->child[i]); in DestroyColorCube()
453 if (node_info->list != (PixelInfo *) NULL) in DestroyColorCube()
454 node_info->list=(PixelInfo *) RelinquishMagickMemory(node_info->list); in DestroyColorCube()
588 *node_info; in GetNodeInfo() local
603 cube_info->node_info=nodes->nodes; in GetNodeInfo()
607 node_info=cube_info->node_info++; in GetNodeInfo()
608 (void) memset(node_info,0,sizeof(*node_info)); in GetNodeInfo()
609 node_info->level=level; in GetNodeInfo()
610 return(node_info); in GetNodeInfo()
660 *node_info; in CheckImageColors() local
698 node_info=cube_info->root; in CheckImageColors()
704 if (node_info->child[id] == (NodeInfo *) NULL) in CheckImageColors()
706 node_info->child[id]=GetNodeInfo(cube_info,level); in CheckImageColors()
707 if (node_info->child[id] == (NodeInfo *) NULL) in CheckImageColors()
715 node_info=node_info->child[id]; in CheckImageColors()
720 for (i=0; i < (ssize_t) node_info->number_unique; i++) in CheckImageColors()
722 target=node_info->list[i]; in CheckImageColors()
726 if (i < (ssize_t) node_info->number_unique) in CheckImageColors()
727 node_info->list[i].count++; in CheckImageColors()
733 if (node_info->number_unique == 0) in CheckImageColors()
734 node_info->list=(PixelInfo *) AcquireMagickMemory( in CheckImageColors()
735 sizeof(*node_info->list)); in CheckImageColors()
737 node_info->list=(PixelInfo *) ResizeQuantumMemory(node_info->list, in CheckImageColors()
738 (size_t) (i+1),sizeof(*node_info->list)); in CheckImageColors()
739 if (node_info->list == (PixelInfo *) NULL) in CheckImageColors()
746 GetPixelInfo(image,&node_info->list[i]); in CheckImageColors()
747 node_info->list[i].red=(double) GetPixelRed(image,p); in CheckImageColors()
748 node_info->list[i].green=(double) GetPixelGreen(image,p); in CheckImageColors()
749 node_info->list[i].blue=(double) GetPixelBlue(image,p); in CheckImageColors()
751 node_info->list[i].black=(double) GetPixelBlack(image,p); in CheckImageColors()
752 node_info->list[i].alpha=(double) GetPixelAlpha(image,p); in CheckImageColors()
753 node_info->list[i].count=1; in CheckImageColors()
754 node_info->number_unique++; in CheckImageColors()
1122 CubeInfo *cube_info,const NodeInfo *node_info,ExceptionInfo *exception) in UniqueColorsToImage() argument
1140 if (node_info->child[i] != (NodeInfo *) NULL) in UniqueColorsToImage()
1142 node_info->child[i],exception); in UniqueColorsToImage()
1143 if (node_info->level == (MaxTreeDepth-1)) in UniqueColorsToImage()
1152 p=node_info->list; in UniqueColorsToImage()
1153 for (i=0; i < (ssize_t) node_info->number_unique; i++) in UniqueColorsToImage()