[Mristudio-users] [SPM] ROI drawing

support at mristudio.org support at mristudio.org
Thu Apr 30 12:59:29 EDT 2009


hello, Sarah,

the best way to learn how to use "Binary Maps" (for fiber selection) is letting
DtiStudio to save a sample in following steps:

1. do fiber tracking...;
2. using tools in the "fiber" tab, draw two ROIs for fiber selection. using "OR"
operation for the 1st ROI, "AND" operation for the second one;
3. clicking "Save" button in the "ROI-Operation" section, select "Binary Maps"
option, clicking "OK", specify a file name (or use the default name (RoiMap.dat)
and "Save" it;
4. then you will get 3 files: RoiMap_00.dat, RoiMap_01.dat and RoiMap_ROI.map. 
here, RoiMap_00.dat is a binary image  for the 1st ROI you had drawn,
RoiMap_01.dat is the binary image for the 2nd ROI.  RoiMap_ROI.map is a
plain-text file. you can open/view/edit it using any text-editor (like NotePad),
it may looks like this:

---------------------------------------------------
*** ROI Map ***
Begin
	ImageWidth:	256
	ImageHeight:	256
	ImageSlices:	54

	PixelSizeWidth:	0.937500
	PixelSizeHeight:	0.937500
	SliceThickness:	2.500000

	SliceOrientation:	1
	SliceSequencing:	0

	BinaryFile:	C:\Hangyi\Test\RoiMap_00.dat
	Operation:	0
	FiberColor:	(255,0,0)
	ColorMode:	0

	BinaryFile:	C:\Hangyi\Test\RoiMap_01.dat
	Operation:	1
	FiberColor:	(255,0,0)
	ColorMode:	0
End

Note:
	Slice Orientation: 0=Coronal, 1=Axial, 2=Sagittal
	Slice Sequencing:  0=Positive, 1=Negative
	ROI Operation:  0=OR, 1=AND, 3=NOT, 4=Cut0, 5=Cut1, 6=AndClr, 7=NotClr,
8=CutClr0, 9=CutClr1
	Fiber Color: (r,g,b) = (0..255, 0..255, 0..255)
	Color Mode: 0=random, 1=user-defined

*** ROI Map ***

---------------------------------------------------

the first part of this file is the image parameters, the second part (started
from "BinaryFile:..") indicates the ROIs and operations that would be used for
the fiber selection. and the third part is just a guide-line shows how to use
this file.

this file tells DtiStudio uses RoiMap_00.dat as the 1st ROI with "OR" operation
(operation=0), and load the 2nd ROI (RoiMap_01.dat) with "AND" (operaion=1)
sequentially for fiber selection.


5. Now, you can create your own ROI files using any tools (as long as the ROI is
saved as binary image - 8 bits (or 1 byte) per pixel, and same dimension as that
of the original images), and modify "RoiMap_ROI.map" to specify your ROI file
locations and operations.  then with DtiStudio, using ROI-"Load" button of the
"fiber" tab, choose "Binary Map" option to load in your "RoiMap_ROI.map". you
will get the fibers with your ROIs combination.


regards,

MriStudio Supporter





> Hello Susumu -
>
> I have read the post you suggested about using binary map file format for my
> ROIs, but still have problems. My ROI is hand drawn, and when I save as binary
> map format, I get the two .dat files, but not the third file mentioned. When I
> try to open one of the dat files as binary format, I get the error message
>
> File size is less than expected: (Img Width*ImgHeight*2 bytes) + header
>
> Followed by the path name. I have drawn the ROI on a T1 image which has been
> coregistered in SPM to the mean b0 image, as the AIR coregistration I tried gave
> poor results.
>
> I appreciate any suggestions you can give me.
>
> Sarah
>
> IMPORTANT WARNING:  This email (and any attachments) is only intended for the
> use of the person or entity to which it is addressed, and may contain
> information that is privileged and confidential.  You, the recipient, are
> obligated to maintain it in a safe, secure and confidential manner.
> Unauthorized redisclosure or failure to maintain confidentiality may subject you
> to federal and state penalties. If you are not the intended recipient, please
> immediately notify us by return email, and delete this message from your
> computer.
>
> _______________________________________________
> Mristudio-users mailing list
> Mristudio-users at mristudio.org
> http://lists.mristudio.org/mailman/listinfo/mristudio-users
>




More information about the Mristudio-users mailing list