[Insight-developers] returning std::vector from an ITK class method seen as harmful?
Bill Lorensen
bill.lorensen at gmail.com
Thu Apr 21 22:57:48 EDT 2011
You could return a const reference to the vector. It is probably a
good idea to declare a SeedsContainerType that is of type
std::vector<indexType>. That is the terminology used in the
ConfidenceConnectedImageFilter, the IsolatedConnectedImageFilter, and
the ConnectedThresholdImageFilter.
However, none of these have a GetSeeds method. Maybe they all should
have one (or two).
On Thu, Apr 21, 2011 at 5:19 PM, robert tamburo
<robert.tamburo at gmail.com> wrote:
> 1. Is there a good reason why the seed pixels should be exposed?
> The reason I requested the feature is there is a function to automatically
> find seed pixels and it seems logical to have access to the computed pixel
> indices. A more general reason would be that the pixel indices are stored
> as a member variable and, from what I can remember, all member variables are
> supposed to have Set/Get functions.
>
> On Thu, Apr 21, 2011 at 4:30 PM, Williams, Norman K
> <norman-k-williams at uiowa.edu> wrote:
>>
>> From time to time Hans Johnson looks through the ITK Bug Tracker and
>> assigns me some bugs that look like low-hanging fruit.
>>
>>
>> Looking at this one: http://public.kitware.com/Bug/view.php?id=12017
>>
>> The reporter wants FloodFilledImageFunctionConditionalConstIterator to
>> return its Seed Pixels, which are stored as an std::vector<IndexType>.
>>
>> 2 questions:
>>
>> 1. Is there a good reason why the seed pixels should be exposed?
>> 2. If they should be exposed, should the access method return a
>> std::vector?
>>
>>
>>
>> ________________________________
>> 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.
>> ________________________________
>> _______________________________________________
>> 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
>
>
More information about the Insight-developers
mailing list