[Insight-developers] texture features question
Williams, Norman K
norman-k-williams at uiowa.edu
Tue May 17 09:30:43 EDT 2011
Which might have something to do with the work I had to do to keep it from
throwing overflow numeric exceptions...
On 5/16/11 8:56 PM, "Luis Ibanez" <luis.ibanez at kitware.com> wrote:
>Yeap, it looks like a bug.
>
>The implementation of Histogram will misuse the value
>of max()+1:
>
>
>itkHistogram.txx : lines 237-249:
>
>
>Histogram< TMeasurement, TFrequencyContainer >
>::Initialize(const SizeType & size, MeasurementVectorType & lowerBound,
> MeasurementVectorType & upperBound)
>{
> this->Initialize(size);
>
> float interval;
> for ( unsigned int i = 0; i < this->GetMeasurementVectorSize(); i++ )
> {
> if ( size[i] > 0 )
> {
> interval = static_cast<float>( upperBound[i] - lowerBound[i] )
> / static_cast< MeasurementType >( size[i] );
>
>---
>
>
> Luis
>
>----------------------------
>On Mon, May 16, 2011 at 9:50 PM, Nicholas Tustison <ntustison at gmail.com>
>wrote:
>> Thanks Luis. If you go to lines 168-169, the lower and upper bounds
>> are used to initialize the joint histogram.
>>
>> size.Fill(m_NumberOfBinsPerAxis);
>> output->Initialize(size, m_LowerBound, m_UpperBound);
>>
>> Was that what you were asking about?
>>
>> The problem is that if everything is the same except the intensity
>>range of one
>> image is scaled between [0,256] and its counterpart is scaled between
>>[0,1],
>> creating a histogram which spans between [0, 257] on each axis is going
>>to be
>> quite different from one that spans between [0,2].
>>
>>
>>
>>
>> On May 16, 2011, at 9:43 PM, Luis Ibanez wrote:
>>
>>> Hi Nick,
>>>
>>> Yeap, that looks like a bug.
>>>
>>> Although, to make sense of it,
>>> we have to dive into how the
>>> bounds are used in the histogram
>>> computation...
>>>
>>>
>>> Luis
>>>
>>>
>>> --------------------------------------------------
>>> On Mon, May 16, 2011 at 9:19 PM, Nicholas Tustison
>>><ntustison at gmail.com> wrote:
>>>> Hi,
>>>>
>>>> I've been working with the cooccurrence matrix texture features
>>>>classes and noticed that
>>>> if I simply rescale the values, the texture measures are completely
>>>>different. I tracked it
>>>> down to lines 384 and 385 of
>>>>itkScalarImageToCooccurrenceMatrixFilter.txx which the
>>>> user uses to set the min and max values of the joint histogram:
>>>>
>>>> m_LowerBound.Fill(min);
>>>> m_UpperBound.Fill(max + 1);
>>>>
>>>> It would seem that line 385 should, instead, be
>>>>
>>>> m_UpperBound.Fill(max);
>>>>
>>>> Does that make sense or am I missing something?
>>>>
>>>> Thanks,
>>>> Nick
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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://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-developers
>>>>
>>
>>
>_______________________________________________
>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://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-developers
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the Insight-developers
mailing list