Hi there again,

I have been trying to implement some colouring in the fibers but nothing changes. I am basing my implementation of what I find in the MITK source, but there is actually no plugin where colours of tracks get changed...

This is part of my code, and I get the correct cout´s:
Snippet


if(strcmp(cc,mitk::FiberBundleX::COLORCODING_ORIENTATION_BASED) ==0)
  {
    cout <<"1"  << endl;
      fiber->SetColorCoding(mitk::FiberBundleX::COLORCODING_ORIENTATION_BASED);
      fiber->DoColorCodingOrientationBased();
  }
  else  if(strcmp(cc,mitk::FiberBundleX::COLORCODING_FA_BASED)==0)
  {
    cout <<"2"  << endl;
      fiber->SetColorCoding(mitk::FiberBundleX::COLORCODING_FA_BASED);
      fiber->DoColorCodingFaBased();
  }
  else  //custom color
  {
    cout <<"3"  << endl;
      int  rgbcolor[3];
      rgbcolor[0] = 255;
      rgbcolor[1] = 0;
      rgbcolor[2] = 100;

      fiber->SetColorCoding(mitk::FiberBundleX::COLORCODING_CUSTOM);
      
geometryNodeArray[0]->SetProperty("color",mitk::ColorProperty::New(rgbcolor[0], 
rgbcolor[1], rgbcolor[2]));
      geometryNodeArray[0]->Modified();
  }


I dont know what I am missing...

btw, I am still using the  MITK 2013.09.

Best,
Miguel

On 15.10.2014 11:31, Miguel Nunes wrote:
Thank you so much for the quick answer, Peter!

I managed to solve my translation issue.
Regarding the other question, I will investigate this setFAmap. If I dont 
manage to get this working I will come back to you.

Best regards,
Miguel
On Wednesday, October 15, 2014 11:03 CEST, Peter Neher <p.ne...@dkfz-heidelberg.de> wrote:
Hi Miguel,

MITK always uses world coordinates for the fiber points. Thus, no
transformation is needed and the matrix is set to identity. The bounding
box of the fibers is different from the image bounding box since the
fibers don't necessarily have to occupy the same volume as the image
they were obtained from.

Regarding your second question, the fiber colors are calculated in the
FiberbundleX class. The default orientation colorcoding is calculated in
DoColorCodingOrientationBased() and a custom color coding, e.g. FA based
color coding, is done in the method "SetFAMap" of the FiberBundleX.

I hope that helps!

Cheers,
Peter

On 14.10.2014 18:18, Miguel Nunes wrote:
Hello MITK List,

I am having a interesting problem. I am loading a Track file (trk) and the 
respective accompanying MR datasets and segmentations.

After loading the datasets, all datasets are correctly aligned in the 
stdmultiwidget.

But for my plugin I need to access the transformation between the datasets and 
I cannot achieve this. There is always some miss calculations. For example, if 
I ask the geometry3D for the bounding box of the dataset, it gives me different 
values comparing to when I get these values from the vtkPolyData inside the 
mitkFiberBundleX. The two returning BB are not the same.

When I check the details of the Fiber dataset, it is only shown an identiy 
matrix and the BBox, without any transformation. But the BBoxes of the track 
and the MR image are different. So, how does MITK align them?

Also, I do not understand how the colors of the fibers get rendered. As far as I 
have found there is only a 
fib->SetColorCoding(mitk::FiberBundleX::COLORCODING_CUSTOM) (and similar) which 
leads me nowhere. the render functions of geometry only lead me in circles...

Thank you!

Best regards,
Miguel Nunes

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users
--
Dr. sc. hum. Peter F. Neher
Division Medical and Biological Informatics
Junior Group Medical Image Computing (MIC)

German Cancer Research Center (DKFZ)
Im Neuenheimer Feld 280
69120 Heidelberg
Germany
phone: +49 6221 42-3552
fax:      +49 6221 42-2345

p.ne...@dkfz.de
http://www.dkfz.de/de/mbi/people/Peter_Neher.html
Confidentiality Note:
This message is intended only for the use of the named recipient(s) and may 
obtain confidential and/or privileged information. If you are not the intended 
recipient, please contact the sender and delete the message. Any unauthorized 
use of the information contained in this message is prohibited.


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to