is it possible to have smoothing effect only affect the one axis, the one that vertically goes through slices.
In other words, if the resolution of a slice is good but slices were spaced a lot, if the 2mm or 3mm smooth is applied, it affects all directions, that way resolution in the slice is sadly lost.
so is there an option to smooth only 1 direction?
for example add extra slices between these and make a voxel through interplation
Or
somehow manouver 3D models to be smoothen only in 1 direction
If you are planning to apply this smoothing to a segmentation, and your dataset is highly anisotropic, probably you want to resample the original volume as isotropic using CropVolume before you start your segmentation. This would be equivalent to your #1.
If it is a scalar volume you want to smooth, then you can try SimpleFilters (e.g., gaussian or median) which let’s you specify the smoothing sigmas independently for each axis.
no, I do not think this would be the same. Even isotropic volume when smooth applied it would be applied between horizontal pixels in each slice.
So let’s say the segmentaiton is a very sharp corner somewhere and looks beautiful when only viewed in a horizontal sice.
Even with isotropic voxels, smoothing will affect the horizontal edges and lines, thus result in rounding of the corners in horizonal slices as well.
I am not sure what is a scalar volume, I will see what this means but this is a regular nrrd file made up of many slices that’s all… just images stacked upon one another. great resolution but horrible spacing.
Assume you have 3 images stacked upon one another.
you want to avoid sharp red line but
you want to smoothen it to get the green line
however on a horizontal plane you WANT to keep the sharp blue line as is
and avoid having it smoothen out to be yellow line (because resolution is great 7T micrometers images and segmentation was done excellently well without errors.
However because process takes long, slices were few and huge spacing
I mean look what it does to the horizontal images which were fine and okay. It creates opacity low many images horizontal images. This is actually a horrible solution to what I am proposing. IT completely ruins the detail and effects that were contained in high resolution horizontal images.
Crop Volume isotropic demands interpolation and that interpolation makes no distinction what it is interpolating or in which axis. It simply interpolates everything thus ruining the detail of horizontal images.
Do not affect horizontal shapes of the OBJ, preserve all details of each pixel in the horizontal images, simply smoothen out the object vertically in 1 axis.
The SmartFilters you said do not exist. Those are the only three smartfilters with name median in them:
and here are the filters that have gaussian name in them:
If you type median to the search box in the SimpleFilters, you should see the filters: BinaryMedianFilter is the first one shown, but the drop down should list the others. Same for Gaussian too.
You probably should have done the crop volume with interpolation and isotropic spacing prior to starting the segmentation. If you only want to resample in the Z direction, ResampleScalarVolume can give you what you want. (just leave x and y values as 0,0 and enter whatever spacing you want for Z).
Rest of what you are trying to achieve is not clear to me.
sir thank you very much. I have found similar methods in 3ds max to affect only one axis but this is much better I can tell because it is right away in slicer.
I did not want to bother you so I was researching on my own trying to do it but failed with many times over. Now I will try these two methods Hopefully see which one works. There is also one more student he was given similar tasks for 2 weeks and he has same issue. I hope this works
If your image is highly anisotropic then it means that you won’t be able to fully utilize the high resolution information within the image slice, because you just miss so much information between the slices.
If your goal is not to reproduce the missing information (which is impossible), and it is OK to have sharp edges along two axes, while smooth interpolation along the third one, then you can use morphological interpolation to fill in the gaps. To achieve this, resample the input volume to be isotropic as @muratmaga suggested above, but then only segment at the middle of the original slices. To do that, you can choose your original sparse volume as background volume and use Scissors effect to fill a thin slice (Operation: Fill inside; Slice cut: symmetric 0.1mm or whatever the resolution along the high-resolution axis). You will end up with thin slices with large gaps between them. When you are finished with your segmentation, use Fill between slices effect to fill in the gaps.
this exactly describes what I want and you have properly understood what I mean.
Aim to “recover” information between slices if of course impossible
The aim was only to smoothen the transition so that it doesn’t look so ugly.
The problem is that images are loaded from a sequence with white background. They are enumerated and then the automatic script segments them with treshold since they all have copletely white background. This way thousands of images are processed.
The threshold would simply segment everything right?
I would not be able to tell threshold function in the script “segment every third slice or every 4th slice”.
But yes, this properly describes what I mean or what I tried to express and what you did is exactly that what you demonstrated is exactly what I meant.