Hi Miri,
.mat file import in MITK is not supported. You would either need to
export your matlab datastructure as vtk file format (maybe this site can
help you with that: http://www.exolete.com/recipes/matlab_vtk) or you'd
have to find some other way to import your data into mitk. If its just a
list of points it should not be too difficult to read the file using
fstream.
Peter
On 02.02.2012 13:43, Miri Trope wrote:
Dear Peter,
Thank you very much for your kind and detailed explanation.
Please forgive me about the following q:
my fiber's data (fibers.mat) is represented as a structural object in
Matlab.
Does Mitk enable to import such a Matlab's data?
Anyway, how my program can read the data from that fiber.mat file?
Thanks in advance.
On Thu, Feb 2, 2012 at 1:00 PM, Peter Neher
<[email protected] <mailto:[email protected]>> wrote:
Hi Miri,
to represent fiber tracts we use mitkFiberBundleX. This
datastructure is simply initialized using a vtkPolyData containing
all your fiber data.
Simple example:
vtkSmartPointer<vtkPolyData> fiberPolyData =
vtkSmartPointer<vtkPolyData>::New(); // the input datastructure
for mitkFiberBundleX
vtkSmartPointer<vtkCellArray> fiberContainer =
vtkSmartPointer<vtkCellArray>::New();
vtkSmartPointer<vtkPoints> pointContainer =
vtkSmartPointer<vtkPoints>::New();
for (int l=0; l<numlines; l++) // iterate over fibers
{
vtkSmartPointer<vtkPolyLine> fiber =
vtkSmartPointer<vtkPolyLine>::New();
for (int p=0; p<pointsInLine; p++) // iterate over points in fiber
{
vtkIdType id =
pointContainer->InsertNextPoint(yourPoint); // add next point
fiber->GetPointIds()->InsertNextId(id); // add point id
to fiber
}
fiberContainer->InsertNextCell(fiber); // add fiber to
fiber container
}
fiberPolyData->SetPoints(pointContainer);
fiberPolyData->SetLines(fiberContainer);
mitk::FiberBundleX::Pointer fiberBundle =
mitk::FiberBundleX::New(fiberPolyData);
Peter
On 02.02.2012 07:47, Miri Trope wrote:
Hi All,
How I should convert my fibers which is represented in .mat file
in order to be represented on mitk view?
i.e., I'd like to view my data as :
http://www.dkfz.de/de/mbi/images/neuro3.jpg
Note that my .mat file consists of [n] number of fibers which
each fiber [i] consists of number of points [j] like this:
fibers[n]
|
|__fiber-i__
|
|___point-j(x,y,z)
Please don't hesitate to ask if a further explanation is required ...
Anyway, any information/ method would be very appreciated!
Miri
--
Dipl.-Inform. Peter Neher
German Cancer Research Centre
(DKFZ, Deutsches Krebsforschungszentrum in der Helmholtz-Gemeinschaft,
Stiftung des öffentlichen Rechts)
Division of Medical and Biological Informatics
Im Neuenheimer Feld 280, D-69120 Heidelberg
Phone: 49-(0)6221-42-3552, Fax: 49-(0)6221-42-2345
E-Mail:[email protected] <mailto:[email protected]>,
Web:www.dkfz.de <http://www.dkfz.de>
The information contained in this message may be confidential and legally
protected under applicable law. The message is intended solely for the
addressee(s). If you are not the intended recipient, you are hereby notified
that any use, forwarding, dissemination, or reproduction of this message is
strictly prohibited and may be unlawful. If you are not the intended recipient,
please contact the sender by return e-mail and destroy all copies of the
original message.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft
developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
mitk-users mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/mitk-users
--
Dipl.-Inform. Peter Neher
German Cancer Research Centre
(DKFZ, Deutsches Krebsforschungszentrum in der Helmholtz-Gemeinschaft, Stiftung
des öffentlichen Rechts)
Division of Medical and Biological Informatics
Im Neuenheimer Feld 280, D-69120 Heidelberg
Phone: 49-(0)6221-42-3552, Fax: 49-(0)6221-42-2345
E-Mail: [email protected], Web: www.dkfz.de
The information contained in this message may be confidential and legally
protected under applicable law. The message is intended solely for the
addressee(s). If you are not the intended recipient, you are hereby notified
that any use, forwarding, dissemination, or reproduction of this message is
strictly prohibited and may be unlawful. If you are not the intended recipient,
please contact the sender by return e-mail and destroy all copies of the
original message.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users