[Insight-users] problems with image resize (resample with interpolation and affine transform)

Darren Weber darren.weber.lists at gmail.com
Mon Feb 15 18:54:20 EST 2010


Hi Luis,

Thank you for looking at this.  There's no secrets to hide in my code and
I'm glad it compiles on another system ;-).

In the download .tgz file, there are tiff files in:
testResize/w1/bw/section*_w1.tif

ftp://anonymous@ftp.buckinstitute.org/dweber/testResize.tgz


I have ITK 3.16.0 through MacPorts.  There might have been some changes in
the dylib links.  So I did a full MacPorts update/upgrade and then re-built
and installed ITK.  I still get some bugs with these tiff files.  They were
created using ImageMagick convert from the .png files (using no options to
convert).  The port system reports the following install for ImageMagick

ImageMagick @6.5.9-0_0+q16 (active)


Take care,
Darren




On Mon, Feb 15, 2010 at 2:23 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> Hi Darren,
>
> Thanks for posting the full source code.
>
> I manage to build it (after installing Boost), and got to the point
> where I needed one of the original TIFF images in order to
> test the code. Can you post one ?
>
> Looking at the source code, the only thing that I found suspicious
> is the use of NumericTraits::max() in the definition of the default
> pixel value for the resampler.
>
> These intensity rescaling shouldn't be happening with the
> classes that you are using.
>
> There may be something particular about your input TIFF
> images....
>
>
>      Regards,
>
>
>            Luis
>
>
>
> ---------------------------------------------------------------------------------------------
> On Fri, Feb 12, 2010 at 5:19 PM, Darren Weber
> <darren.weber.lists at gmail.com> wrote:
> >
> > Hi,
> > A program that was working with ITK 3.14 is not working with 3.16 (on
> OSX).
> >  It's a mystery to me.
> > The program takes a list of image files (regex input), scans them all for
> > the largest image dimensions (2D), then "converts" or resamples all the
> > images in the series into the same dimensions.
> > The conversion process involves an information filter and a reslicer.
>  The
> > latter includes an affine transform (just a translation to center the
> > images) and an interpolator.
> > The outputs fail to replicate the intensity scale of the inputs.  Also,
> the
> > outputs are wildly different for .png and .tif inputs.
> > All the code and example files are available for download (as of Feb
> 2010)
> > ftp://anonymous@ftp.buckinstitute.org/dweber/testResize.tgz
> > In that archive, the source code and a build are in testResizeCode, the
> > input data files are in testResize/w1/bw/ and the outputs are in
> > testResize/w1/bw_resize.  There is a script, testResize.bash, to run the
> > example - it has a variable for image type (png or tif).  The output
> files
> > are wildly different for the png and tif inputs.
> > BTW, the purpose of this image resize process is to provide a series of
> > images with the same dimensions for registration.  Is it true that a
> > registration process for any two images must have images of the same
> > dimensions?
> > Take care,
> > Darren
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100215/9562e819/attachment-0001.htm>


More information about the Insight-users mailing list