How exactly do I return coordinates for all non-alpha values within a radius within x,y,z coordinates? The first 3 coordinates would be the 0,0,0 relative point.
For codes on found in my thread:
#@cli rep_n0_alp_coords: eq. to 'rep_nonzero_alpha_count'. : (+)
rep_n0_alp_coords: rep_nonzero_alpha_coordinates
#@cli rep_nonzero_alpha_coordinates:
#@cli : Return the number of non-zero alpha of selected images.
#@cli : (eq. to 'rep_n0_alp_coords').
rep_nonzero_alpha_coordinates:
imgs={$!}
tna=${-rep_n0_alp_c}
tna={"sum("$tna")"}
tna*=3
u {"coordinates=vector"$tna"(0);mult=0;
for(img=0,img<"$imgs",img++,
last_channel=s#img-1;
for(pz=0,pz<d#img,pz++,
for(py=0,py<h#img,py++,
for(px=0,px<w#img,px++,
if(i(#img,px,py,pz,last_channel)!=0,coordinates[mult*3]=px;coordinates[mult*3+1]=py;coordinates[mult*3+2];mult++;);
);
);
);
);
(coordinates)
"}
#@cli rep_n0_alp_c: eq. to 'rep_nonzero_alpha_count'. : (+)
rep_n0_alp_c: rep_nonzero_alpha_count
#@cli rep_nonzero_alpha_count:
#@cli : Return the number of non-zero alpha of selected images.
#@cli : (eq. to 'rep_n0_alp_c').
rep_nonzero_alpha_count:
imgs={$!}
u {"num_alpha=vector"$imgs"(0);
for(img=0,img<"$imgs",img++,
alpha_count=0;
last_channel=s#img-1;
for(pz=0,pz<d#img,pz++,
for(px=0,px<w#img,px++,
for(py=0,py<h#img,py++,
if(i(#img,px,py,pz,last_channel)!=0,alpha_count++;);
);
);
);
num_alpha[img]=alpha_count;
);
(num_alpha)
"}
And this is an ongoing solution to solve this thread - Anything to autoconnect points within G'MIC?