POV-Ray : Newsgroups : povray.general : 3-D printing via 3D SLICER app-- step by step : Re: 3-D printing via 3D SLICER app-- step by step Server Time
3 May 2024 07:40:46 EDT (-0400)
  Re: 3-D printing via 3D SLICER app-- step by step  
From: Kenneth
Date: 11 Apr 2024 08:15:00
Message: <web.6617cf31d4c4570a91c33a706e066e29@news.povray.org>
Ilya Razmanov <ily### [at] gmailcom> wrote:
> On 08.04.2024 1:46, Kenneth wrote:
>
> > Yep, I'm beginning to see the problems now-- even the most fundamental one of:
> > What should each image pixel represent as a triangle conversion? One triangle?
> > Multiple ones? POV-ray's internal height_field-from-image algorithm uses 4
> > neighboring pixels to create... two triangles. A similar scheme may or may not
> > be appropriate, I don't know.

> Hehehe, as I've told once already, in my simple img2mesh program:
>
> https://github.com/Dnyarri/img2mesh
>
> I use 1 pixel to produce 4 triangles ;-) That is, it replaces 1 pixel
> with a pyramid of 4 triangles.

Aha! YES, I remember reading your post, but I forgot that your scheme has a
connection to the current problem! (I just read your latest post here as well,
about your .stl experiment; I need time to digest it.) Your use of 4 triangles
per pixel is something that I was considering as well...although I did not think
it through in detail like you did. Nice work! You mentioned that you used Python
for your experiments; I have to admit that I have not yet 'dipped my toes' into
learning it.

You might be interested in the attached image ;-)

This is what a single 'naked' pixel looks like as a voxel in 3D SLICER, using
zero 'smoothing' there-- actually 8 triangles instead of 4, and rotated 45-deg
around vertical. (I used Meshmixer to view the resulting .stl file.)  The
diamond shape occurs when there are no neighboring voxels to join-up with. To
create it, I made a single 1X1 pixel white image(!) and loaded that into the
app.  (Such a single voxel-as-.stl *can* be 3-D printed, by greatly enlarging it
in the printer's software.)

3D SLICER was apparently never designed to process pure white images or
CT-scans-- this tiny image does not show up there until my STEP 3 instructions
(in 'Segment Editor') are used to 'activate' it and show it as 3-D. (My
slicing code keeps a 1-pixel black border around typical much-larger slice
images, to eliminate this problem.)

A single line of *diagonal* pixels is an oddity-- there are gaps between the
created voxels because of their intrinsic rotated orientations, even though they
do still have a 1:1 size-correspondence with the image...but I wonder how those
gaps affect tiny details in medical CT scans.

And TWO copies of a single-pixel image -- as two 'vertical slices' so to speak--
end up as a horizontal unit of voxels, not vertical as I would have expected.
That is an anomaly in my opinion, but I guess the app's developers had a reason
for designing it with such behavior...or didn't foresee the possibility(?) My
single-pixel 'torture test' is rather extreme though!


Post a reply to this message


Attachments:
Download '3d_slicer_single_pixel_test_kw_4_2024.jpg' (168 KB)

Preview of image '3d_slicer_single_pixel_test_kw_4_2024.jpg'
3d_slicer_single_pixel_test_kw_4_2024.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.