Paint segmentation not filling slice after ROI and rotate to volume plane

Hi, I am using slicer 4.9.0-2017-11-23 on Windows.
I was getting the segmentation errors previously discussed (I am segmenting an older T1+c image at 4 mm thickness) so I did this:

  1. I used the crop volume and b-spline resampled at isotropic dimensions.

  2. I followed this suggestion to rotate all sections to volume plane:
    Segmentation Editor - How to disable painting on adjacent slices?

  3. Of note, I had already done some segmentation before 1 and 2 were performed.

When I use the ‘Draw’ tool (axial slice) I still get incomplete filling of the draw outline:
first image is outline:

This image is what is filled

I confess I am no wizard at 3dSlicer so am I doing something wrong? Thanks

The voxels are not aligning with your view, so you get a staircase effect. You can align the view to your slices and draw like that if you want, but probably your current segmentation is fine. What does it look like in 3D?

Yes, strange the 3d (with 0.5 smoothing) looks fine and filled in so the program does what it should. So align the view is different from ‘rotate to volume plane’ ? Is there a way to align to view?

Also since the purpose is to measure volumes I will want to make sure I get the segmentation correct.
Thanks,
John

Dear John,

Would you please tell me how to access/edit/modify the rotation and zoom
in/out of an image on 3dslicer using python console.??

Thank you,
Sincerely,
Ahmed Soufane

@Ahmed_Soufane You’ve answered to an email related to another thread, where it’s off-topic. Please keep using the thread you started

Looking into Steve’s suggestion will solve your problem

Yes, the function you want is “Rotate to volume plane” in the slice view controller’s toolbar.

Hi Csaba, yes I had already rotated to volume plane (see my first post), and after that I was still getting the problem. Maybe that all has to happen at the very beginning prior to any segmentation?

I might add that using the ‘Paint’ tool worked different from the ‘Draw’ tool. The images above occur with the ‘draw’ tool.

[Edit] OK, If I set up all views prior to segmentation, now it appears to work fine.

If you create a segmentation and set a master volume then it determines the geometry of the internal binary labelmap. If you later switch master volume it does not matter, it won’t change the internal geometry. You can to create a new Segmentation node, set the new volume (result of resampling) and work with that segmentation. You can copy segments from your old segmentation node using Segmentations module’s Import/export section.

Note that most effects work well on oblique slices (only level tracing and Fill between slices do not). The sampling artifacts (incomplete filling, striping) appearing at segment boundaries are not nice to look at, but they don’t affect the quality of segmentation, the segmentation is still correct and there are no holes in 3D.

2 Likes

Not sure if this is relevant… bug or just my new user brain.

I was getting an error again after (what i thought was) proper setup for manual segmentation with the paint tool, and made sure of the align to volume was set. (BTW, I am also segmenting longitudinal volumes that are registered that may have different slice thickness). Then the circle cursor only appears during 'sphere" and I get a different ‘tool’ cursor. Then I noticed these critical errors appeared:

class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushSphere” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushSphere” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “ColorSmudge” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “ColorSmudge” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushPixelMode” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushPixelMode” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushDiameterIsRelative” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushDiameterIsRelative” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushMaximumAbsoluteDiameter” cannot be found for effect "Erase"
double __cdecl qSlicerSegmentEditorAbstractEffect::doubleParameter(class QString) : Parameter named “BrushMaximumAbsoluteDiameter” cannot be converted to floating point number!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushAbsoluteDiameter” cannot be found for effect "Erase"
double __cdecl qSlicerSegmentEditorAbstractEffect::doubleParameter(class QString) : Parameter named “BrushAbsoluteDiameter” cannot be converted to floating point number!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushSphere” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushSphere” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “ColorSmudge” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “ColorSmudge” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushPixelMode” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushPixelMode” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushDiameterIsRelative” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushDiameterIsRelative” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushAbsoluteDiameter” cannot be found for effect "Erase"
double __cdecl qSlicerSegmentEditorAbstractEffect::doubleParameter(class QString) : Parameter named “BrushAbsoluteDiameter” cannot be converted to floating point number!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushSphere” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushSphere” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “ColorSmudge” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “ColorSmudge” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushPixelMode” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushPixelMode” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushDiameterIsRelative” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushDiameterIsRelative” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushSphere” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushSphere” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “ColorSmudge” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “ColorSmudge” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushPixelMode” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushPixelMode” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushDiameterIsRelative” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushDiameterIsRelative” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushSphere” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushSphere” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “ColorSmudge” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “ColorSmudge” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushPixelMode” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushPixelMode” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “ColorSmudge” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “ColorSmudge” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushPixelMode” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushPixelMode” cannot be converted to integer!
class QString __cdecl qSlicerSegmentEditorAbstractEffect::parameter(class QString) : Parameter named “BrushPixelMode” cannot be found for effect "Erase"
int __cdecl qSlicerSegmentEditorAbstractEffect::integerParameter(class QString) : Parameter named “BrushPixelMode” cannot be converted to integer!

Can you provide step-by-step description of what you do so that we can reproduce the problem?

Thanks, here are the steps
Windows 7, 64-bit, slicer ver. 4.9.0-2017-11-23 (from nightly build)

  1. load 2 different T1+c MRIs taken at 2 time points
  2. register the older MRI to the newer one since the older has thicker cuts (1 vs 4 mm), in plane resolution is nearly the same. Registration looks great.
  3. Create a single segmentation.
  4. set the active volume, then click the “rotate volume to plane” button, when all slice views are locked together (all rotate slightly after this). This is done for each master volume.
  5. Manually ‘paint’ the location of the tumor - this gives me the above problems.
  6. potential issues – segmentation may not all have been done on the same session. Also it seems intermittent – that is I cannot isolate a specific thing I am doing.
  7. Checked memory via Task manager to ensure I have some head-room.

Thanks for your help!

At the beginning of Step 3, is the master volume the same as the background volume in the slice viewers?

Note that the brush thickness is always the same as the slice spacing that is set in the slice viewer. If the brush size is much thinner than the slice thickness of the segmentation’s labelmap then it might not be large enough to include any voxels. This should not happen if the master volume is the background volume and slice views are rotated to volume’s plane.

Ok, good to know.

I believe so. To be honest, I just make sure the volume in the viewer was the same as that listed in “Master volume.” I never actually checked but I am pretty sure none was in the Foreground. I have been consistently doing segmentations in single axial slice only. I will be sure to check this in the future.

Currently, I really can’t seem to isolate a factor that leads to this error but I can keep these issues in mind.

Geometry of internal labelmap in segmentation node is determined by the first selected master volume. If you later change the master volume, it does not affect the geometry (slice thickness, orientation, etc). We plan to give the user some more controls over this, so that users could force changing of the labelmap geometry for an existing segmentation, but for now, if you want to change labelmap geometry in the segmentation, then you need to create a new segmentation and make sure you that the master volume you select first is the correct one.