Hi,

this sounds like a bug to me. The count should be 1. How are you 
registering the writer as a service? Can you rule out the effect for 
MITK writers?

Thanks,
Sascha

On 03/13/2015 10:51 PM, Clarkson, Matt wrote:
> Hi there,
>
> I have a unit test that retrieves an IFileWriter for our own file type:
>
>    mitk::CoordinateAxesData::Pointer cad = mitk::CoordinateAxesData::New(); 
> // for reading/writing .4x4 files
>    mitk::FileWriterSelector writerSelector(cad.GetPointer());
>    std::vector<mitk::FileWriterSelector::Item> writers = writerSelector.Get();
>    for (int i = 0; i < writers.size(); i++)
>    {
>      std::cerr << "Matt, got writer:" << writers[i].GetDescription() << ", " 
> << writers[i].GetServiceId() << std::endl;
>    }
>
> This outputs:
>
> Matt, registering mimetype application/vnd.mitk.4x4
> Matt, registering mimetype application/vnd.mitk.ppm
> Matt, CoordinateAxesDataWriterService::CoordinateAxesDataWriterService()
> Testing invocation. [PASSED]
> Testing matrix instantiation. [PASSED]
> Matt, got writer:NifTK Coordinate Axes Writer, 135
> Matt, got writer:NifTK Coordinate Axes Writer, 119
>
> So I can see the mimetype vnd.mitk.4x4 is registered.
> We have a debug statement coming from the CoordinateAxesDataWriterService 
> constructor, which is called once.
> But there appears to be two "NifTK Coordinate Axes Writer” returned from the 
> mitk::FileWriterSelector, each with a different service ID.
>
> Is that right? My unit test was expecting only 1.
>
> Thanks
>
> M
>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to