MacStereology 2.8 ================ Welcome to MacStereology. This demo disk contains the latest version of MacStereology, but with a few of the options for new files disabled. This disk may be freely copied and circulated. Experiment with the 3-D data and Images to see the sort of analyses are possible. What does MacStereology do? ========================= MacStereology is package designed to make measurements of images and to make 3-D reconstructions. Input to MacStereology is either from a digitising tablet or from Pict files. The boundaries of the objects of interest can therefore be drawn by hand on the tablet or traced automatically on a binary image. From these boundaries and the magnification, parameters such as area, perimeter and centre of gravity are calculated. If the co-ordinates of each boundary are also saved, together with the section thicknesses then 3-D reconstructions can be displayed, printed or plotted, using a wireframe (for pen plotter), layers or surface plot. Which Macintosh? =============== MacStereology should work with any Macintosh with at least 1 Mbyte memory. It was designed for a MacII with 8-bit colour, but is OK in grey tones or black and white. Printing can use an ImageWriter or LaserWriter, including the new IIf and IIg (very nice half tones) and probably any third party printer and print spooler. Data collected on one Mac can be displayed on any other Mac. Data from previous versions of MacStereology should be fully compatible and will use the defaults for the new features. Digitising tablets ================ The input from a digitising tablet can be any tablet that plugs into an ADB port (as is now used by the keyboard and mouse of most Macintoshes) and has an Init for the System folder that uses the Macintosh standard tablet interface which was released in 1990. For the older Macintoshes (e.g. Mac plus) which do not have any ADB ports input can be via a serial line tablet (configured for Summagraphics tablet, but an alternative is available). Demo data ========= The demo data files and images are compressed. To unpack them just double click and indicate where you want to put the files (probably a hard disc, but could be a floppy discs). The Demo data files and images are designed to let you see some aspects of data analysis and display. The 3-D folder contains data files captured with MacStereology, whereas the Images folder contains Pict files from a variety of other applications that can be read via the Read image commands in the Image menu) There are many more options within the program, but you will need the full version and the instruction manual to make best use of them. The following is an extract from the reference manual (minus pictures) to show what can be done with the test files:Ð Section 2 Ð Test data files ------------------------ MacStereology is supplied with a range of data files to enable you to test the program. These are data files for 3-D display and images which can be analysed. 2.1 3-D test files These files are designed to show you the sort of 3-D reconstructions; that are possible. Use a copy of them so that the original settings are not lost by mistake. Most of the options described (such as Wireframe, Layers and Surface) will be found in the 3-D menu. For a Macintosh Plus or SE you should reduce the sizes of the plots (Magnification in Position dialogue of 3-D menu). Since these must use bit map patterns, the plots will be clearer on these machines if you select Mark edges (Lighting dialogue). If you loose the plot just select Reset 3D (3-D menu) to get a reasonable (though not ideal) plot back. Alternatively Close (File menu) the file and Discard the changes then reOpen it. 2.1.1 ÒPearÓ data file Either start MacStereology by double clicking the application then Open (File menu) the data file, or just double click the file ÒPearÓ. The first frame of the file is displayed, which is just the bottom of the pear. (If the digitising tablet is in use when you Open a file the last frame will be displayed Ð tip of the stalk Ð since it will be assumed that you want to collect more data) The dialogue shows how many frames and objects there are in this data file (pressing the mouse button down will stop it disappearing, but you can get the same information by calling Ster help in Apple menu). Plot a 3-D reconstruction by selecting Layers. The default shading is a different shade for each layer (shades of yellow and green if you have a colour Macintosh II). Try Order (3-D menu) to plot the layers in reverse order (click button labelled 14-1 then click OK) or any jumbled order (e.g. type 1-5 12*3 7-4). Use the Position (3-D menu) dialogue to change the Magnification (e.g. type 0.5 then click OK). If you lose the pear you can always select Reset 3D to bring it back (in shades of red and yellow). Use Order to restore the original order of 1Ð14. When you Close (File menu) the file can be saved in what ever state you last displayed it. Solid (3-D menu) takes a bit longer to plot. You should now see that the pear has a bite out of it. The Resolution of plot can be varied from the Position dialogue (3-D menu) Ð choose a higher value for Resolution for a faster plot at lower resolution. Wireframe (3-D menu) will show a plot similar to how it would be sent to a digital plotter. Note that it is plotted from the top to the bottom, since the masking for a plotter must be precalculated. The dotted parts of the reconstruction are calculated from the co-ordinates of the original data, so will line up if you make a stereo pair by using Viewpoint (3-D menu) by clicking Stereo pair with Separation of 62.5 mm and Angle 5¡, but you will need to reduce the size of the display or increase the spacing to separate the two images. When you have finished Close (File menu) this data file then Open (File menu) another or Quit (File menu) from the program. 2.1.2 ÒSquareÓ data file (to display a cube) This file actually consists of just one object with only 4 points in just one frame! Open this data file by selecting Layers (3-D menu). If no file is open then any command that requires a file automatically calls Open first. The resultant plot is a perspective view of a cube consisting of 11 layers (1*11). By default this file has been set up as a stereo pair with the standard 62.5 mm spacing. By selecting Order (3-D menu) you will see that the single frame is repeated 11 times. If you select the button marked 1-1 you will then get a plot of just one layer. Changing the Distance to 0 in Viewpoint (3-D menu) will change the plot to isometric. Use Order to return to the full 11 frames then try the Wireframe plot. Note that the lines of the visible part are interpolated up to the point where they disappear. If the option from Select is for Lines + dots, this will look similar except the corner of the masked part appears as a single dot. The Solid reconstruction plots the surfaces of the cube. The plotting is quite rapid since there are only 4 surfaces to be established for each layer. Try changing Fill in the Select (3-D menu) option. When complete, Close the file and Discard any changes. 2.1.3 ÒSphere + CubeÓ data file This shows a sphere floating inside a cube. If you call Select (3-D menu) you will see that the plotting mode of the cube is Solid and not Filled sphere and the sphere is a Surface. Try changing plotting modes and colours, e.g. the cube in Surface mode and not Opaque. You can try the effect of changing the Viewpoint (3-D menu) to see how Rotation and Tilt change the appearance of the plot. If you Tilt the reconstruction towards you but stop the plotting half way through by holding the mouse button down you can get a cut away view looking into the sphere (need no Fill). The same effect can be achieved by using Order (3-D menu) to plot only a few layers. 2.1.4 Ò3-Ply plaitÓ data file Each layer consists of 3 circles mathematically generated to make a plaited rope. Use Layers to see the general form, but the shading/colour gives little idea of the structure. The default scale is probably too large for your Macintosh screen, but plotting can be stopped by holding down the mouse button until the current layer has been plotted. The Wireframe plot will start off the top of the screen and eventually produce a jumble of ellipses! Choose Solid to see the detail. The three strands of the plait are now obvious. You can vary the amount of Depth shading from Lighting (3-D menu) Ð 0% entirely orientation to 100% entirely depth. The size of the facets can be changed using Resolution in Lighting (3-D menu). A value for Resolution of 1 or 0 will produce small facets showing a fairly smooth surface. To get an even better surface use a Resolution of 3 then set Interpolate shading to 5 in Lighting. A final change to remove the layer lines can be made by removing the filling for all IDs (Select dialogue, press the Command key then click not Fill) and setting the Line thickness to zero in Lighting. 2.1.5 ÒBlood vesselsÓ data file This is a file of real data showing a small part of a network of branching blood vessels. In Layers or Wireframe this does not look particularly interesting, but the Surface reconstruction shows the complexity of the branching, but if you want to remove the colours either use Mac config. (File menu) to show it in grey tones or Select (3-D menu) to make all Highlight and Shadow colours the same. 2.1.6 ÒSplitÓ and ÒSplit*Ó data files These files contain the same data with some changes made to the Linkage (3-D menu). They are designed to demonstrate two different ways of showing how objects can be made to split and join. Plot these files to see the effects. If the Split* file is shown in colour you can see how the joins are constructed. 2.1.7 ÒSmooth & PointsÓ data file This shows an example of smooth surface rendering and point mode blobs. The appearance of the points can be changed using Select (3-D menu). Go to the ID of the points by typing a Ô3Õ. Change to Colour by layer to make the points a uniform colour on each layer or Show point surface to give them a more solid appearance (the latter message becomes Fixed colours if the ID does not refer to an object in point mode). To make a uniform colour on throughout all layers make the 2 values in Range equal. Making the colours for Highlight and Shadow the same will also give uniform colour, but in this case the points will not be outlined. Spherical points change the shape of a point from spheres (i.e. always plotted as a circle) to discs in the plane of the section which will plotted as ellipses according to the Tilt of the Viewpoint (3-D menu). The other three objects have been set with interpolated shading. The amount of interpolation can be changed in the Lighting (3-D menu); a value of 1 will not subdivide facets, whereas the maximum of 9 will divide each facet into 81 sub-facets. You can also try interpolated surfaces with the other demo data files, but change the resolution to about double current value. 2.1.8 Ò5 cmÓ data file This is a test file for calibrating your LaserWriter. If you print this file you should get a set of exact 5cm squares. If you need to change the scaling there are X- and Y-scale factors in the resource fork of MacStereology (STR# 400) which can be changed with a resource editor (ResEdit). 2.2 Analysing binary images The folder ÒImagesÓ contains a selection of Pict files which can be displayed or analysed. Images look better if centred on the screen which is the default in Read Opts (Image menu) but this does not alter the analysis. By default files read by Read binary are automatically Analysed as soon as the file is read. The analysis would normally require an appropriate Magnification (Options menu) or Calibration (Image menu), but this can be skipped if you just want to see the binary analysis in operation. Most of the options used in analysing images will be found in the Image menu. 2.2.1 Ò2 CirclesÓ Pict file The two circles differ by a single pixel gap at the top of the right hand circle. Analyse finds the circle to the left and an arc for the other, which is correctly interpreted as a line not an object with a small area with a perimeter equal to the line length (and not double this value which it would be if it measured the round the inner and outer surface). Note that such lines are labelled at the mid point of the line, using text in outline mode with the user font. 2.2.2 ÒMcDÓ Pict file This is a simple MacDraw picture consisting of a square circle and curved line. Shows the finding of profiles and the recognition that one is a line. Try the effect of selecting Chunky pixels in Anal. opts and check the difference by using List data (Data menu). 2.2.3 ÒNested.McD2Ó Pict file This consists of 3 shapes with internal features. The default analysis finds all the internal features, but only the outer margins would have been located if Find nested features had not been checked in Anal. opts. (Image menu). My thanks to John Russ for the following data files, which were originally grey-tone images, but are displayed as binary files in MacStereology. The files were prepared using the powerful Prism image capture, processing and analysis package for the Macintosh. 2.2.5 ÒCorneaÓ Pict file Change Font to something smaller e.g. 9 Pt Times (Data menu). Label by object number (Options menu). Analyse - 396 objects. List data (Data menu) looks better if units are mm (Units menu). 2.2.6 ÒDendriteÓ Pict file You will need to Invert image from Read Opts (Image menu). Analyse Ð 154 objects including many small particles. Set minimum limit in Anal. opts. to 100 pixels reduces data to 79 particles. Try other limits, e.g. Max of 1000 pixels excludes 20 largest objects. 2.2.7 ÒDiatomÓ Pict file To avoid black square showing, read this file after checking Invert image in Read opts (Image menu), then Find nested features in Anal opts(Image menu). This field contains many small features so avoid numbering by setting Label objects (Options menu) to None. Remember to set the size limits in Anal opts back to 0 to 100,000 else you will not find anything! There are 990 objects of which the first is the whole outer profile of the object. Setting maximum size to 10,000 skips this first object and leaves the rest looking neat against a black background. 2.2.8 ÒGrainsÓ Pict file Invert the image and analyse. It will find 324 objects. Use Anal opts to vary the minimum size between 100 and 1000 pixels. 2.2.9 ÒSEM particlesÓ Pict file This can be read as a grey tone image using Read image (Image menu) or as a binary image using Read binary. To analyse use Read opts to Invert the image. A simple analysis finds 74 objects, but includes many small blips which can be ignored by setting a Min. size in Anal opts (Image menu) to 50 pixels. 2.4.1 Muybridge photos; (photographed in about 1878 and republished on the cover of Scientific American October 1878). Use Read image (Image menu) to read any image from sequence. Position it tight into the top left by dragging or cancel Centre image in Read opts (Image menu). You can also Scale this image using Read opts. Change to Window (File menu) and reduce window size tight on to image by dragging in bottom right corner (the drag box is not normally shown, but will invert as the cursor moves over it). Select Movie (Image menu) and click Numerical sequence then OK and find the first file in sequence (ÒHorse.1Ó). Open it and the complete sequence of 12 Pict files will be read and the animation will start. (If you run out of memory in doing this the program will first remove the refresh buffer then if all else fails it will quit.) Control the speed of animation with the number keys Ô1Õ Ð Ô9Õ (ÔzeroÕ = stationary) or increase (Ô+Õ key) or decrease (ÔÐÕ key) time between photos . Letter ÔOÕ changes to oscillate (i.e. images 1 to 12 then 12 to 1), ÔFÕ for forward, ÔBÕ for backwards. Stop running by pressing mouse button or typing Ô.Õ. Restart by using Run movie (Data menu). Stop the movie by pressing the mouse button and try Fade in Data menu. A value of 2 produces a smoother run by inserting an intermediate frame with alternate pixels from each image (try bigger fades to see how it works). Fading is slow, so maximum speed will be reduced (Ô1Õ, Ô2Õ keys will probably do nothing unless the images are very small). When finished use Erase movie (Data menu) to clear out the sequence to get rid of the last display. 2.4.2 Animated 3-D reconstructions Open data file ÒCube+SphereÓ. Use Position (3-D menu) to reduce Magnification to 0.5 and change Resolution to 2. Do a Layers reconstruction. Drag display to top left corner. Use Goodies (3-D menu) to remove annotation. Change to Window (File menu), and reduce window size fairly tight on the display. Now use Sequence (Data menu) to make the animation. Click the text of Frames in sequence to find maximum possible. If this number is too small for the animation reduce monitor resolution, make window smaller by reducing the magnification to 0.4 or remove refresh buffer by checking Recalc. refresh in Mac. config. (File menu). Use a value a few less than the maximum to avoid memory problems. If maximum was 80 frames try 72 - set Rotation 0 to 90¡ (1.25¡ steps if 72 frames) and Tilt from 0 to 360¡ (5¡ steps). Animation will look better if you avoid the zero angles so try Tilt 2.5 to 362.5¡ and Rotation 0.6 to 90.6¡. Click either Layers or Surface and wait for results Layers is faster, but Surface gives a more interesting animation. You can follow progress of the reconstruction from the count in the menu bar. Note that in this case a Rotation of only 90¡ works because of the symmetry, but the full rotation of the Tilt is required since the light sources move with the reconstruction; 15¡ is not the same as 180+15=195¡. The lighting is directed as though from the equatorial plane and hence tilts with the display; examine a tilting sphere closely to see how this works. An alternative display is to remove the cube by setting it to DonÕt plot in Select (3-D menu) then just show just the sphere. If you then use Linkage (3-D menu) to remove the caps of the sphere (Click Caps off in top left corner) and Select to remove Fill from the sphere (ID=2) then the animation will let you see inside the truncated sphere as it rotates. You can add different sequences together (e.g. a changing Rotation then a changing Tilt, then add additional images with features in different plotting modes, but not colours since all images in a sequence use the same colour tables). An existing sequence can sometimes be recoloured, without having to be replotted by using Select (3-D menu) to change the colours, but this only works with simple reconstructions that would have similar colour tables. Erase movie (Data menu) when you have finished with it. Close (File menu) the file or click the go away box in the top left corner of the window, but donÕt save any changes. You can also save the sequence as separate PICT files, of as a single PICS file for use with the PICS player of AfterDark and other applications (the ÒPICS playerÓ and a simple reconstruction from the ÒSquareÓ data file are included Ð drop these into your ÒAfterDarkÓ folder). 2.4.3 Animation to show stages of reconstruction Use ÒCube+SphereÓ data file at about 0.6 magnification in a Window as before. Plot the Surface then Start movie for the first frame. Use Select to change plotting modes - click Fill, replot and then Add to movie (beeps to confirm OK). Add a few more frames e.g. Cube as Surface, Surface but not Fill, Dots, then change the Sphere (ID=2) to Solid. Run complete movie, but slow it down using a value of between 8 and 32 using the Fade option (Data menu). All parts of a movie use the same colour tables, so make sure no colour combination is omitted (DonÕt plot in Select) from any image. If you totally remove the cube the sphere is plotted in its correct colours, but in the movie will appear in shades of red not blue since it was created with a different colour lookup table. In doing a Sequence or Movie the colour tables of the last image are applied to the whole sequence, so you may expect strange results if these change. You may be able to use Select to change the colours then display an existing Sequence immediately without having to recalculate. ===================================== For more information write to:Ð Ranfurly Microsystems 13 Lingley Avenue Airdrie ML6 9JR Scotland or:Ð email V.A.Moss@gla.ac.uk telephone (+44) 41 339 8855 ext 5957 fax (+44) 41 330 4100