Category Archives: surfactant proteins A and D

CorelDRAW19 various processing algorithms applied to one AFM image of SP-D

Using CorelDRAW19 various processing algorithms have been applied to one AFM image of surfactant protein D. This image was derived from Arroyo et al, and is among dozens of images from various authors that I am using to test the validity and efficacy of such image processing. The list of programs used for this particular image (then vary from processing programs, e.g. photoshop, gimp, gwiddion, imageJ etc. because of the menu options in each program) and from free and proprietary image processing libraries that may or not be available to software developers. While it has taken months, the comparison is something that I needed to do since I have both old and new versions of the industry standards (CorelPhotoPaint, and Draw, and Photoshop) and it was important to see whether there were changes in image processing algorithms that caused significant differences in gray scale (y axis) for surfactant protein D images.

the list for this composite (plot) overlay is: gaussian blur (5px); gaussian blur (5px) and high pass 40%-10 px radius; gaussian blur (5px) unsharpmask (300%-  20 px radius- threshold 50; lowpass 100% 10 px radius; maximum 50% 10 px radius; median 5 px radius; minimum 50% 10 px radius; smartblur 50. Each of the resulting image were measured using ImageJ. Plots were conformed to the mean arm length of all processing and measuring for this single image.  A single background measure (each background was taken at the same time as the measurements, and in the same location) is shown around 50 on the gray scale.

Each plot is a different color and each arm (meaning CRD to CRD in a hexamer) were plotted separately and are shown separately  thus, 16 individual plots and 16 colors. Approximate width at the valley of the plots is given in nm.

EVEN or ODD or BOTH

Peak counts in the span of both hexamers of a dodecamer comes out to be something between an even and an odd number. This is not really interesting except that it might relate to the issue of whether the N termini (junction of four trimer N termini) that is the center and highest peak found with AFM of surfactant protein d dodecamers….  there is good visual data that says sometimes the N termini are joined in ways other than overlapping (overlapping is the wrong word, more like juxtaposed).  The later, in AFM can be side by side, or end to end. No consensus has been found in the literature so far by me, by me anyway.  I subscribe to the idea that more configurational variations  happen that is usually realized.

Just  over 350 measurements of brightness”peaks” for ONE molecule of SP-D (a dodecamer AFM image from arroyo et al (which i have named 41 aka 45) the data for peaks along the arms is:  (keep in mind that the center peak is likely not mirrored in a consistent way, thus the number of paired peaks on right and left arms of both hexamers will tend to be an odd number)  in that sense, the peaks from looking quickly at each image, and then using ImageJ to plot the peaks of brightness, and adding those, the number of peaks in each hexamer is as follows.  This particular molecule has arms of different lengths with what I have called “arm 2” being longer than arm 1.  The right portion of the dodecamer looking like it was been stretched during preparation. It is still useful to see whether the physical elongation of an SP-D arm allows for greater, or lesser definition of the peaks which occur in the area between the N termini and respective CRD domains.

Below, the image, the summary statistics.  These are all measures on the same image, processed in a dozen different image processing programs.  The image below is a sample, bar marker is green, and 100nm. Image stated above is from arroyo et al.

 

Measuring SP-D using the “diameter” function in ImageJ

Easy to use, I found this to be the most efficient way to determine the diameter of surfactant protein D dodecamers.  I think it will ultimately be just in between the measurements that correspond to the shorter of the two hexamers, and the longer, which is where it should be.  It is a circle drawn to contact the edge (in this case, the most peripheral part of the carbohydrate domains) of three of the four.  Example below.

One dodecamer (from Arroyo et al), screen print, resampled at 300ppi, image processed in CorelDRAW 19 using the “smart blur”.  This ends up being 136.53nm, very close to what was found for 95 separate measurements of the same image (see mean and sd below)


Deviation, σ: 5.8922403533121
Count, N: 95 (separate processed images, using half a dozen different filters and effects)
Sum, Σx: 12797.82416297
Mean, μ: 134.71393855758
Variance, σ2: 34.7184963812

Image and signal processing micrographs of SP-D

1) The Y axes on these plots are what are generated by ImageJ…. so the y axis apparently depends upon what kind of raster file I have used to get the luminance plots that ImageJ can detect. All y axes can be (should be) normalized either to 0-100 % or to 0-255 grayscale. I don’t know if it matters, but I believe most of the existing hundreds of excel plots have 0-255 (sometimes 300) as their Y axes. THE HEIGHT depends upon all the image factors, including the brightness and ppi of the original image.

2) The X axis is variable as well, SP-D molecules just fall as they may when they are dropped onto the mica grid so there are short arms, twisted arms, touching arms, bent arms, stretched etc etc. Distance of the entire molecule i have measured as a “diameter” defined by any circle that touches three of the four edges of the cross shaped molecule. I would like the x axis to be a composite number (in nanometers) of every arm I have measured (for each microscopic technique). I haven’t gotten that final number yet, but it will be very close to 135nm with a few nm SD. So All the plots need to be adjusted to that X axis.

