MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

ListConvolve on TIFF images

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77776] ListConvolve on TIFF images
  • From: andre <erasmus.the.giant at gmail.com>
  • Date: Sat, 16 Jun 2007 03:57:49 -0400 (EDT)

I'm using Mathematica 6 to do some image analysis on a stack of TIFF
images saved as a single file.  Originally, I was using another
program (ImageJ: http://rsb.info.nih.gov/ij/ ) to export each frame as
a text file and then importing them into Mathematica and appending
them together to make a 3D array.  Part of the analysis uses
ListConvolve as follows (the image stack has 61 frames and I'm
convolving each one with 5 different filters and storing the results
in responseArray):

For[a = 1, a < 61+1,
 For[i = 0, i < 5,
    response =
     ListConvolve[loGBank[[i]], rawImageStack[[a]], {-1.-1}];
    responseArray[[a, i]] = response;
    i++;
    ]
   a++;
 ]

Using imported text images this operation takes a few minutes.

Since I don't want to go through the step of exporting the text images
using ImageJ, I started importing the TIFFs directly using
Import["filename.tif", "Data"].  This seems to work fine and I checked
that the directly imported TIFF data are the same as the appended
imported text data (i.e. tiffDataArray == textDataArray returns
"true").

My problem is that while the above ListConvolve procedure takes a few
minutes with the text data, it takes much longer (runs until the
kernel quits due to lack of memory) using the directly imported TIFF
data even though Mathematica says they're identical.  What's wrong?



  • Prev by Date: Re: 6.0 Get Graphics Coordinates...
  • Next by Date: RuleDelayed plot options and Show
  • Previous by thread: Re: MathLink: letting Mathematica do the hard work
  • Next by thread: RuleDelayed plot options and Show