[Insight-developers] Image-based Testing in Tcl

Stephen R. Aylward aylward@unc.edu
Wed, 04 Sep 2002 20:45:08 -0400


For raw images, maybe they should always be single channel, 256x256, 
shorts, with a pre-determined voxel size (e.g., 1x1x3mm to make things 
interesting) so that the difference program will know how to read them.

Or...I kind of hesitate to suggest this...but metaImage is another 
option...it provides a few lines of text above the raw data to give the 
file size, bytes per pixel, number of channels (rgb) etc or it 
associates a text file with each raw file and in the text file is the 
dimension size, byte order, etc of the raw data.   You can even 
associate another text file that points to just one slice of that data - 
this second text file can be used to point to the slice with maximum 
difference - there would be no need to duplicate data - a meta-to-png 
program can be written in itk to generate a picture of that slice for 
the www.

Just another option...

Stephen

Lorensen, William E (Research) wrote:
> I think we should store the regression "image" in one file if possible. I'm not sure whcih format
> will store multi-dimensional data other than raw.
> 
> That will have to be multi-dimensional. I'd like to show a "representative difference" on the
> dashboard. This might be the most "different" slice with one scalar pixel value. As Jim suggested, we
> coild also report other difference information.
> 
> 
> -----Original Message-----
> From: Miller, James V (Research) 
> Sent: Wednesday, September 04, 2002 12:07 PM
> To: 'Brad King'; Lorensen, William E (Research)
> Cc: Insight Developers
> Subject: RE: [Insight-developers] Image-based Testing in Tcl
> 
> 
> Do we need all that complexity in the DifferenceImage.  The pixel
> shifting code in VTK's regression code was to get around the fact
> that OpenGL is not pixel specific.  
> 
> In ITK, we might be able to do a straight "difference".
> 
> The other question is how do we want to measure the difference 
> between two pixels.  Grayscale images are not a problem. Color images
> should probably use a distance in Luv space.  Vector images ????
> 
> (Note that VTK's image difference uses a (somewhat) normalized difference
> in RGB space. We can use a more precise metric for ITK since we are 
> not rendering.)
> 
> Also we might want to report "how many pixel differed" as opposed
> to the average "difference" between pixels.  
> 
> 
> 
> 
>>-----Original Message-----
>>From: Brad King [mailto:brad.king@kitware.com]
>>Sent: Wednesday, September 04, 2002 11:40 AM
>>To: Lorensen, William E (Research)
>>Cc: Insight Developers
>>Subject: RE: [Insight-developers] Image-based Testing in Tcl
>>
>>
>>Bill,
>>
>>
>>>I've been thinking about this for a bit. I would like the 
>>
>>"regression
>>
>>>iamge" to store the n-d image. The difference filter might 
>>
>>report how
>>
>>>different each 2D slice is. Then somehow we would report the 2d
>>>difference image.
>>
>>The DifferenceImageFilter supports fully N-d difference 
>>images.  It uses a
>>standard iterator in the test image and a neighborhood iterator in the
>>valid image to allow the test to tolerate n-pixel shifts (n 
>>can be set by
>>the test).  We will need to choose a few things:
>>
>>How big should the standard 2-D test image be?  (256x256?)
>>How big should the standard 3-D test image be?  (64x64x64?)
>>How big should the standard N-D test image be?  (32^N ?)
>>What file format should be used for 2-D images?  (png?)
>>What file format should be used for 3-D images?  (png per slice?)
>>What file format should be used for N-D images?  (png per slice?)
>>How do we present difference images for 3-D and N-D failed tests?
>>  (choose slices with largest difference?)
>>
>>I'm sure there are many more questions, but this is a start.
>>
>>Also, where should we store the input and valid images?  
>>Currently we're
>>using Insight/Testing/Data.  Should we use VTK's approach of a separte
>>testing data tree?  The valid image for the curvature flow 
>>test is about
>>20KB (256x256 8-bit greyscale compressed).  If most 
>>regression images are
>>this size, it would be fine (IMO) to put them in the source tree.
>>However, N-d images can get pretty big...
>>
>>-Brad
>>
>>_______________________________________________
>>Insight-developers mailing list
>>Insight-developers@public.kitware.com
>>http://public.kitware.com/mailman/listinfo/insight-developers
>>
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers


-- 
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695