Title Image

  Post     Change Settings     Oldest First     View Users     Main Page     Help  

Schnee!
Fred
8:55 AM, 23/10/14
[Edit] [Reply quoting]

Here we are experiencing the joys of an extended post-fire decontamination. Rumour has it that in some undergrad practical, someone dropped a beaker/flask/bottle of a highly oxidising chemical. Result: fire, building evacuated - including ENV where I work. Fire service comes along, puts out fire by flooding it with lots of water. Result: contaminating chemicals in water supply and in the air, which have to be gotten rid of. At least, that's the rumour - 4 hours later and there's still no official word on what happened or on when we'll be allowed back in. I at least grabbed my laptop and bag on the way out - though not the laptop's power supply, so there's a limit to how much I can do. But there's people without coats hanging around outside, and without their wallets, phones, car and house keys (so they can't even go home). Universities would run so much smoother without the undergrads....
Gillian
2:57 PM, 21/10/14
[Edit] [Reply quoting]

"...And, the whole skull-cap thing isn't a bad idea..." -- Giles C


I thank you Grinning

Clare
12:58 PM, 21/10/14
[Edit] [Reply quoting]

Some gimp suits can be very forgiving.
NickD
12:32 PM, 21/10/14
[Edit] [Reply quoting]

"Kind of like being in a very tight, but unflattering, gimp suit..." -- Giles C

As opposed to a flattering gimp suit? Shock
Cameron
9:32 AM, 21/10/14
[Edit] [Reply quoting]

Sorry, I meant OHBA! Mark Stokes and I have talked about doing what I'm doing, but he gave up because it was hard Happy
NickD
10:59 PM, 20/10/14
[Edit] [Reply quoting]

OHBA. Where we do MEG.


And, the whole skull-cap thing isn't a bad idea. When people are fed up with modelling head positions, we make a cast of people's heads and create a moulded plug to fit them into the scanner. Kind of like being in a very tight, but unflattering, gimp suit...
Giles C
10:37 PM, 20/10/14
[Edit] [Reply quoting]

Giles - do you work at FMRIB by any chance?
Clare - REVOLUTIONARY!
NickD
4:41 PM, 20/10/14
[Edit] [Reply quoting]

I think more Matlab questions should be solved with papier mache
Niall H.
4:11 PM, 20/10/14
[Edit] [Reply quoting]

Nick:
1. shave subject's head
2. make a papier mache skullcap
3. get lots of pins and fine cotton thread
4. take a scalpel and a large sheet of paper
etc
etc
Clare
3:22 PM, 20/10/14
[Edit] [Reply quoting]

"
Righto, Giles out - back to Climbing chat.


" -- Giles C


Oh, nonono - time for knitting, methinks! Err, except I can't think of a knitting question... darn.

Gillian
3:17 PM, 20/10/14
[Edit] [Reply quoting]

BELOW!!!!
Did you drop something?
Niall H.
2:56 PM, 20/10/14
[Edit] [Reply quoting]


The options you've chosen are those I know least about - you'd have to do some searching for appropriate algorithms.

BETSURF is very good, and nearly everyone in neuroimaging has FSL installed, so I don't think it's a major issue to use a command line call from matlab.


However, if you're really against it, have a go with spm's trick of warping the MNI scalp surface, just to see what you think.
It's pretty robust: it doesn't seem that there's really any difference between a subject's scalp extraction and that mapped from MNI space. It's used routinely in the MEG community.

The process is simple: use your pre-computed affine registration between MNI space and subject space, then warp the MNI scalp into your subject space. Voila! A pretty good version of your subject's scalp.
Check out spm_eeg_in_mesh.m which performs this stuff, or the mesh warping function spm_swarp.m


Righto, Giles out - back to Climbing chat.



Giles C
2:38 PM, 20/10/14
[Edit] [Reply quoting]

"above" -- Tor
BELOW!!!!
Thanks for the link. I think that's for smoothing activations across an existing anatomical image, rather than for smoothing the image itself (which I think SPM treats as immutable unless you're warping).
NickD
2:27 PM, 20/10/14
[Edit] [Reply quoting]

The first link above on regularise data in 3D you should be able to use to fit a smooth surface to what you have already got. If you are looking for something more sophisticated it might be worth looking at : www.wias-berlin.de/software/aws4SPM/ ?
Tor
2:19 PM, 20/10/14
[Edit] [Reply quoting]

Wow, it's been a while since we MatLabbed on the GP
Robert
1:59 PM, 20/10/14
[Edit] [Reply quoting]

Thanks Tor and Giles!

