Title Image

  Post     Change Settings     Newest First     Jump to End     View Users     Main Page     Help  

"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]

Don't believe www.istheinternetbroken.com/ - it clearly is in Carterton Sad
Steve
10:56 AM, 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]

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

2:39 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]

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

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

10:24 PM, 18/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]

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]

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]

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]

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]

Hey sent you an email Georgina...
Tor
10:42 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]

"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]

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!
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]

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]

Wow, it's been a while since we MatLabbed on the GP
Robert
1:59 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]

"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 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]

BELOW!!!!
Did you drop something?
Niall H.
2:56 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]

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]

I think more Matlab questions should be solved with papier mache
Niall H.
4:11 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]

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]

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]

"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]

Some gimp suits can be very forgiving.
NickD
12:32 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]

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]

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

We don't have undergrads and it's very peaceful! Though occasionally inefficient. Big excitement today as a 737 landed, though we managed to miss the actual wheels on tarmac moment. Crying
Alison
2:12 PM, 23/10/14
[Edit] [Reply quoting]

Those of you working in research in Oxford - can you think of anyone who might be able to talk well on 'leading in research' to my academic leadership development group? I want someone to talk honestly about the challenges, rather than a gung-ho motivational type Rolling eyes
Clare
3:18 PM, 23/10/14
[Edit] [Reply quoting]

Clare, does it have to be someone in Oxford? My boss is a fabulous leader in research, and also a very down-to-earth, realistic person. But there's obviously a bit more expense bringing her from Norwich. And she's super busy and may not fit with your schedule. And she might not want to do it. Umm, so, definitely more complicated - but she is *really* fantastic.
Gillian
7:33 PM, 23/10/14
[Edit] [Reply quoting]

Was offered a job in Oxford today, anyone got a room? I don't use heroin or fiddle kids or anything.
Mark
11:12 PM, 23/10/14
[Edit] [Reply quoting]

Clare - a good person to ask* might be Pedro Ferreira.

*Don't really know what you need or whether he'd be interested, but he's a leader of good research, an excellent communicator and probably not gung-ho.
Fred
8:32 AM, 24/10/14
[Edit] [Reply quoting]

