rois_header=mha_read_header(filelocation);rois_volume = mha_read_volume(rois_header);rois_zflipped = flipdim(rois_volume,3);rois_zflipped_perm = permute(rois_zflipped,[2 1 3]);planC=maskToCERRStructure(rois_zflipped_perm, 1, 1, SSname);
Reference to non-existent field 'ElementNumberOfChannels'.Error in mha_read_volume (line 79)V = reshape(V,[str2num(info.ElementNumberOfChannels) info.Dimensions]);Error in SlicerSS2CERR (line 9)rois_volume = mha_read_volume(rois_header);
Filename: [1x107 char]Format: 'MHA'CompressedData: 'true'ObjectType: 'image'NumberOfDimensions: 3BinaryData: 'true'ByteOrder: 'false'CompressedDataSize: 116764TransformMatrix: [1 0 0 0 1 0 0 0 1]Offset: [-325 -325 -257.5000]CenterOfRotation: [0 0 0]AnatomicalOrientation: 'RAI'PixelDimensions: [1.2700 1.2700 2.5000]Dimensions: [512 512 168]DataType: 'short'DataFile: 'LOCAL'BitDepth: 16HeaderSize: 344
Here is the script I use to import .mha structures that are deformed using Plastimatch. readmha.m is distributed along with CERR and it reads the ElementNumberOfChannels field. Hope this works for you.
[data3M,infoS] = readmha(structMhaFileName);
data3M = flipdim(permute(data3M,[2,1,3]),3);
isUniform = 1;
strName = ‘StructName’;
strCreationScanNum = 1;
planC = maskToCERRStructure(data3M,isUniform,strCreationScanNum,strName,planC);
Regards,
Aditya
--
You received this message because you are subscribed to the Google Groups "CERR FORUM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
cerr-forum+...@googlegroups.com.
To post to this group, send email to
cerr-...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/cerr-forum/3fa5a147-b684-4c1a-bc9f-c75efa1f0a4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
=====================================================================
Please note that this e-mail and any files transmitted from
Memorial Sloan-Kettering Cancer Center may be privileged, confidential,
and protected from disclosure under applicable law. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any reading, dissemination, distribution,
copying, or other use of this communication or any of its attachments
is strictly prohibited. If you have received this communication in
error, please notify the sender immediately by replying to this message
and deleting this message, any attachments, and all copies and backups
from your computer.
Error using reshapeTo RESHAPE the number of elements must not change.Error in readmha (line 119)A = reshape(A,nchannels,sz(1),sz(2),sz(3));
To post to this group, send email to cerr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerr-forum/3fa5a147-b684-4c1a-bc9f-c75efa1f0a4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ObjectType = ImageNDims = 3BinaryData = TrueBinaryDataByteOrderMSB = FalseCompressedData = TrueCompressedDataSize = 126812TransformMatrix = 1 0 0 0 1 0 0 0 1Offset = -325 -325 -297.3CenterOfRotation = 0 0 0AnatomicalOrientation = RAIElementSpacing = 1.27 1.27 2.50055DimSize = 512 512 184ElementType = MET_SHORTElementDataFile = LOCAL