Hi Nil,
As Christoph wrote MITK takes into account all existing data objects in order
to calculate the optimal world geometry for displaying the data (in
mitk::DataStorage::ComputeBoundingGeometry3D). You can tell MITK to ignore a
data object/node for the global world geometry calculation by adding the
property:
dataNode->SetProperty("includeInBoundingBox", mitk::BoolProperty::New(false));
But note: This might lead to the effect that parts of the data object will not
be rendered anymore because the world geometry's resolution is to small. (e.g.
If you have 2 images with spacing 1 and 2. If you tell MITK to ignore the image
with spacing 1 only every 2nd slice of image 1 will be displayed, since the
world geometry will have the spacing 2).
However I assume in your case it would be the right thing to do, because I
suppose you do not want to see every millimeter of the fibers in the 2D views
but just your image's slices.
Best regards
Andreas
Von: Nil Goyette <[email protected]<mailto:[email protected]>>
Datum: Donnerstag, 5. März 2015 22:03
An: Christoph Kolb
<[email protected]<mailto:[email protected]>>,
"[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Betreff: Re: [mitk-users] Always in the center of the voxels
Hi Christoph,
Thank you for the [fast] answer! As I wrote, my images have no rotation, only
scaling (spacing). This gives us the "other case".
But I had this problem even with only 1 image in the DM. Turns out I have a
hidden "helper object" FiberBundleX in the DM with a (1.0, 1.0, 1.0) spacing. I
didn't think about this object because AFAIK the geometry of a FiberBundleX is
not used. When I set the spacing to the same spacing as my image, the crosshair
is in the center.
To conclude, thank you again.
Le 2015-03-05 13:26, Christoph Kolb a écrit :
Hi Nil,
There are two cases where the crosshair is not in the center of voxels and I am
not entirely sure which scenario you have described:
As soon as you have an image with a rotation in your datamanager, it is not
possible to stay exactly in the middle of voxels because the image will be
resampled in order to be "sliceable".
The other case is, that you open at least two images with different spacings.
mitk has to pick a spacing for the world geometry, so that you can navigate
through all images without skipping some of the slices.
If this is what you meant, then you can modify the calculation of the
"world-spacing" in this method:
mitk::DataStorage::ComputeBoundingGeometry3D(
Did this answer your questions? If not, please describe the objects in your
datastorage (rotation, spacing).
Regards
Christoph
On 03/05/2015 06:24 PM, Nil Goyette wrote:
Hi all,
When we open an image with no affine transformation (identity matrix), the
crosshair is always right in the middle of a voxel, like in [1]. Moreover, I
see that MITK tries to "accomodate" us when we open an image with an affine
transformation [2]. I understand that this is a feature; it's probably the
right thing to do :)
However, this feature become troublesome for us with an image with no
transformation, except for a spacing of, lets say, (1.8, 1.8, 1.8). The
transformation matrix would be:
1.8 0.0 0.0
0.0 1.8 0.0
0.0 0.0 1.8
This is the kind of cases where we really prefer the crosshair to always be in
the center of a voxel. In fact, it's not just a preference, it clashes with one
of our feature :)
So, here are two questions:
- Is it currently possible to do it in MITK? Enabling something in the renderer
or in some obscure place?
- If not, can someone tell me how I could do such a thing? I'm not asking for
the code! Just a starting point would be nice.
[1] http://i.imgur.com/hwpHzRs.png
[2] http://i.imgur.com/NOSCIpe.png
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users