[Insight-developers] PixelTypes in BinaryImageToLabelMapFilter

Luis Ibanez luis.ibanez at kitware.com
Wed Jul 8 17:16:56 EDT 2009


Hi Gaetan,

Thanks for the quick response.

The method names that you suggest:


      SetOutputBackground()
      SetInputForeground()


look good to me.



It is true that the word "Value" in the
previous names was a bit redundant.


I'll make the change.


    Thanks


        Luis


---------------------
Gaëtan Lehmann wrote:
> 
> Le 8 juil. 09 à 17:42, Luis Ibanez a écrit :
> 
>>
>> Hi Gaetan,
>>
>> We are preparing to move into Code/Review the class
>>
>>    itkBinaryImageToLabelMapFilter
>>
>> from your paper
>>
>>     http://hdl.handle.net/1926/584
>>     http://www.insight-journal.org/browse/publication/176
>>
>> and we are looking at the declarations of
>>
>>      itkSetMacro(BackgroundValue, OutputPixelType);   versus
>>      itkSetMacro(ForegroundValue, InputPixelType);
>>
>> at first sight it we were expecting both values to refer
>> to the same pixel type.
>>
>> Looking at the code, the background value is used to  set
>> the background value of the output LabelMap, and to
>> make comparisons against an unsigned long int.
>>
>> The foreground value, on the other hand, is used for comparisons
>> against input image pixels.
>>
>> Can we suggest to rename this variables as:
>>
>>          OutputBackgroundValue  and
>>          InputForegroundValue
>>
>>
>> Please let us know if you see a drawback to this change,
>>
> 
> 
> Hi Luis,
> 
> That changes makes the meaning of the attribute much clear.
> 
> The only drawback I see is the larger name. Do you think that "Value"  
> can be removed without changing the meaning, in order to make it  shorter?
> 
>   OutputBackground
>   InputForeground
> 
> Thank you for working on that contribution,
> 
> Gaëtan
> 


More information about the Insight-developers mailing list