<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">This has been a long standing issue with sprokit, from what I recall.  It seems to me that we need a mechanism for allowing sprokit type checking to allow for casting up the inheritance hierarchy.  A feature_track_set is a track_set, so any process that can process a track_set should also be able to process a feature_track_set.  I’m not sure if there is an easy way of checking this because I think sprokit just does string name comparison for type checking.  Maybe the type name strings could be “track_set”, “track_set.feature”, “track_set.object” and we could do substring comparison?  Anyway, that is probably a discussion for another day.  In your case, the issue is more challenging because there is also down casting involved.  Ideally you want to encode that the input and output types for this process must be 1) the same exact type and 2) a track_set or some derivative of it.  I’m not sure that we can do that in sprokit yet.<div class=""><br class=""></div><div class="">I mostly agree with the best practices rules in the PPTX, except that I’d like to see sprokit improved so that the first rule is not needed.  For now, I think your Option 2 (slide 4) makes the most sense.<div class=""><br class=""></div><div class="">—Matt</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 15, 2017, at 1:22 PM, Brian Clipp <<a href="mailto:brian.clipp@kitware.com" class="">brian.clipp@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Pushing the tread over to kwiver-users.  I attached the original ppt.<div class=""><br class=""></div><div class="">-Brian<br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">---------- Forwarded message ---------<br class="">From: Matthew Leotta <<a href="mailto:matt.leotta@kitware.com" class="">matt.leotta@kitware.com</a>><br class="">Date: Wed, Nov 15, 2017 at 1:08 PM<br class="">Subject: Re: [Kwiver-announce] Best practices for passing inherited types through Sprokit Pipeline<br class="">To: Matt Phillips <<a href="mailto:matt.phillips@kitware.com" class="">matt.phillips@kitware.com</a>>, Brian Clipp <<a href="mailto:brian.clipp@kitware.com" class="">brian.clipp@kitware.com</a>><br class="">Cc:  <<a href="mailto:kwiver-announce@public.kitware.com" class="">kwiver-announce@public.kitware.com</a>><br class=""></div><br class=""><br class=""><div style="word-wrap:break-word" class="">Guys,<div class=""><br class=""></div><div class="">Let’s take this discussion to the kwiver-users list rather than kwiver-announce.  kwiver-annouce is supposed to be for major announcements, like new versions.</div><div class=""><br class=""></div><div class="">Of course this make me wonder if we really need kwiver-announce anymore.  Is there anyone on this mailing list who is not also on kwiver-users and who only wants to receive very infrequent notifications about KWIVER releases and other major announcements?  If this describes you, please send me a response privately.  If I get no responses in a week or so, I think we should retire this list and use only kwiver-users.  That pattern aligns better with what our other open source projects do for mailing lists.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Matt</div></div><div style="word-wrap:break-word" class=""><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 15, 2017, at 12:56 PM, Matt Phillips <<a href="mailto:matt.phillips@kitware.com" target="_blank" class="">matt.phillips@kitware.com</a>> wrote:</div><br class="m_7155049012537094721Apple-interchange-newline"><div class=""><div dir="ltr" class="">Is the issue here just slicing when derived class objects are passed to Keyframe selector?  I'm not familiar off the top of my head with how sprokit does serialization/deserialization but might making that 'slice-proof' be the answer?  By e.g. storing type information and using factory methods at construction.<div class=""><br class=""></div><div class="">Matt</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Nov 15, 2017 at 12:46 PM, Brian Clipp <span dir="ltr" class=""><<a href="mailto:brian.clipp@kitware.com" target="_blank" class="">brian.clipp@kitware.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hi All.<div class=""><br class=""></div><div class="">I ran into a case yesterday where I had a process that output a child class and a process that expected an input from it of the parent class.  Sprokit's type checking fails in that case.  It lead me to spend some time thinking about what types to pass between processes.  After some discussion with Aaron and Matt B. these are some suggestions I've arrived at.  </div><div class=""><br class=""></div><div class="">Thoughts?</div><span class="m_7155049012537094721HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">Brian</div></font></span></div>
<br class="">_______________________________________________<br class="">
Kwiver-announce mailing list<br class="">
<a href="mailto:Kwiver-announce@public.kitware.com" target="_blank" class="">Kwiver-announce@public.kitware.com</a><br class="">
<a href="http://public.kitware.com/mailman/listinfo/kwiver-announce" rel="noreferrer" target="_blank" class="">http://public.kitware.com/mailman/listinfo/kwiver-announce</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">Kwiver-announce mailing list<br class=""><a href="mailto:Kwiver-announce@public.kitware.com" target="_blank" class="">Kwiver-announce@public.kitware.com</a><br class=""><a href="http://public.kitware.com/mailman/listinfo/kwiver-announce" target="_blank" class="">http://public.kitware.com/mailman/listinfo/kwiver-announce</a><br class=""></div></blockquote></div><br class=""></div></div></div></div></div>
<span id="cid:15fc0eaed97bfec7ed31"><Inherited Types in Sprokit Pipelines.pptx></span>_______________________________________________<br class="">Kwiver-users mailing list<br class=""><a href="mailto:Kwiver-users@public.kitware.com" class="">Kwiver-users@public.kitware.com</a><br class="">http://public.kitware.com/mailman/listinfo/kwiver-users<br class=""></div></blockquote></div><br class=""></div></div></body></html>