What happend to the writeImgPgm function?

11 views
Skip to first unread message

lidija

unread,
May 25, 2016, 7:50:45 AM5/25/16
to OptiML
Hi,

I would like to write pgm image file with OptiML. The documentation says that there is a function named writeImagePgm. However, I found MLOutputWriter.writeImgPgm in the older version of Delite. The new one does not contain such a function, or at least I cannot find it. Could you, please, clarify is there any alternative?

Thanks,
Lidija

Arvind Sujeeth

unread,
May 25, 2016, 2:15:54 PM5/25/16
to opt...@googlegroups.com

Hi Lidija,

It looks like the writeImagePgm function was not ported to the new version of OptiML, as you noted. If you'd like you can submit a Github issue for an improvement and we'll try to add it in the short-term. You should also be able to accomplish the same thing (or something very close) using the basic writeMatrix functionality with a pre-constructed matrix containing PGM values. The only thing is you'll need to manually add the PGM header after-the-fact. Or you could use writeVector with a DenseVector[DenseVector[String]], where each inner vector represents a single row of the PGM file, including header.

Hope that helps,

Arvind

--
You received this message because you are subscribed to the Google Groups "OptiML" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optiml+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lidija

unread,
May 26, 2016, 4:11:30 AM5/26/16
to OptiML
Thank you very much for the quick response. That explains everything, I will go with the idea of vector of vectors, I like that.

Thank you again,
Lidija
Reply all
Reply to author
Forward
0 new messages