I am using SPM12 functions to segment a T1 scan into scalp and grey matter, then for each voxel in the GM class I am looking for the closest point on the scalp. This is for setting dosage in brain stimulation with TMS/tDCS. I'm keen to stick to SPM12 as I hope to make this tool deployable.

At the moment the 'noise' is not a big problem as long as the noise pops out from the scalp layer (found using Matlab's convex hull functions) and doesn't create a hole (if this is true the popped-out voxels will never be closer to the GM than other points. However it's a bit unsatisfying, and I feel I should be able to spatially filter the scalp layer so it looks smooth.

Of Giles's options, I'm less keen to warp the image as I want to preserve native space except for an MNI warp of the GM (for group analyses), but these two sound like what I want...
- Smooth what you've already extracted
- fit a surface to what you've extracted with a penalty on curvature.
...How would I do these? I'm not very mathsy!
NickD
1:36 PM, 20/10/14
[Edit] [Reply quoting]

"Technical maths question!!!!

I have a 3D MRI scan of a person's head. I would like to get the exterior surface of this scan (i.e. the person's scalp). I can use a Matlab function to get the convex hull of the scan, but it looks a bit 'noisy' (i.e. there is the odd point that sticks out a couple of millimetres from the rest of the scalp, which I assume is a scanning artefact). Is there a way to smooth a convex hull? I'm looking for a solution that is not too computationally expensive as my code already takes about 8 mins per scan, and I still have things to add to it!
NickD


Hi, Nick,

what format is your MRI scan in? Do you have a nifti file (.nii?)
If so, try BETsurf in FSL. You can download FSL from fsl.fmrib.ox.ac.uk/fsl/fslwiki/

It should work pretty well so long as you want the scalp, and not a surface including facial features and nose.


If that doesn't work, there are a variety of options. You can:
- take a scalp surface from a template head and deform it to your subject based on a registration between the two spaces. Shouldn't be too hard to knock up, or if you're doing fMRI analysis with SPM in Matlab, they have in-built functionality for this.

- Smooth what you've already extracted
- fit a surface to what you've extracted with a penalty on curvature.

You can always drop me an email on giles dot colclough at gmail.com


Giles
Giles C
11:34 AM, 20/10/14
[Edit] [Reply quoting]

I'm sure you have trawled through all the stuff on the matlab file exchange on alpha hulls ( www.mathworks.co.uk/matlabcentral/fileexchange/32725-fast-alpha-hulls--alpha-shapes-in-3d--parfor-enabled-), crust algorithms, Morse theory, Cocone algorithms, ball pivoting, convection algorithms? This is probably more Giles thing?
Tor
11:27 AM, 20/10/14
[Edit] [Reply quoting]

"Technical maths question!!!!

I have a 3D MRI scan of a person's head. I would like to get the exterior surface of this scan (i.e. the person's scalp). I can use a Matlab function to get the convex hull of the scan, but it looks a bit 'noisy' (i.e. there is the odd point that sticks out a couple of millimetres from the rest of the scalp, which I assume is a scanning artefact). Is there a way to smooth a convex hull? I'm looking for a solution that is not too computationally expensive as my code already takes about 8 mins per scan, and I still have things to add to it!

THANKS!!!!" -- NickD

Have you tried www.mathworks.co.uk/matlabcentral/fileexchange/46223-regularizedata3d? Never tried it myself but it might be worth a go.
Tor
10:55 AM, 20/10/14
[Edit] [Reply quoting]

"Wrong paper size is a different issue to wrong print area. Does your thesis think it is on A4 or US letter?" -- Gillian
Not sure about that... Adobe specifies it as A4, Portrait (210 × 297 mm) and the first line of the latex document specifies \documentclass[titlepage,a4paper,12pt]{book}, so I am assuming it is the wrong print area.
Tor
10:47 AM, 20/10/14
[Edit] [Reply quoting]

Hey sent you an email Georgina...
Tor
10:42 AM, 20/10/14
[Edit] [Reply quoting]

Technical maths question!!!!

I have a 3D MRI scan of a person's head. I would like to get the exterior surface of this scan (i.e. the person's scalp). I can use a Matlab function to get the convex hull of the scan, but it looks a bit 'noisy' (i.e. there is the odd point that sticks out a couple of millimetres from the rest of the scalp, which I assume is a scanning artefact). Is there a way to smooth a convex hull? I'm looking for a solution that is not too computationally expensive as my code already takes about 8 mins per scan, and I still have things to add to it!

THANKS!!!!
NickD
11:00 PM, 19/10/14
[Edit] [Reply quoting]

Hello campers!

Have been sitting on fence for a while about the COSTA BLANCA trip but am now looking at the going to costa BLANCA side of the fence. Does anyone here know a) if this is still possible, b) who to talk to to book flights and stuff

