saalfeldlab / render

Render transformed image tiles
GNU General Public License v2.0
33 stars 32 forks source link

Export Grayscale Image instead of RGB image #151

Closed nishantshakya closed 11 months ago

nishantshakya commented 11 months ago

Hi @trautmane,

I wanted to inquire if there's a way to directly export a grayscale TIFF image from Render.

For the BoxClient, I noticed there's a --convertToGray flag, which is set to true by default. Yet, the image I obtain still appears to be in RGB format. On the other hand, the RenderSectionClient doesn't seem to have such an option, and I couldn't find any related settings via the API. Is there a way to achieve this?

trautmane commented 11 months ago

Hi @nishantshakya ,

I'm not sure what branch you are using but I just committed the change you need to ibeam_msem. Feel free to cherry pick that commit if you are working elsewhere. Note that the new parameter is slightly different than for the BoxClient. If you want uint8 output, simply add --convertToGray. There is no need to specify true as is required for the BoxClient.