SCIRun User Mailing List

Text archives Help


[SCIRUN-USERS] Re: matrix mapping SCIRun


Chronological Thread 
  • From: mavinmartin@gmail.com
  • To: Jess Tate <jess@sci.utah.edu>
  • Cc: scirun-users@sci.utah.edu
  • Subject: [SCIRUN-USERS] Re: matrix mapping SCIRun
  • Date: Wed, 24 Apr 2013 15:52:18 -0600

Great, thank you Jess!  I've actually done several tutorials in SCIRun that included nrrd files and have done many manipulations but I am unfamiliar with converting everything to nrrd formatting.  Thank you for the nrrd link and for your quick response.

Sincerely,
Mavin
On Apr 24, 2013, at 2:29 PM, Jess Tate <jess@sci.utah.edu> wrote:

Hi Mavin,

The reason that you only see edges in this example is because you only had a surface to begin with, so the boundary would be an edge.  To view an image of the 2D matrix, just pipe the output from the ConvertMatrixToField to the ShowField module.  You may want to also use RescaleColorMap to adjust the limits of the color map.  That will allow you to scale for your 1,2,3,... labels.  

To load 3D matrix data you can do this a number of ways.  The nrrd format allows for 3D image data and is a format we use often.  You could export the binary data from matlab and create a text header file (nhdr) so that it will load into SCIRun.  Please refer to the Teem documentation for more information (http://teem.sourceforge.net/nrrd/).  There are a few other formats that you could use also, but nrrd is the one I use most.  

Another option is to save it as a 1D matrix, then create a 3D lattice (latvol) in SCIRun to map onto.  You can do this using the CreateLatVol module and the SetFieldData module.  Make sure the number of nodes or elements in the latvol is the same as the number of values in the matrix.  It may also take some tweaking to get the order of the data correct.  I might be helpful to use the text option in the ShowField module to help with this.  This option is harder to set the size of the volume or the spacing of the voxels than using the nrrd format.  

There are some tutorials that you can refer to.  They are on the website (scirun.org).  Click user documentation, then tutorials. The basic tutorial probably covers the most with the questions that you have.  

Hopefully that helps.  

Cheers,
Jess




On Apr 23, 2013, at 8:16 PM, mavinmartin@gmail.com wrote:

Hi,

I'm trying to make my SCI Run visualize data that is n by n by n.  I have sort of figured it out for an n by n matrix imported from matlab; for example, I have a matrix a = [ 1 2; 1 1 ] that is in the format in matlab and I can display it using the following modules as seen below.

<PastedGraphic-1.tiff>

I use the domainBoundary to split the boundaries of the 1's and 2's.
<Screen Shot 2013-04-22 at 10.38.16 PM.png>

As I try to visualize it, it only shows the edges.  I try to check the box under ShowField to include faces but it won't check.  Instead it would only show edges for the matrix [1 2; 1 1].  

<Screen Shot 2013-04-22 at 10.43.15 PM.png>

Is there a way to turn these into face meshes where each region would be a different color if I have different mappings of 1's, 2's, 3's, etc?  Also, is there a way I can import n by n by n 3d matrices from matlab or from a file into SCIRun?  Also, if you have any tutorials that may be applicable to this please direct me there also. 

Thanks again,
Mavin





Archive powered by MHonArc 2.6.16.

Top of page