3) The MAIN goal here is to normalize all the plots that i have and determine mean number of peaks (with some statistical measure of likelihood) from one side of the dodecamer to the other….. and then a) find the width of each set of peaks…. b) the relative height of each set of peaks,

SP-D “fake” model from real micrographs and LUT tables

So the process of identifying which filters work well for image processing of AFM and TEMs (shadowed and negative stained) of molecules, it became diverted briefly into an effort to understand the algorithms of signal processing.  (the diversion was short lived, as I will never devote the time to understand them, and am not sure that an in-depth knowledge of them is required for those of us who just want to maximize the basic data that is inherent in our micrographs) I am interested in those filters that present in an unbiased and honest and searchable way (and just for fun, the image above).

The previous post (using an RGB control image to watch the erosion and dilation and alterations in pixels) examined some filters in a simplistic way. This spawned an even more interesting idea which was to use an actual “arm” (trimer) of an actual SP-D molecule as a model.  The choice of this arm is definitely biased, as it is what I have come to think is the mostly likely configuration of the SP-D trimer in terms of LUT plots.  SO while the bias in creating the initial vector illustration is mine, it is based on hundreds and hundreds of LUT plots from images processed in dozens of filters and effects in  more than 10 different image processing programs.  So it is “educated” bias.   The “raster” fill for this vector image (which is created with identical trimers — mirrored and rotated) is an actual AFM image of an SP-D trimer.  That “fake” or “control” SP-D model is below.