Thanks! Glad to hear freshens meet wasa success!
Georgina

9:29 PM, 19/10/14
[Edit] [Reply quoting]

That was a breezy but fun Freshers Meet! The rock at Windgather is very friendly, but the requirement to queue for belay gear placements came as a surprise!
Niall H.
9:00 PM, 19/10/14
[Edit] [Reply quoting]

And you can change the layout of subplots in Matlab to have a lot less white space around them. Still, re-coding all your figures would be a lot of work...
Gillian
12:22 PM, 19/10/14
[Edit] [Reply quoting]

Wrong paper size is a different issue to wrong print area. Does your thesis think it is on A4 or US letter?
Gillian
12:20 PM, 19/10/14
[Edit] [Reply quoting]

Don't worry, so did we. Sold out!
Jody

10:24 PM, 18/10/14
[Edit] [Reply quoting]

Gah. Just arrived back in Oxford too late and missed this. Oh well...
Cameron
7:00 PM, 18/10/14
[Edit] [Reply quoting]

Me, Mike, and Sally will all be there :-) Heading to The Chester arms now to hopefully find some food if anyone wants to join.
Jen
3:24 PM, 18/10/14
[Edit] [Reply quoting]

Pride tonight at 6:30 at Ultimate Picture Palace? Phones dead :/.
Jody

2:39 PM, 18/10/14
[Edit] [Reply quoting]

Thanks Gillian, they were in jpg format but I have also tried tiff, eps, pdf. They are saved in matlab the same size as they appear in my thesis. My thesis is about using INSAR data so basically all about imagery. Although this chapter probably ought to be 2 chapters. I put 6 figures to a page. Ideally I would use subplot but they are all produced using different bits of code so I would have to rerun and save the outputs for all of them to re-import. Also I don't like the way subplot puts ridiculous amounts of white space around each figure. It is made a bit more complicated by the fact that faults often with annotations and labels are superimposed on each plot resulting in lots of layers. The image probably works better as a bitmap but the faults as vectors. I tried reducing the resolutions manually in matlab but when they are imported into latex they look fuzzy until you reach resolutions that are several times higher than printable resolution. Although this might suggest the higher resolution images would be fuzzy when printed as you would never see this resolution on paper that isn't the case for the odd page that I was able to print. I think I have solved the resolution problem - thanks Sesh and co. The best solution for resolution was using png this has reduced the file size to 1/4 its original size. I have managed to print 1 copy which is all I needed just now but am still getting problems. Someone who is nearer the printer so could read the error messages says it was saying something to do with it being the wrong paper size. Latex puts large amounts of white space around the edge of a page so I don't think it is outside the printing area as far as the printer is concerned. I don't want to shrink to printable size so I guess changing the paper margins in latex is the solution? Sorry climbing- are we going to the Peaks or Portland tomorrow?

Tor
11:30 AM, 18/10/14
[Edit] [Reply quoting]

Don't believe www.istheinternetbroken.com/ - it clearly is in Carterton Sad
Steve
10:56 AM, 18/10/14
[Edit] [Reply quoting]

"Is there anyone who has experience writing a thesis using pdflatex and including figures from matlab? I have run out of ideas - all of the options I try result in good quality images that are impossible to print (even a page at a time!) the file for a single chapter is ~400MB or fuzzy images that are printable but frankly useless they are so poor quality. I have tried compressing the PDF but this has the same results... " -- Tor

What was Matlab saving your images as before you switched to png? eps? jpg? Something else? And were those image files very large to begin with? My entire thesis is only 13 MB - maybe your images don't need to be such high resolution to begin with - you can change the resolution at which Matlab saves them. Do you get Matlab to make your figures at the same size as they'll appear in the final thesis? (I'm talking physical size - the area they occupy on a printed page - not filesize.) Because if they get squashed before going in your thesis then this suggests, again, that you may be creating them at higher resolution than you really need. (I'm not explaining this very well, but it's kinda the opposite of when you take a very small, low-res image and blow it up much bigger and then it looks all pixelated - here, if your images get printed at a small physical size, then you don't need the resolution necessary to make them look good at a large physical size.)

Also - 100 images in a single chapter? How long is your thesis?!! Could any of those images be combined into the same figure? Several of the figures in my thesis are full-page figures with multiple subplots (35 subplots in some of them!) which tends to reduce the size quite a bit compared with having them as separate figures.
Gillian
10:06 AM, 18/10/14
[Edit] [Reply quoting]

""Beer yes! Anyone fancy getting food at about 7?" -- Will B
They do a mean steak and stilton pasty there..." -- Mike


Hopefully heading there at about 6:30..7ish with a few work people, so see you there...
Will B
5:18 PM, 17/10/14
[Edit] [Reply quoting]

