Analyze>Set Measurements.
> If you check 'Display Label' in Analyze>Set Measurements...
> eg in macrozzzz:
> run("Set Measurements...", "area centroid center bounding
> integrated display redirect=None decimal=0");
> IJ measure or analyzeParticles will record the slice in the Label
> field appended with a preceding colon ":".
>
> Unfortunately, this is not directly accessible as there is macro
> function equivalent to
> getResult("Label", row);
> even though there is a
> setResult("Label", row, string);
>
> Although it is a bit of a sledgehammer to crack a nut, the
> following macro code will read the ResultsTable
> and add a Column "Slice" with the value extracted from the Label
> field. (It is quite quick even for thousands of particle result rows).
>
> Your macros can then read X,Y and Z "Slice" columns via getResult
> ("Slice",row);.
> __________________________________________
> getSliceFromLabelCol();
>
> function getSliceFromLabelCol(){
> selectWindow("Results");
> rr=split(getInfo(),"\n");
> for(i=1;i<lengthOf(rr);i++){
> rrr=split(rr[i],"\t");
> ss=split(rrr[1],":");
> ls=lengthOf(ss);
> if(ls>1){
> slice=0+ss[ls-1];
> setResult("Slice",i-1,slice);
> }
> }
> updateResults();
> }
> _________________________________________
>
>
>> On Tuesday 07 February 2006 14:26, Jo C. Bruusgaard wrote:
>>> hello!
>>>
>>> I have run into a problem when I use ImageJ to extract 3D
>>> coordinates
>>> from a stack. The x,y coordinates are written nicely to the
>>> "measurements"-window. However, I am not able to get info about
>>> which
>>> slice in the stack the measurement is taken from. Does anyone know
>>> how to do this?
>>
>> Hi,
>>
>> Are you talking about the Analyze->Measure tool? Indeed, the mass
>> center and
>> centroid reported by that tool seem to take only the current stack
>> slice into
>> account (ImageJ v. 1.34s).
>>
>> This missing z-coordinate is easy to "fix", but question is if
>> supposed to
>> work like that, and if we fix it, will code/macros depending on it
>> working
>> the way it does now break?
>>
>> Wayne, what do you think?
>>
>> --
>> Per Christian Henden
>
>
> --
> __
> Greg Joss,
> Department of Biological Sciences, Phone: (61)(2) 9850 8212
> Macquarie University, Email:
[hidden email]
> North Ryde, (Sydney,) NSW 2109, Australia