Thanks Gill - she sounds great (and it's good to have women do this) but for this purpose it really does have to be someone at Oxford. Sesh, he looks like a possibility - thanks very much.

Anyone else have any ideas? Sarah S?
Clare
10:22 AM, 24/10/14
[Edit] [Reply quoting]

"Anyone else have any ideas? Sarah S? " -- Clare
Not Mad Irene!

Clare
10:23 AM, 24/10/14
[Edit] [Reply quoting]

Clare: I'm drawing a bit of a blank. Alain Goriely is an excellent researcher and leader of research, and a great communicator, but I can't really imagine him wanting to give a talk on it. Let me know if you draw a complete blank, and I might have a chat to some people here.

Mark: Congrats on the job! I can't think of anybody with a spare room at the moment, but I'll let you know if I hear anything. Maybe try posting on the fb page as well?
Cameron
10:24 AM, 24/10/14
[Edit] [Reply quoting]

""Anyone else have any ideas? Sarah S? " -- Clare
Not Mad Irene!
" -- Clare


Does Sarah know a Mad Irene as well?! It must be something to do with the name...
Cameron
10:36 AM, 24/10/14
[Edit] [Reply quoting]

Clare - Kate Nation (Experimental Psychology/SJC) is great. She studies speech development in kids, which is a pretty challenging thing to do. Plus she is lovely Happy
NickD
10:57 AM, 24/10/14
[Edit] [Reply quoting]

"Clare: I'm drawing a bit of a blank. Alain Goriely is an excellent researcher and leader of research, and a great communicator, but I can't really imagine him wanting to give a talk on it. Let me know if you draw a complete blank, and I might have a chat to some people here.

Mark: Congrats on the job! I can't think of anybody with a spare room at the moment, but I'll let you know if I hear anything. Maybe try posting on the fb page as well?" -- Cameron


Cheers Cameron - good idea!
Mark
11:01 AM, 24/10/14
[Edit] [Reply quoting]

Peter Taylor in ndorms is excellent too but is clinical so will have a slightly different experience to academics in pure basic science, humanities etc.
Sarah S
11:10 AM, 24/10/14
[Edit] [Reply quoting]

Clare - Elspeth Garman in biochemistry? I don't know her personally but she spoke at a science communication & public engagement training session that I went to, and (a) she was a good communicator, and (b) seemed very down-to-earth about things, at least when it came to being misrepresented by the press - I assume she'd be equally as honest about leading research. Oh, and she was on The Life Scientific a few weeks ago...
Bethan
11:10 AM, 24/10/14
[Edit] [Reply quoting]

"""Anyone else have any ideas? Sarah S? " -- Clare
Not Mad Irene!
" -- Clare

Does Sarah know a Mad Irene as well?! It must be something to do with the name..." -- Cameron


I do. She'd be interesting to get as she's quite extreme. We're working with her a bit and her work is pretty cool!
Sarah S
11:11 AM, 24/10/14
[Edit] [Reply quoting]

"Clare - Elspeth Garman in biochemistry? I don't know her personally but she spoke at a science communication & public engagement training session that I went to, and (a) she was a good communicator, and (b) seemed very down-to-earth about things, at least when it came to being misrepresented by the press - I assume she'd be equally as honest about leading research. Oh, and she was on The Life Scientific a few weeks ago..." -- Bethan


Actually Elspeth would be amazing. She was one of my lecturers.
Sarah S
11:12 AM, 24/10/14
[Edit] [Reply quoting]

On that episode of The Life Scientific she says at one point she had to use her baby's hair to construct a mount for her crystallography method because she didn't have access to any other fibres fine enough! I aspire to be an awesome a scientist mother / have babies that are awesome enough to put up with that some day!
Bethan
11:17 AM, 24/10/14
[Edit] [Reply quoting]

When she gave a lecture on a subject she deemed particularly dull for us she used to bring in cakes she'd baked with her kid. She is a genuinely lovely person and really intelligent, fab scientist, great mother. I'd love to be like her too!
Sarah S
11:57 AM, 24/10/14
[Edit] [Reply quoting]

"""Anyone else have any ideas? Sarah S? " -- Clare
Not Mad Irene!
" -- Clare

Does Sarah know a Mad Irene as well?! It must be something to do with the name..." -- Cameron


Cameron, do you mean Irene Moroz? She was my tutor at St Hildas. She's mad but lovely Happy
Jenny
3:15 PM, 24/10/14
[Edit] [Reply quoting]

Yes, although Irene is, as you say, really, really lovely. She's extremely supportive of her students and very good at her research, but I've noticed that she can sometimes get into funny little moods at times, and she can be a bit baffled by technology. (I once stood over her shoulder as she practised the coordination involved in 'click-and-drag' to rearrange something on her computer.)
Cameron
4:05 PM, 24/10/14
[Edit] [Reply quoting]

The Mad Irene I mentioned to Sarah is not Irene Moroz. But thanks for all the names, folks - much appreciated.

Now can I repeat the question but wrt ”Leading in Teaching” instead of research? It could be anyone who’s done something interesting in the teaching sphere recently, although I’m particularly interested in people who have faced a challenge in changing something relating to teaching.
Clare
4:22 PM, 24/10/14
[Edit] [Reply quoting]

Janet Dyson, although she's technically retired, has been doing a lot to fix up the disaster of last year's differential equations course. She's also responsible for the fact that Mansfield does quite a lot of interesting (and, IMO, good) things for its maths students, especially when they've just started.
Cameron
5:47 PM, 24/10/14
[Edit] [Reply quoting]

  Post     Change Settings     Newest First     View Users     Main Page     Help