Giter Club home page Giter Club logo

Comments (6)

ccaiafa avatar ccaiafa commented on May 17, 2024

Dear @karanaggarwal1994,
Thank you for your message. Unfortunately, I can not replicate the error you got. I just tested and it worked OK on our Linux server.
It seems like the array Phi_subtensor is empty for you.
Could you please set a breakpoint at line 163 and type the following commands in Matlab?
You should obtain the results displayed below:
K>> size(Phi_subtensor)
ans =
7201 93 500000

K>> inds
inds =
67 81 106803
630 57 311373
As you can see the array Phi_subtensor should have dimensions (7201x93x500000) with only two non-zero entries at positions (67,81,106803) and (630,57,311373).

Also, it would be useful to know which version of Matlab you are using and OS (Windows, Linux, MacOS).

Thank you for your feedback
Cesar

from encode.

karanaggarwal1994 avatar karanaggarwal1994 commented on May 17, 2024

Thanks for your quick response
Output:

K>> size(Phi_subtensor)

ans =

    7201          93      500000

K>> inds

inds =

 []

K>>

Matlab Version: 2017b
OS: CentOS7 (Linux)

from encode.

ccaiafa avatar ccaiafa commented on May 17, 2024

Hi @karanaggarwal1994
Yes, your array Phi_subtensor is empty. That's why you can not find its elements.
I wonder if you have successfully loaded the demo datasets. I noticed that you got WARNING messages using a function called nifti_read_buffer. ENCODE should use the function niftiRead instead, which is provided by VISTASOFT.
I recommend you to check that you already downloaded VISTASOFT and MBA toolbox and included them in the Matlab path so ENCODE will be able to find the proper functions.
Let me know how it goes.
Cesar

from encode.

karanaggarwal1994 avatar karanaggarwal1994 commented on May 17, 2024

I have downloaded and included Vistasoft and MBA toolbox in MATLAB path.
The warning comes after executing the line 43 in ~/vistasoft/fileFitlers/nifti/niftiRead.m
Output at line 42 for ni :
K>> ni

ni =

struct with fields:

          data: [107×141×101×106 int16]
         fname: '/home/karan/life/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz'
          ndim: 4
           dim: [107 141 101 106]
        pixdim: [1.5000 1.5000 1.5000 11]
     scl_slope: 1
     scl_inter: 0
       cal_min: 0
       cal_max: 24247
    qform_code: 2
    sform_code: 2
      freq_dim: 0
     phase_dim: 0
     slice_dim: 0
    slice_code: 0
   slice_start: 0
     slice_end: 0
slice_duration: 0
     quatern_b: 0
     quatern_c: 0
     quatern_d: 0
     qoffset_x: -81.5000
     qoffset_y: -121.5000
     qoffset_z: -61.5000
          qfac: 1
       qto_xyz: [4×4 double]
       qto_ijk: [4×4 double]
       sto_xyz: [4×4 double]
       sto_ijk: [4×4 double]
       toffset: 0
     xyz_units: 'mm'
    time_units: 'sec'
    nifti_type: 1
   intent_code: 0
     intent_p1: 0
     intent_p2: 0
     intent_p3: 0
   intent_name: ''
       descrip: 'Raw Eddy Corrected'
      aux_file: ''
       num_ext: 0

Warning

++ WARNING: nifti_read_buffer(/home/karan/life/Demo_Data_for_Multidimensional_Encoding_of_Brain_Connectomes/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz):
data bytes needed = 323042844
data bytes input = 0
number missing = 323042844 (set to 0)

Also, in the same file you have mentioned comments

% If volumesToLoad is not included in the arguments, all the data
% are returned. If volumesToLoad is empty ([]) returns only the header
    % fileName is a string and the file exists.
    % For some reason, the volumeToLoad is not yet implemented.
    % We should just implement it here, by reading the whole
    % thing and only returning the relevant volumes.  I think
    % that is represented by the 4th dimension, but I should ask
    % someone who knows.

from encode.

karanaggarwal1994 avatar karanaggarwal1994 commented on May 17, 2024

It is working now.

The problem was dataset was corrupt, and the warning came because of the same reason.
I downloaded all the files again, then it worked fine.

Thanks @ccaiafa
I am closing the issue.

from encode.

ccaiafa avatar ccaiafa commented on May 17, 2024

Great!
Best

from encode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.