The N termini junction is central, beside it are four small peaks (which I am predicting) next is the alleged N-glycosylation peak (4 of them) one per trimer (about which I have not been able to find an answer as to whether this is an all (all three molecules) or none event, or 1+ 2+ or 3+ event, thus producing N glycosylation peaks of various sizes).  Lateral to that are the three predicted peaks cascading in size and width along the greater length of the collagen like domain.  Finally,  the neck (sometimes present as a slope, or small peak, leading to the CRD which definitely can be seen to have “areas of brightness and looks actually lumpy, just like the molecular models would predict”, and can be seen in the raster fill of this vector image.  Round and bell shapes are based on my observations.

The first test of a filter was made in CorelDRAWx5: Bitmap>blur>gaussian blur>10px. Image below.


And just for fun

Bitplanes color transform in Corel Photopaint help visualize LUT peaks along the arms of SP-D

Bitplanes-images were obtained as a filter in corel photopaint to visualize LUT peaks along the trimeric arms of SP-D (color>transform>bitplanes with slider) (original image by Arroyo et al).  It has become quite clear that there is a lot of image processing that can be done to AFM images, and with an honest approach, very little of it changes what appears in the original image.

This gif animation was made in GIMP using png files (exported from corel photopaint x5 and sized and edited in corel DRAW x5 to add the arrows that point to three distinct peaks along the collagen like domain of one of the SP-D trimers– in this case to the left of the glycosylation  and N termini peaks ).  While it is garish, the data are real. If you look at the LUT plot (made in ImageJ) from the same SP-D dodecamer in the previous post you will see the three peaks, in their typical increasing height (left to right) as those areas marked by arrows in this animation.

The tiniest (also previously undescribed) peaks that I am pretty sure exists can be seen like  “blips” on either side of the central N termini peak (on the more vertical hexamer).

Bloom and Soft glow: GIMP and surfactant protein D images

Seems like an unlikely set of parameters.  SP-D image (published by Arroyo et al) and an open source imaging program, but in fact these two filters can take a rather pixelated image from a publication and turn it into a really nice plot of brightness peaks along the arms of a molecule, examined with atomic force microscopy.  Maybe my favorite filters so far.  GIMP Filter>Blur>Gaussian 10px>Artistic>Softglow-Legacy>Glow radius 10px Brightness 0.10 Sharpness 0.75.  Green bar=100nm.  Aim: working toward a signal averaging program that will analyze these plots and determine the most likely number and size of peaks along the collagen like domain.  This plot has three on each trimeric arm of the line plotted. the CRD and neck usually comprise two peaks, a set at each end. In this particular image there is only one tiny peak beside the N termini peak… which is on the lower left arm.

Some LUT plot tracings in Gwyddion don’t match what I find with ImageJ

Working on surfactant protein D dodecamers, the number of peaks across the entire hexamer (CRD to CRD) and specifically a tiny peak beside the N termini peak, and the number of peaks (3 or 4) along the collagen like domain (after the glycosylation peak).

I have noticed that tracings that are horizontal (at least the horizontal portion of the plot) obtained in Gwyddion looks pretty much like the plots replicated on the same image in ImageJ.  However the slightest vertical bend changes the shape of the plot completely, almost like the x axis no longer registers.  See image below.  So this dodecamer has been shown on this site many times, so i consider it a stable study.  Plots made in ImageJ are on the right, those with Gwyddion, on the left.  Each arm and a background LUT plot has been drawn and saved to excel.  (BTW, the process of saving the plots out of Gwyddion for me is a little cumbersome). Each curve was saved with a screenshot as a comparison so as to demonstrate that the actual line (segmented line in ImageJ) does not differ so much.

The same image was rotated 90o counter clockwise and then the two arms and background plots were made again.  The difference is clear.  The recommendation is to either not use Gwyddion for this type of application, or go to the forum and find out why this happens and fix it.  For me personally, I will just use ImageJ, as it is simple and straightforward.comparing LUT plots in ImageJ and Gwyddion

GIMP for processing AFM images – unsharp mask

There is a dilemma for researchers in terms of their choice of image processing programs.  The industry giants charge considerable amounts (matlab is exorbitant), what used to be high prices for CDs but now for online subscriptions.  Does the US taxpayer need to pay for these services – it doesn’t seem quite right that we pay industry graphics prices to do science which benefits all of humanity (hopefully).

I have spent the better part of the year (not full time but avidly) trying to figure out who has the image processing program that is the easiest to use (i am talking here about real ease of use…. as I come to this field as a visual learner, without apologies, but find much lacking in the so called “intuitiveness” of many programs). I am also interested in the least expensive program as i dont want to feed the giants in the commercial world.  Another goal is to see whether all the bells and whistles that are touted in the new image processing programs really make a difference for scientists who are wanting to do some relatively simple things….  get rid of dirt, get rid of pixels, identify and enhance hard to see details, to put statistics ahead of guessing about shapes, peaks and the like.

I began 50 years ago with wet-darkroom prints, and the simplest tablet and stylus, haha i don’t even remember the name of the setup but could look that up in a materials and methods published somewhere.  I used camera lucidas and pencil, then digital images.  The earliest processing was just a hand waving  (dodging and burning) then using those same terminologies, photoshop appears.

The earliest plates for publication were made on matboard with a drymount press and tissue.  The earliest program that i used for making images into figures was the first version of CorelDRAW (it was version 3) cracked on 11 pink 3.25 inch floppy discs.  These were mostly plots and line drawings.

50 years later, I still use CorelDRAW (x5 and 19), CorelDRAW Photopaint (x5 and 19) and still use Photoshop (6 and 2021), and have in the past year examined ImageJ, Gwyddion, and GIMP.  It is difficult not to be biased because CorelDRAW has had both raster and vector elements that in my way of thinking are more than adequate for both processing images, measuring features, and creating diagrams. CorelDRAW has been nicely compatible with Photoshop and Illustrator (though the reverse has never been as smooth). I have used images with 100 layers or more imported into CorelDRAW from Photoshop with ease.

So the purpose of this is to determine whether it is possible to do image processing with the same filters and measuring options in the open source software as is done with the high priced industry standards.

The test today is the unsharp mask filter in GIMP.  I do like the ease with which the sliders can be manipulated with instant preview updates….  i don’t much like the actual “typing” from the number pad into the slider.  But using the surfactant protein D images (that I have used from published papers (in this case those shown here are some good and not so good images from Arroyo et al  (AFM of surfactant protein D).  Regardless of the original image quality, GIMP (open source image processing software) does a great job of masking.

Pay special attention to the small masked areas in the collagen like domain of each of the SP-D trimers….  yep…. 3 to 4 small peaks beside the glycosylation peak, especially nice in lower right image, and in that one and the lower left image… a tiny peak on the side of the N termini peaks is a new little peak (of which i am trying to determine the relative incidence).  Error bars are what i have used for measurments and are visible, most are 100nm but the tiny one is 20nm, and lower center has no error bar.

 

Beautiful SP-D image

This image (original from supplement of Arroyo et al) was first a screen print, then in gwyddion i added a 10px gaussian blur, then stretch color range >175 to 255.  This virtually eliminated background, but at the same time decreased the height of the various peaks.  The upside is that there is a rotational “look” to each of the trimeric arms, and there is also the hint of the tiny proximate peak to the N termini which shows up just before the large glycosylation peak on each trimer.  Clearly too are the small rhythmic peaks along the collagen like domain (almost always 3 or 4 in descending prominence and width).  One can rule out any bumping and noise since all these dodecamers fall at different directions and so scan lines are an annoyance but contribute to peak height on a random basis. CRD are show as multi-lumpy units.  Looks like the alleged glycosylation peak is present on all four trimers pretty equally.

 

-Perfect view of what I think will pan out is shown in the lowest arm (vertical hexamer) which shows the Nterm, the tiny adjacent peak, the glycosylation peak, three peaks along the collagen like domain and the neck and CRD in a raindrop shape.  Pretty awesome.