[Insight-developers] Calculators: Buffered or Requested regio ns?

Miller, James V (Research) millerjv at crd . ge . com
Thu, 12 Jun 2003 13:31:33 -0400


All the calculators do is walk a region(sometimes the BufferedRegion and
sometimes the RequestedRegion) and calculate some set of values (mean,
variance, class separation threshold, ...).  I think it is resonable to have
these use any specified region (provided it is within the BufferedRegion).  

Threading is not really an issue provided the "region" is set properly.  The
filter writer/user of the calculator could specify they only want the
information for the thread region, the overall requested region, or
something entirely different.

Streaming is a bigger issue.  If a filter is relying on the information
calculated to be from the entire image, then they need to make sure entire
image is available to the calculator.  Currently, the calculators do NOT
specify a request to the image and call Update(), instead they rely on the
information already cached in the image.

I am not sure how many calculators we have in the system.  You could make an
argument that they could all be converted to filters.  They might be a
little clumsier to use as filters though. And you would still have to manage
what region you want the information calculated over.





-----Original Message-----
From: Stephen R. Aylward [mailto:aylward at unc . edu]
Sent: Thursday, June 12, 2003 1:12 PM
To: Miller, James V (Research)
Cc: Luis Ibanez; Insight-developers (E-mail)
Subject: Re: [Insight-developers] Calculators: Buffered or Requested
regio ns?


With threading/streaming, how do we distinguish the two?   And we'll 
probably want to make the default behaviour to be over the entire image.

Are they really image calculators or should we have distinct regions 
calculators too?

Thanks,
Stephen

Miller, James V (Research) wrote:
> Stephen,
> 
> I think there are times when you want the min/max to be over the entire
> image and there are times when you may want it to be computed over a
> particular region.
> 
> Jim
> 
> -----Original Message-----
> From: Stephen R. Aylward [mailto:aylward at unc . edu]
> Sent: Thursday, June 12, 2003 12:23 PM
> To: Luis Ibanez
> Cc: Miller, James V (Research); Insight-developers (E-mail)
> Subject: Re: [Insight-developers] Calculators: Buffered or Requested
> regions?
> 
> 
> Hi,
> 
> I am probably being slow today....shouldn't image calculators always be 
> over the entire image?   I think it would be confusing if the min and 
> max for an image would seem to change if the minimummaximum calculator 
> is called with a subregion because of threading/streaming.
> 
> Or are we going to add logic so that min and max (for example) remain 
> valid for an image when only a subregion is being processed by a 
> particular thread.   Actually, can we process a thread without 
> processing a whole image to init its min and max?
> 
> Okay, I really am being slow and not following this.   help!  :)
> 
> Thanks,
> Stephen
> 
> Luis Ibanez wrote:
> 
>>Hi Jim,
>>
>>That sounds like a good idea.
>>
>>It will be pretty useful to select the region over which the
>>computation is going to be performed.  We could still agree
>>in using the RequestedRegion() as the default region.
>>
>>
>>  Luis
>>
>>
>>
>>-------------------------------------
>>Miller, James V (Research) wrote:
>>
>>
>>>I was just looking through some of the calculators.  The 
>>>MinimumMaximumImageCalculator performs its calculation across the 
>>>RequestedRegion. The OtsuThresholdImageCalculator performs its 
>>>calculation over the BufferedRegion.
>>> 
>>>So there is an inconsistency here.  Besides the inconsistency, the 
>>>Otsu method uses the MinimumMaximum to determine how to build its own 
>>>histogram.  So the range of values for its histogram is based on the 
>>>pixels in the RequestedRegion but it determines a threshold from the 
>>>histogram based on the BufferedRegion.  This inconsistency could bias 
>>>the threshold calculated.
>>> 
>>>At a minimum, I would think the calculators should be consistent.  I 
>>>could make a case for either region being appropriate (more than I 
>>>want to get into here).  Perhaps the calculators should take a region 
>>>over which to perform the calculation?
>>> 
>>> 
>>>*Jim Miller*
>>>*/_____________________________________/*
>>>/Visualization & Computer Vision//
>>>/GE Research/
>>>/Bldg. KW, Room C218B/
>>>/P.O. Box 8, Schenectady NY 12301/
>>>
>>>//_millerjv at research . ge . com <mailto:millerjv at research . ge . com>_/
>>>
>>>/_james . miller at research . ge . com_/
>>>/(518) 387-4005, Dial Comm: 8*833-4005, /
>>>/Cell: (518) 505-7065, Fax: (518) 387-6981/
>>>
>>> 
>>
>>
>>
>>
>>_______________________________________________
>>Insight-developers mailing list
>>Insight-developers at www . itk . org
>>http://www . itk . org/mailman/listinfo/insight-developers
> 
> 
> 


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