[Insight-developers] Why Remove VideoIOFactory::RegisterBuiltInFactories() ?

Xiaoxiao Liu xiaoxiao.liu at kitware.com
Thu Nov 17 16:10:05 EST 2011


Hi John,

In order to solve the module dependency issue between ITKVideoIO and
ITKBridge[OpenCV/VXL], we took the function out in this commit
http://review.source.kitware.com/#patch,sidebyside,2997,6,Modules/Video/IO/src/itkVideoIOFactory.cxx
.

Similar to image IO modules, various video IO module should depend on the
base io module (ITKVideoIO), but not the other way around.

Right now, if you want to actually run a test with a certain video IO
format, you need to "manually" register the factory in the testing code:
e.g. in BridgeOpenCV/test/itkOpenCVVideoIOTest.cxx, you need to have this
line:
        itk::ObjectFactoryBase::RegisterFactory(
itk::OpenCVVideoIOFactory::New() );

Eventually, we might want to register all the video io factories up front
in  ITK/CMake/UseITK.cmake (line 25) , like what we did for the image IO
and Transform IO, so that external ITK application could have all the
built-in factories ready.


On Thu, Nov 17, 2011 at 3:29 PM, John Galeotti <jgaleotti at cmu.edu> wrote:

> Hi Patrick,
>
> I'm trying to get my unified video grabber stuff to work with your changes
> to OpenCV.  Could you please explain why you removed the member function
> RegisterBuiltInFactories() from VideoIOFactory?  How should I now be
> registering video grabber factories, so that they are automatically
> available?



> Also, I noticed you removed a "#pragma warning ( disable : 4786 )".
>  Should I likewise remove those from my code as well?

>> yes.




> Thanks,
> John Galeotti




-- 


---------------------------------------------
*Xiaoxiao Liu*, Ph.D.
R & D Engineer
Kitware Inc <http://www.kitware.com/>.
Clifton Park, NY
Phone: (518) 881-4924  or  (518) 371-3971 x124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20111117/4a098f7f/attachment.htm>


More information about the Insight-developers mailing list