Cool. BTW, the binning suggestion wasn't a general "idea which might help": it was the solution to a very specific problem, where a plot is effectively embedding the entire data set it was generated from. A typical example would be a very dense scatter plot in EPS format, where at any sensible resolution a raster would actually give a smaller file. So don't go rebinning your data unless you believe this is your problem!
Will B
4:43 PM, 17/10/14
[Edit] [Reply quoting]

Thanks, compressing was a poor choice of words I meant reducing the resolution using gswin32c.exe -sDEVICE=pdfwrite -dMaxSubsetPct=100 -dPDFSETTINGS=/printer -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile="comp_thesis_printer.pdf" -dNOPAUSE -dBATCH "thesis.pdf"
Exporting as .png appears to have halved the file size and the images look ok- I'm just off to see if it will print. If possible I want to avoid having to do any re-binning of data. At over 100 images in a single chapter that sounds like a job to be done drunk....
Tor
1:19 PM, 17/10/14
[Edit] [Reply quoting]

Lina: it's not just you!
Niall H.
1:10 PM, 17/10/14
[Edit] [Reply quoting]

Is it just me, or does the unhighlighted (and thus less orange and more pink) image of this look kind of like a brain with straps?
Lina
1:00 PM, 17/10/14
[Edit] [Reply quoting]

Compressing the PDF will not help.

Look at the total size of your figures - I assume it's close to the total size of your PDF, otherwise pdflatex is doing something weird (in which case try going via DVI and see whether the bloat comes in at the tex->DVI stage or at DVI -> PDF).

Make sure you don't have raster images of vector-based data. If the large files are vector-based, try cutting down the precision. E.g. if you have 10 million data points that give you a smooth curve, you really don't need a plot that is composed of 10 million microscopic line segments. Divide data into bins and plot the bin averages.

If the large files are raster-based, then decide whether you really need that much resolution. You may get better results with lower resolution and lossless compression compared to high-res lossy.
Will B
11:55 AM, 17/10/14
[Edit] [Reply quoting]

Is there anyone who has experience writing a thesis using pdflatex and including figures from matlab? I have run out of ideas - all of the options I try result in good quality images that are impossible to print (even a page at a time!) the file for a single chapter is ~400MB or fuzzy images that are printable but frankly useless they are so poor quality. I have tried compressing the PDF but this has the same results...
Tor
10:49 AM, 17/10/14
[Edit] [Reply quoting]

"Beer yes! Anyone fancy getting food at about 7?" -- Will B
They do a mean steak and stilton pasty there...
Mike
9:32 AM, 17/10/14
[Edit] [Reply quoting]

Beer yes! Anyone fancy getting food at about 7?
Will B
12:52 AM, 17/10/14
[Edit] [Reply quoting]

It's the Oxford Beer Festival this week! I'm going tomorrow from around 8ish - anyone fancy coming along?

Edit: OMG pangolins! They're so weird and cute and awesome! Maybe we need an UCASOTD (U for Unconventionally)...
Sarah W
12:43 AM, 17/10/14
[Edit] [Reply quoting]

Penguins also
PenguinFanatic

9:20 PM, 16/10/14
[Edit] [Reply quoting]

Lina: pangolins are cool Happy
Niall H.
4:11 PM, 16/10/14
[Edit] [Reply quoting]

"Hi, thanks Dave, I'll be at 7.15pm up the hill!" -- Įlvaro
Cool - hopefully see you there (I'm in that first wave).
Dave A.
3:39 PM, 16/10/14
[Edit] [Reply quoting]

Hi, thanks Dave, I'll be at 7.15pm up the hill!
Įlvaro
3:36 PM, 16/10/14
[Edit] [Reply quoting]

Hi Alvaro. We'll be setting off at 7pm and 8.30 from Queens, we'll probably take about 15 minutes to get there.

If you want the discounted entry fee that Brookes are doing with us for the first three weeks (just £5 for a 1.5 hour session), you'll need to wait for one of the groups to arrive and go in with them.
Dave A.
3:23 PM, 16/10/14
[Edit] [Reply quoting]

Hey, thanks for yesterday's slideshow. It was informative and fun!

I wanted to ask - what time do you expect to be arriving to Brookes later today? it would suit me to directly head off there with the bike, instead of Queen's

Cheers,

įlvaro.
įlvaro

3:18 PM, 16/10/14
[Edit] [Reply quoting]

Contender for CASOTD: Pangolins! http://thesmallermajority.com/2014/10/14/mozambique-diary-rescuing-a-dragon/
Lina
2:53 PM, 16/10/14
[Edit] [Reply quoting]