# why my PNG stack from SlicerFab is colorful and very large?

**URL:** <https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415>\
**Category:** Support\
**Tags:** extensions-manager\
**Created:** [February 24, 2020, 3:01pm UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415 "2020-02-24T15:01:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lei/32/6123_2.png) [@Lei](https://discourse.slicer.org/u/Lei)\
**Post date:** [February 24, 2020, 3:01pm UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415/1 "2020-02-24T15:01:02Z")

</div>

Operating system: win 10  
Slicer version: 4.10.2  
Expected behavior: black and white PNG stack from Bitmap generator (600\*300dpi)  
Actual behavior: very large and clolorful images, not covering the whole area

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 24, 2020, 3:24pm UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415/2 "2020-02-24T15:24:39Z")

</div>

SlicerFab uses the current VolumeRendering settings to rasterize. You can control the color in that module. Also the volume area to be rasterized is controlled by the ROI node used for cropping in VolumeRendering.

Size of the images is controlled in the BitmapGenerator module itself.

---

<div class="post-metadata">

**Author:** ![Lei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lei/32/6123_2.png) [@Lei](https://discourse.slicer.org/u/Lei)\
**Post date:** [February 25, 2020, 8:52am UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415/3 "2020-02-25T08:52:04Z")

</div>

> [@pieper](#):
>
> rasterize

Thank you very much, Steve.

I used ROI to crop my volume model, then I went to BitmapGenerator module and setted up the parameters, when I pressed the generate button it produced very strange PNG pictures. Did I miss something? Thanks!

 ![slice_0014](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/1/114238264731b607766f76642c21c584785ad3b6.jpeg)

 ![1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/2/92b7ef0252fdf3354357048a11707fb801e4eec6.jpeg) ![2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/0/606375c619c30f597f6b0e1d5a70c1c8ac8b3c53.jpeg)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 25, 2020, 1:53pm UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415/4 "2020-02-25T13:53:07Z")

</div>

Hmm, those look pretty much like I’d expect. They are thin cuts with the color transform applied.

---

<div class="post-metadata">

**Author:** ![Lei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lei/32/6123_2.png) [@Lei](https://discourse.slicer.org/u/Lei)\
**Post date:** [February 25, 2020, 2:00pm UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415/5 "2020-02-25T14:00:46Z")

</div>

So these are the pictures I suppose to get? 😀  
I was expecting something like this: ![Képkivágás111](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/e/0ece432132c7185166d13621da010a0959109dd8.jpeg)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 25, 2020, 2:24pm UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415/6 "2020-02-25T14:24:02Z")

</div>

yes, exactly. Play with the volume rendering parameters and slice spacing.

Do you have a printer that will accept these images? Basically each png file represents the material that will be deposited at each layer. So if they are thin cuts there won’t be much material per-layer.

---

<div class="post-metadata">

**Author:** ![Lei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lei/32/6123_2.png) [@Lei](https://discourse.slicer.org/u/Lei)\
**Post date:** [February 25, 2020, 2:38pm UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415/7 "2020-02-25T14:38:57Z")

</div>

We have stratasys objet260, there is no voxel utility in the GrabCAD software. I guess we can’t print these images now.

I have another question, when should we use the Floyd–Steinberg dithering algorithm to convert the images into binary bitmaps of black and white pixels? As you see, I got colorful images from BitmapGenerator module.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 25, 2020, 6:24pm UTC](https://discourse.slicer.org/t/why-my-png-stack-from-slicerfab-is-colorful-and-very-large/10415/8 "2020-02-25T18:24:49Z")

</div>

There are dithering algorithms developed over the past decades for color printing that could be applied here. However, for optimal color/material separation you would need to know exact specification of the printer and its materials. Independent calibration, parameter identification protocols could be developed to get this information, but since Stratasys knows their hardware and materials very well (even future ones) and they have low-level access to their devices, they will be always in a better position to develop color/material separation algorithms. I would recommend you to contact them and see where they are at with this.
